Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (56)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (8782)

  • Use ffmpeg as external tool to stream 2 or more different sources via pipeline

    25 février 2021, par StackDOX

    I have an application running on an embedded system. This application has 2 video sources (and, theorically, 1 audio source). Concentrating to the video sources, I have 2 subprocess that computes different frames sets (unrelated each others). I want to send these frames to 2 differents streams.

    


    I would to avoid to write a lot of ffmpeg/libav code. I have ffmpeg compiled for the embeeded system and I can use it as tool. For example, I can write to the stdout the first frames set and pass it to the ffmpeg like this :

    


    ./my_app|ffmpeg -an -i - -vcodec copy -f rtp rtp://"remote_ip

    


    This basically works. But, now i would to send the other one frame set. How to do that ? Theorically I need anoter ffmpeg instance that read from another source that can't be the stdout of "my_app", because is already busy.

    



    


    I'm thinking to use 2 video files as support. I can record the 2 frames sets into 2 video files and then run 2 ffmpeg instances from these sources. In this case I think I need a way to limit the video files dimensions (like a circular buffer), because 2 streams can become really huge in time. It is a possibility ?
This can sound "weird" to me : I need to record a video source in realtime and stream it via ffmpeg (always in realtime). I don't know if it is a good idea, there are realtime problems for sure :

    


    loop:
my_app --write_into--> video_stream1.mp4 
ffmpeg <--read_from-- video_stream1.mp4

my_app --write_into--> video_stream2.mp4 
ffmpeg <--read_from-- video_stream2.mp4


    


    Have you some suggestion to address this kind of situation ?

    


    many thanks, bye.

    


  • Anomalie #4633 (Nouveau) : argument ’date’ du pipeline optimiser_base_disparus

    18 janvier 2021, par Maïeul Rouquette

    Hop,

    dans mes logs j’ai ceci

    2021-01-18 18:22:16 127.0.0.1 (pid 13677) :Pri:ERREUR : Erreur 1525 de mysql : Incorrect TIMESTAMP value : ’’2021-01-17 18:22:16’’
    in /home/mrouquet/Sites/dev/localhost/plugins-dist/forum/forum_pipelines.php L308 [sql_delete(),forum_optimiser_base_disparus(),minipipe(),execute_pipeline_optimiser_base_disparus(),pipeline(),optimiser_base_disparus(),optimiser_base(),genie_optimiser_dist(),queue_start_job(),queue_schedule(),action_forcer_job_dist(),traiter_appels_actions()]
    DELETE FROM `spip_localhost`.spip_forum
    WHERE statut=’redac’ AND maj &lt ; ’\’2021-01-17 18:22:16\’’
    2021-01-18 18:22:16 127.0.0.1 (pid 13677) :Pri:ERREUR : Erreur 1525 de mysql : Incorrect TIMESTAMP value : ’’2021-01-17 18:22:16’’
    in /home/mrouquet/Sites/dev/localhost/plugins-dist/mots/mots_pipelines.php L97 [sql_delete(),mots_optimiser_base_disparus(),minipipe(),execute_pipeline_optimiser_base_disparus(),pipeline(),optimiser_base_disparus(),optimiser_base(),genie_optimiser_dist(),queue_start_job(),queue_schedule(),action_forcer_job_dist(),traiter_appels_actions()]
    DELETE FROM `spip_localhost`.spip_mots
    WHERE length(titre)=0 AND maj &lt ; ’\’2021-01-17 18:22:16\’’
    2021-01-18 18:22:16 127.0.0.1 (pid 13677) :Pri:ERREUR : Erreur 1525 de mysql : Incorrect TIMESTAMP value : ’’2021-01-17 18:22:16’’
    in /home/mrouquet/Sites/dev/localhost/plugins-dist/petitions/petitions_pipelines.php L58 [sql_delete(),petitions_optimiser_base_disparus(),minipipe(),execute_pipeline_optimiser_base_disparus(),pipeline(),optimiser_base_disparus(),optimiser_base(),genie_optimiser_dist(),queue_start_job(),queue_schedule(),action_forcer_job_dist(),traiter_appels_actions()]
    DELETE FROM `spip_localhost`.spip_petitions
    WHERE statut=’poubelle’ AND maj &lt ; ’\’2021-01-17 18:22:16\’’
    2021-01-18 18:22:16 127.0.0.1 (pid 13677) :Pri:ERREUR : Erreur 1525 de mysql : Incorrect TIMESTAMP value : ’’2021-01-17 18:22:16’’
    in /home/mrouquet/Sites/dev/localhost/plugins-dist/sites/sites_pipelines.php L228 [sql_delete(),sites_optimiser_base_disparus(),minipipe(),execute_pipeline_optimiser_base_disparus(),pipeline(),optimiser_base_disparus(),optimiser_base(),genie_optimiser_dist(),queue_start_job(),queue_schedule(),action_forcer_job_dist(),traiter_appels_actions()]
    DELETE FROM `spip_localhost`.spip_syndic
    WHERE maj&lt ;’\’2021-01-17 18:22:16\’’ AND statut=’refuse’
    2021-01-18 18:22:16 127.0.0.1 (pid 13677) :Pri:ERREUR : Erreur 1525 de mysql : Incorrect TIMESTAMP value : ’’2021-01-17 18:22:16’’
    in /home/mrouquet/Sites/dev/localhost/plugins-dist/breves/breves_pipelines.php L298 [sql_select(),breves_optimiser_base_disparus(),minipipe(),execute_pipeline_optimiser_base_disparus(),pipeline(),optimiser_base_disparus(),optimiser_base(),genie_optimiser_dist(),queue_start_job(),queue_schedule(),action_forcer_job_dist(),traiter_appels_actions()]
    SELECT B.id_breve AS id
    FROM `spip_localhost`.spip_breves AS B
                LEFT JOIN `spip_localhost`.spip_rubriques AS R
                    ON B.id_rubrique=R.id_rubrique
    WHERE R.id_rubrique IS NULL
                AND B.maj &lt ; ’\’2021-01-17 18:22:16\’’

    Cela vient du fait que $flux[’args’][’date’] du pipeline optimiser_base_disparus est valeur qui est déjà passé par sql_quote(). (cf. fonction `optimiser_base_disparus` du code, qui contient la ligne (`$mydate = sql_quote(date("Y-m-d H:i:s", time() - $attente)) ;`)

    Or la plupart des plugin(-dist) qui utilise ce paramètre $flux[’args’][’date’] pour construire leur requete passe en sql_quote. Du couip double sql_quote.

    La question que je me pose : faut-il corriger les plugins(-dist) ou le core ?

  • AVPacket to Gstreamer pipeline

    30 décembre 2020, par harry_tums

    My goal is to demux video stream in libav and then decode it in GStreamer.

    


    My approach is to take AVPacket from the video stream in the first thread and send it to GStreamer pipeline by appsrc element in the second thread. Important parts of code are here :

    


    // -- THREAD 1 --    
// Take data from AVPacket
img_data = (guchar *)packet.data;
size = packet.size;
// Create GStreamer buffer
buffer = gst_buffer_new_allocate(NULL, size, NULL);
gst_buffer_map(buffer, &map, GST_MAP_WRITE);
memcpy((guchar *)map.data, img_data, gst_buffer_get_size(buffer));
map.size = size;
gst_buffer_unmap(buffer, &map);
// Send the buffer to appsrc element in the pipeline.
gstret = gst_app_src_push_buffer((GstAppSrc *)app_source, buffer);

// -- THREAD 2 --
// A video cap for appsrc element
const gchar *video_caps = "video/x-theora, width=1920, height=1080, framerate=30/1";
// GStreamer pipeline
string = g_strdup_printf("appsrc name=testsource caps=\"%s\" ! theoradec ! videoconvert ! autovideosink", video_caps);


    


    However, I am getting following error :

    


    


    ERROR from element theoradec0 : Could not decode stream.
Debugging info : gsttheoradec.c(812) : theora_handle_data_packet () : /GstPipeline:pipeline0/GstTheoraDec:theoradec0 : no header sent yet

    


    


    Also the gst_app_src_push_buffer function returns GstFlowReturn of value -2, which means "Pad is flushing." according the documentation. But I am not sure what it means (I could not find it).

    


    To find the error, I tried two GStreamer pipelines to ensure that I can demux the video stream in the first pipeline and decode it in the second pipeline. And it works :

    


    const gchar *video_caps = "video/x-theora, width=1920, height=1080, framerate=30/1";
p1_str = g_strdup_printf("filesrc location=\"%s\" ! oggdemux ! appsink caps=\"%s\" name=testsink", filename, video_caps);
p2_str = g_strdup_printf("appsrc name=testsource caps=\"%s\" ! theoradec ! videoconvert ! autovideosink", video_caps);


    


    Then, I also tried to decode the AVPacket to AVFrame by libav and then send to the GStreamer pipeline to ensure I can create GStreamer buffer from AVFrame. And it also works :

    


    -- THREAD 1 --
// Decode.
avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);
img_data = (guchar *)pFrame->data;
// same way as before.

-- THREAD 2 --
const gchar *video_caps = "video/x-raw, format=BGR, width=1920, height=1080, framerate=30/1";
string = g_strdup_printf("appsrc name=testsource caps=\"%s\" ! videoconvert ! autovideosink", video_caps);


    


    All this is tested on this video file :

    


    container: ogg
codec: Theora
dim: 1920x1080
framerate: 30fps


    


    What causes the error ? Is it caused by sending data with wrong format to GStreamer pipeline ? Or the theoradec element is not set right ? And what does "Pad is flushing." mean ?