Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (42)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (8673)

  • FFMpeg C++ How to create a filter with multiple outputs ?

    11 septembre 2020, par GoodSimon

    For example, we have one AVFrame with a size of 128x128 pixels and the task is to split the AVFrame into 4 parts (4 separate AVFrame). To do this, I fill the graph with filters using the avfilter_graph_parse2(...) function, and then call avfilter_graph_config(...).

    


    Let's start. Let's cut out the top left corner. To crop a frame, we need to use the crop filter, which means we initialize the AVFilterGraph graph with the line :

    


    buffer = width = 128: height = 128: pix_fmt = 2: time_base = 1/25, pixel_aspect = 128/64 [pad_in];
[pad_in] crop = w = 64: h = 64: x = 0: y = 0, buffersink;


    


    Everything works great ! Now let's try to make several outputs :

    


    buffer = width = 128: height = 128: pix_fmt = 2: time_base = 1/25, pixel_aspect = 128/64 [pad_in];
[pad_in] crop = w = 64: h = 64: x = 0: y = 0, buffersink;
[pad_in] crop = w = 64: h = 64: x = 64: y = 0, buffersink;
[pad_in] crop = w = 64: h = 64: x = 0: y = 64, buffersink;
[pad_in] crop = w = 64: h = 64: x = 64: y = 64, buffersink


    


    As you can see, we have one buffer for the input image, 4 crop filters for cutting each piece, and 4 buffersink filters for the output images. The call avfilter_graph_parse2(...) returns 0, which is good, but avfilter_graph_config() returns the error code -22 == AVERROR(EINVAL) and the message is output to the console : Input pad "default" with type video of the filter instance "Parsed_crop_3" of crop not connected to any source.

    


    I am asking for your help in creating a filter with multiple outputs.

    


  • FFmpeg encoding through h264_qsv : pts < dts

    29 décembre 2023, par Mario

    I'm modifying a portion of code that encodes input frames in an output mp4 file via the h264 software encoder which works quite well. Most of the code comes from https://ffmpeg.org/doxygen/6.0/mux_8c-example.html.

    &#xA;

    I changed the "working" code to use the h264_qsv hardware accelerated encoder. After a lot of work the new code produces h264 encoded frames. For testing purpose I can write them with

    &#xA;

    &#xA;

    fwrite(pkt->data, pkt->size, 1, fout)

    &#xA;

    &#xA;

    and mpv displays frames correctly (with some warnings).

    &#xA;

    When I use regular :

    &#xA;

    &#xA;

    av_interleaved_write_frame(fmt_ctx, pkt)

    &#xA;

    &#xA;

    (as from previously working code) returns an error and on stderr :

    &#xA;

    &#xA;

    [mp4 @ 0x7f82a80b3b40] pts (-1574122160956548608) < dts&#xA;(1574122160956547584) in stream 0

    &#xA;

    &#xA;

    To look for the cause I added the following lines just before av_interleaved_write_frame(). I read that it may be a non-fatal error and so I continue after the errors, but there isn't output.

    &#xA;

    &#xA;

    frame->pts=210
    &#xA;pkt->pts=-1574122160956548608
    &#xA;pkt->dts=1574122160956547584
    &#xA;[mp4 @ 0x7effb40b3b40] pts (-1574122160956548608) < dts (1574122160956547584) in stream 0
    &#xA;...
    &#xA;frame->pts=240
    &#xA;pkt->pts=-1574122160956548608
    &#xA;pkt->dts=1574122160956548096
    &#xA;[mp4 @ 0x7effb40b3b40] pts (-1574122160956548608) < dts (1574122160956548096) in stream 0

    &#xA;

    &#xA;

    I did another test assigning incremental values to pkt->pts and pkt->dts, it works but resulting fps is wrong, and I don't think it is the right solution !

    &#xA;

    Why does the av_interleaved_write_frame(fmt_ctx, pkt) function returns an error with h264_qsv encoder ? Who should set pkt->pts and pkt->dts ?

    &#xA;

  • rtsp timeout av_read_frame

    30 novembre 2012, par user1175197

    I am using ffmpeg to play an RTSP stream. I have a loop like

       while (av_read_frame(formatContext, packet)>=0)
       {
         doWork();
       }

    I can watch the stream as long as there is something moving in front of the camera. But whenever the view is stable the above function returns EOF as I checked with av_strerror. Any ideas why and how to fix it ?

    thanks