Recherche avancée

Médias (1)

Mot : - Tags -/ogv

Autres articles (79)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (7713)

  • Revision 7249 : Résoudre le ticket http://www.mediaspip.net/ticket/gestion-des-spam En ...

    12 décembre 2012, par kent1 — Log

    Résoudre le ticket http://www.mediaspip.net/ticket/gestion-des-spam
    En gros, si pas de statut dans l’url, on passe le statut pour tous les message qui équivaut à un array de prop et publie.
    On est obligé de surcharger boutons-filtre-statut-forum pour gérer correctement les liens
    Passage en 1.1.4

  • Revision 4220 : La gestion des champs extras fonctionne (au moins pour les articles ... à ...

    25 octobre 2010, par kent1 — Log

    La gestion des champs extras fonctionne (au moins pour les articles ... à tester pour le reste)

  • How to get state of the streaming source in GStreamer-Python ?

    17 février 2023, par doruk.sonmez

    I'm trying to analyze and take actions depending on the current state of the streaming source in gstreamer. I have a basic script to create pipeline elements, linking them and eventually see the live IP camera stream on my screen. However, most of the IP cameras seems to stop streaming the video at some point. The camera IP is accessible but RTSP drops the connection or displaying an all-black screen. I want to detect when the stream gets dropped and create a controlling interval to reconnect to the stream again. I'm already listening some bus messages at runtime but it doesn't seem like any of them is providing what I need.

    &#xA;

    It would be great to have some ideas on how to check the state of the stream at any given time.

    &#xA;

    Here is a basic blocks from my code :

    &#xA;

    def on_src_pad_added(src, new_pad, depayer):&#xA;    sink_pad = depayer.get_static_pad("sink")&#xA;&#xA;    if(sink_pad.is_linked()):&#xA;        print("We are already linked. Ignoring.")&#xA;        return&#xA;&#xA;    # check the new pad&#x27;s type&#xA;    new_pad_caps = new_pad.get_current_caps()&#xA;    new_pad_struct = new_pad_caps.get_structure(0)&#xA;    new_pad_type = new_pad_struct.get_name()&#xA;&#xA;    ret = new_pad.link(sink_pad)&#xA;    return&#xA;&#xA;def gst_to_opencv(sample):&#xA;    buf = sample.get_buffer()&#xA;    caps = sample.get_caps()&#xA;&#xA;    arr = np.ndarray(&#xA;        (caps.get_structure(0).get_value(&#x27;height&#x27;),&#xA;         caps.get_structure(0).get_value(&#x27;width&#x27;),&#xA;         3),&#xA;        buffer=buf.extract_dup(0, buf.get_size()),&#xA;        dtype=np.uint8)&#xA;    return arr&#xA;&#xA;def new_buffer(sink, data):&#xA;    global image_arr&#xA;    sample = sink.emit("pull-sample")&#xA;    arr = gst_to_opencv(sample)&#xA;    image_arr = arr&#xA;    return Gst.FlowReturn.OK&#xA;

    &#xA;

    After these callbacks I'm constructing my pipeline :

    &#xA;

    def main():&#xA;    # Standard GStreamer initialization&#xA;    GObject.threads_init()&#xA;    Gst.init(None)&#xA;&#xA;    # Create gstreamer elements&#xA;    # Create Pipeline element that will form a connection of other elements&#xA;    print("Creating Pipeline \n ")&#xA;    pipeline = Gst.Pipeline()&#xA;&#xA;    if not pipeline:&#xA;        sys.stderr.write(" Unable to create Pipeline \n")&#xA;&#xA;    # Source element for reading from the file&#xA;    print("Creating Source \n ")&#xA;    source = Gst.ElementFactory.make("rtspsrc", "rtsp-cam-source")&#xA;    if not source:&#xA;        sys.stderr.write(" Unable to create Source \n")&#xA;&#xA;    depay = Gst.ElementFactory.make("rtph264depay", "rtp-depay")&#xA;    if not depay:&#xA;        sys.stderr.write(" Unable to create videoconvert \n")&#xA;&#xA;    parser = Gst.ElementFactory.make("h264parse", "h264-parser")&#xA;    if not parser:&#xA;        sys.stderr.write(" Unable to create videoconvert \n")&#xA;&#xA;    decoder = Gst.ElementFactory.make("avdec_h264", "h264-decoder")&#xA;    if not decoder:&#xA;        sys.stderr.write(" Unable to create videoconvert \n")&#xA;...&#xA;&#xA;Set plugin properties...&#xA;Add plugins to the pipeline...&#xA;Link plugins...&#xA;...&#xA;&#xA;

    &#xA;

    Lastly, my live streaming and message listening block is as follows :

    &#xA;

    ...&#xA;# start play back and listen to events&#xA;    print("Starting pipeline \n")&#xA;    ret = pipeline.set_state(Gst.State.PLAYING)&#xA;    if ret == Gst.StateChangeReturn.FAILURE:&#xA;        print("Unable to set the pipeline to the playing state.")&#xA;        exit(-1)&#xA;&#xA;    # create an event loop and feed gstreamer bus mesages to it&#xA;    bus = pipeline.get_bus()&#xA;    bus.add_signal_watch()&#xA;    &#xA;    # Parse message&#xA;    while True:&#xA;        pipe_state = pipeline.get_state(Gst.CLOCK_TIME_NONE)&#xA;        print(pipe_state.state)&#xA;&#xA;        message = bus.timed_pop_filtered(10000, Gst.MessageType.ANY)&#xA;        if image_arr is not None:   &#xA;            cv2.imshow("Receive Image from Pipeline Buffer", image_arr)&#xA;            if cv2.waitKey(1) == ord(&#x27;q&#x27;):&#xA;                break&#xA;        if message:&#xA;            if message.type == Gst.MessageType.ERROR:&#xA;                err, debug = message.parse_error()&#xA;                print(("Error received from element %s: %s" % (&#xA;                    message.src.get_name(), err)))&#xA;                print(("Debugging information: %s" % debug))&#xA;                break&#xA;            elif message.type == Gst.MessageType.EOS:&#xA;                print("End-Of-Stream reached.")&#xA;                break&#xA;            elif message.type == Gst.MessageType.STATE_CHANGED:&#xA;                if isinstance(message.src, Gst.Pipeline):&#xA;                    old_state, new_state, pending_state = message.parse_state_changed()&#xA;                    print(("Pipeline state changed from %s to %s." %&#xA;                        (old_state.value_nick, new_state.value_nick)))&#xA;            else:&#xA;                # print(message.type)&#xA;                continue&#xA;&#xA;    # cleanup&#xA;    pipeline.set_state(Gst.State.NULL)&#xA;    pipeline.send_event(Gst.Event.new_eos())&#xA;

    &#xA;