Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (43)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (6039)

  • FFmpeg.Autogen : Issue with Zero-Sized Atom Boxes in MP4 Output

    16 juin 2024, par Alexander Jansson

    I just started learning ffmpeg using ffmpeg.autogen wrapper version 5.1 in c#, and ffmpeg shared libs version 5.1. Im trying to facilitate a class which screenrecords using gdigrab and produces streamable mp4 to a/an buffer/event. Everything seems to work as suposed to with no error except that the outputstream produces atom boxes with 0 in size thus small file size aswell, no data seems to be produced in the boxes, the "debug test mp4 file" is analyzed with MP4Box and the box info is provided in the thread.

    


    To be more specific why does this code produce empty atomboxes, is someone able to make the data produced actually contain any frame data from the gdigrab editing my code ?

    


    `code :

    


     public unsafe class ScreenStreamer : IDisposable
 {
     private readonly AVCodec* productionCodec;
     private readonly AVCodec* screenCaptureAVCodec;
     private readonly AVCodecContext* productionAVCodecContext;
     private readonly AVFormatContext* productionFormatContext;
     private readonly AVCodecContext* screenCaptureAVCodecContext;
     private readonly AVDictionary* productionAVCodecOptions;
     private readonly AVInputFormat* screenCaptureInputFormat;
     private readonly AVFormatContext* screenCaptureInputFormatContext;
     private readonly int gDIGrabVideoStreamIndex;
     private readonly System.Drawing.Size screenBounds;
     private readonly int _produceAtleastAmount;
     public EventHandler OnNewVideoDataProduced;
     private MemoryStream unsafeToManagedBridgeBuffer;
     private CancellationTokenSource cancellationTokenSource;
     private Task recorderTask;

     public ScreenStreamer(int fps, int bitrate, int screenIndex, int produceAtleastAmount = 1000)
     {
         ffmpeg.avdevice_register_all();
         ffmpeg.avformat_network_init();
         recorderTask = Task.CompletedTask;
         cancellationTokenSource = new CancellationTokenSource();
         unsafeToManagedBridgeBuffer = new MemoryStream();
         _produceAtleastAmount = produceAtleastAmount;

         // Allocate and initialize production codec and context
         productionCodec = ffmpeg.avcodec_find_encoder(AVCodecID.AV_CODEC_ID_H264);
         if (productionCodec == null) throw new ApplicationException("Could not find encoder for codec ID H264.");

         productionAVCodecContext = ffmpeg.avcodec_alloc_context3(productionCodec);
         if (productionAVCodecContext == null) throw new ApplicationException("Could not allocate video codec context.");

         // Set codec parameters
         screenBounds = RetrieveScreenBounds(screenIndex);
         productionAVCodecContext->width = screenBounds.Width;
         productionAVCodecContext->height = screenBounds.Height;
         productionAVCodecContext->time_base = new AVRational() { den = fps, num = 1 };
         productionAVCodecContext->pix_fmt = AVPixelFormat.AV_PIX_FMT_YUV420P;
         productionAVCodecContext->bit_rate = bitrate;

         int result = ffmpeg.av_opt_set(productionAVCodecContext->priv_data, "preset", "veryfast", 0);
         if (result != 0)
         {
             throw new ApplicationException($"Failed to set options with error code {result}.");
         }

         // Open codec
         fixed (AVDictionary** pm = &productionAVCodecOptions)
         {
             result = ffmpeg.av_dict_set(pm, "movflags", "frag_keyframe+empty_moov+default_base_moof", 0);
             if (result < 0)
             {
                 throw new ApplicationException($"Failed to set dictionary with error code {result}.");
             }

             result = ffmpeg.avcodec_open2(productionAVCodecContext, productionCodec, pm);
             if (result < 0)
             {
                 throw new ApplicationException($"Failed to open codec with error code {result}.");
             }
         }

         // Allocate and initialize screen capture codec and context
         screenCaptureInputFormat = ffmpeg.av_find_input_format("gdigrab");
         if (screenCaptureInputFormat == null) throw new ApplicationException("Could not find input format gdigrab.");

         fixed (AVFormatContext** ps = &screenCaptureInputFormatContext)
         {
             result = ffmpeg.avformat_open_input(ps, "desktop", screenCaptureInputFormat, null);
             if (result < 0)
             {
                 throw new ApplicationException($"Failed to open input with error code {result}.");
             }

             result = ffmpeg.avformat_find_stream_info(screenCaptureInputFormatContext, null);
             if (result < 0)
             {
                 throw new ApplicationException($"Failed to find stream info with error code {result}.");
             }
         }

         gDIGrabVideoStreamIndex = -1;
         for (int i = 0; i < screenCaptureInputFormatContext->nb_streams; i++)
         {
             if (screenCaptureInputFormatContext->streams[i]->codecpar->codec_type == AVMediaType.AVMEDIA_TYPE_VIDEO)
             {
                 gDIGrabVideoStreamIndex = i;
                 break;
             }
         }

         if (gDIGrabVideoStreamIndex < 0)
         {
             throw new ApplicationException("Failed to find video stream in input.");
         }

         AVCodecParameters* codecParameters = screenCaptureInputFormatContext->streams[gDIGrabVideoStreamIndex]->codecpar;
         screenCaptureAVCodec = ffmpeg.avcodec_find_decoder(codecParameters->codec_id);
         if (screenCaptureAVCodec == null)
         {
             throw new ApplicationException("Could not find decoder for screen capture.");
         }

         screenCaptureAVCodecContext = ffmpeg.avcodec_alloc_context3(screenCaptureAVCodec);
         if (screenCaptureAVCodecContext == null)
         {
             throw new ApplicationException("Could not allocate screen capture codec context.");
         }

         result = ffmpeg.avcodec_parameters_to_context(screenCaptureAVCodecContext, codecParameters);
         if (result < 0)
         {
             throw new ApplicationException($"Failed to copy codec parameters to context with error code {result}.");
         }

         result = ffmpeg.avcodec_open2(screenCaptureAVCodecContext, screenCaptureAVCodec, null);
         if (result < 0)
         {
             throw new ApplicationException($"Failed to open screen capture codec with error code {result}.");
         }
     }

     public void Start()
     {
         recorderTask = Task.Run(() =>
         {
             AVPacket* packet = ffmpeg.av_packet_alloc();
             AVFrame* rawFrame = ffmpeg.av_frame_alloc();
             AVFrame* compatibleFrame = null;
             byte* dstBuffer = null;

             try
             {
                 while (!cancellationTokenSource.Token.IsCancellationRequested)
                 {
                     if (ffmpeg.av_read_frame(screenCaptureInputFormatContext, packet) >= 0)
                     {
                         if (packet->stream_index == gDIGrabVideoStreamIndex)
                         {
                             int response = ffmpeg.avcodec_send_packet(screenCaptureAVCodecContext, packet);
                             if (response < 0)
                             {
                                 throw new ApplicationException($"Error while sending a packet to the decoder: {response}");
                             }

                             response = ffmpeg.avcodec_receive_frame(screenCaptureAVCodecContext, rawFrame);
                             if (response == ffmpeg.AVERROR(ffmpeg.EAGAIN) || response == ffmpeg.AVERROR_EOF)
                             {
                                 continue;
                             }
                             else if (response < 0)
                             {
                                 throw new ApplicationException($"Error while receiving a frame from the decoder: {response}");
                             }

                             compatibleFrame = ConvertToCompatiblePixelFormat(rawFrame, out dstBuffer);

                             response = ffmpeg.avcodec_send_frame(productionAVCodecContext, compatibleFrame);
                             if (response < 0)
                             {
                                 throw new ApplicationException($"Error while sending a frame to the encoder: {response}");
                             }

                             while (response >= 0)
                             {
                                 response = ffmpeg.avcodec_receive_packet(productionAVCodecContext, packet);
                                 if (response == ffmpeg.AVERROR(ffmpeg.EAGAIN) || response == ffmpeg.AVERROR_EOF)
                                 {
                                     break;
                                 }
                                 else if (response < 0)
                                 {
                                     throw new ApplicationException($"Error while receiving a packet from the encoder: {response}");
                                 }

                                 using var packetStream = new UnmanagedMemoryStream(packet->data, packet->size);
                                 packetStream.CopyTo(unsafeToManagedBridgeBuffer);
                                 byte[] managedBytes = unsafeToManagedBridgeBuffer.ToArray();
                                 OnNewVideoDataProduced?.Invoke(this, managedBytes);
                                 unsafeToManagedBridgeBuffer.SetLength(0);
                             }
                         }
                     }
                     ffmpeg.av_packet_unref(packet);
                     ffmpeg.av_frame_unref(rawFrame);
                     if (compatibleFrame != null)
                     {
                         ffmpeg.av_frame_unref(compatibleFrame);
                         ffmpeg.av_free(dstBuffer);
                     }
                 }
             }
             finally
             {
                 ffmpeg.av_packet_free(&packet);
                 ffmpeg.av_frame_free(&rawFrame);
                 if (compatibleFrame != null)
                 {
                     ffmpeg.av_frame_free(&compatibleFrame);
                 }
             }
         });
     }

     public AVFrame* ConvertToCompatiblePixelFormat(AVFrame* srcFrame, out byte* dstBuffer)
     {
         AVFrame* dstFrame = ffmpeg.av_frame_alloc();
         int buffer_size = ffmpeg.av_image_get_buffer_size(productionAVCodecContext->pix_fmt, productionAVCodecContext->width, productionAVCodecContext->height, 1);
         byte_ptrArray4 dstData = new byte_ptrArray4();
         int_array4 dstLinesize = new int_array4();
         dstBuffer = (byte*)ffmpeg.av_malloc((ulong)buffer_size);
         ffmpeg.av_image_fill_arrays(ref dstData, ref dstLinesize, dstBuffer, productionAVCodecContext->pix_fmt, productionAVCodecContext->width, productionAVCodecContext->height, 1);

         dstFrame->format = (int)productionAVCodecContext->pix_fmt;
         dstFrame->width = productionAVCodecContext->width;
         dstFrame->height = productionAVCodecContext->height;
         dstFrame->data.UpdateFrom(dstData);
         dstFrame->linesize.UpdateFrom(dstLinesize);

         SwsContext* swsCtx = ffmpeg.sws_getContext(
             srcFrame->width, srcFrame->height, (AVPixelFormat)srcFrame->format,
             productionAVCodecContext->width, productionAVCodecContext->height, productionAVCodecContext->pix_fmt,
             ffmpeg.SWS_BILINEAR, null, null, null);

         if (swsCtx == null)
         {
             throw new ApplicationException("Could not initialize the conversion context.");
         }

         ffmpeg.sws_scale(swsCtx, srcFrame->data, srcFrame->linesize, 0, srcFrame->height, dstFrame->data, dstFrame->linesize);
         ffmpeg.sws_freeContext(swsCtx);
         return dstFrame;
     }

     private System.Drawing.Size RetrieveScreenBounds(int screenIndex)
     {
         return new System.Drawing.Size(1920, 1080);
     }

     public void Dispose()
     {
         cancellationTokenSource?.Cancel();
         recorderTask?.Wait();
         cancellationTokenSource?.Dispose();
         recorderTask?.Dispose();
         unsafeToManagedBridgeBuffer?.Dispose();

         fixed (AVCodecContext** p = &productionAVCodecContext)
         {
             if (*p != null)
             {
                 ffmpeg.avcodec_free_context(p);
             }
         }
         fixed (AVCodecContext** p = &screenCaptureAVCodecContext)
         {
             if (*p != null)
             {
                 ffmpeg.avcodec_free_context(p);
             }
         }

         if (productionFormatContext != null)
         {
             ffmpeg.avformat_free_context(productionFormatContext);
         }

         if (screenCaptureInputFormatContext != null)
         {
             ffmpeg.avformat_free_context(screenCaptureInputFormatContext);
         }

         if (productionAVCodecOptions != null)
         {
             fixed (AVDictionary** p = &productionAVCodecOptions)
             {
                 ffmpeg.av_dict_free(p);
             }
         }
     }
 }


    


    I call Start method and wait 8 econds, out of scope I write the bytes to an mp4 file without using the write trailer just to debug the atomboxes. and the mp4 debugging box output I got :

    


    (Full OUTPUT)
https://pastebin.com/xkM4MfG7

    



    


    (Not full)

    


    &#xA;&#xA;"&#xA;<boxes>&#xA;<uuidbox size="0" type="uuid" uuid="{00000000-00000000-00000000-00000000}" specification="unknown" container="unknown">&#xA;</uuidbox>&#xA;<trackreferencetypebox size="0" type="cdsc" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="hint" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="font" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="hind" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="vdep" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="vplx" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="subt" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="thmb" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="mpod" specification="p14" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="dpnd" specification="p14" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="sync" specification="p14" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="ipir" specification="p14" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="sbas" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="scal" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="tbas" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="sabt" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="oref" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="adda" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="adrc" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="iloc" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="avcp" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="swto" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="swfr" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="chap" specification="apple" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="tmcd" specification="apple" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="cdep" specification="apple" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="scpt" specification="apple" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="ssrc" specification="apple" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="lyra" specification="apple" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<itemreferencebox size="0" type="tbas" specification="p12" container="iref">&#xA;<itemreferenceboxentry itemid=""></itemreferenceboxentry>&#xA;</itemreferencebox>&#xA;<itemreferencebox size="0" type="iloc" specification="p12" container="iref">&#xA;<itemreferenceboxentry itemid=""></itemreferenceboxentry>&#xA;</itemreferencebox>&#xA;<itemreferencebox size="0" type="fdel" specification="p12" container="iref">&#xA;<itemreferenceboxentry itemid=""></itemreferenceboxentry>&#xA;</itemreferencebox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<rollrecoveryentry></rollrecoveryentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<audioprerollentry></audioprerollentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<visualrandomaccessentry></visualrandomaccessentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<cencsampleencryptiongroupentry isencrypted="" kid=""></cencsampleencryptiongroupentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<operatingpointsinformation>&#xA; <profiletierlevel></profiletierlevel>&#xA;<operatingpoint minpicwidth="" minpicheight="" maxpicwidth="" maxpicheight="" maxchromaformat="" maxbitdepth="" avgframerate="" constantframerate="" maxbitrate="" avgbitrate=""></operatingpoint>&#xA;&#xA;</operatingpointsinformation>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<layerinformation>&#xA;<layerinfoitem></layerinfoitem>&#xA;</layerinformation>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<tileregiongroupentry tilegroup="" independent="" x="" y="" w="" h="">&#xA;<tileregiondependency tileid=""></tileregiondependency>&#xA;</tileregiongroupentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<nalumap rle="">&#xA;<nalumapentry groupid=""></nalumapentry>&#xA;</nalumap>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<temporallevelentry></temporallevelentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<sapentry></sapentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<syncsamplegroupentry></syncsamplegroupentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<subpictureorderentry refs=""></subpictureorderentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="3gpp" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="3gpp" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<sampledescriptionentrybox size="0" type="GNRM" specification="unknown" container="stsd" extensiondatasize="0">&#xA;</sampledescriptionentrybox>&#xA;<visualsampledescriptionbox size="0" type="GNRV" specification="unknown" container="stsd" version="0" revision="0" vendor="0" temporalquality="0" spacialquality="0" width="0" height="0" horizontalresolution="4718592" verticalresolution="4718592" compressorname="" bitdepth="24">&#xA;</visualsampledescriptionbox>&#xA;<audiosampledescriptionbox size="0" type="GNRA" specification="unknown" container="stsd" version="0" revision="0" vendor="0" channelcount="2" bitspersample="16" samplerate="0">&#xA;</audiosampledescriptionbox>&#xA;<trackgrouptypebox size="0" type="msrc" version="0" flags="0" specification="p12" container="trgr">&#xA;</trackgrouptypebox>&#xA;<trackgrouptypebox size="0" type="ster" version="0" flags="0" specification="p12" container="trgr">&#xA;</trackgrouptypebox>&#xA;<trackgrouptypebox size="0" type="cstg" version="0" flags="0" specification="p15" container="trgr">&#xA;</trackgrouptypebox>&#xA;<freespacebox size="0" type="free" specification="p12" container="*">&#xA;</freespacebox>&#xA;<freespacebox size="0" type="free" specification="p12" container="*">&#xA;</freespacebox>&#xA;<mediadatabox size="0" type="mdat" specification="p12" container="file">&#xA;</mediadatabox>&#xA;<mediadatabox size="0" type="mdat" specification="p12" container="meta">&#xA;"&#xA;</mediadatabox></boxes>

    &#xA;

  • FFmpeg.Autogen Wrapper : Issue with Zero-Sized Atom Boxes in MP4 Output

    11 juin 2024, par Alexander Jansson

    I just started learning ffmpeg using ffmpeg.autogen wrapper version 5.1 in c#, and ffmpeg shared libs version 5.1. Im trying to facilitate a class which screenrecords using gdigrab and produces streamable mp4 to a/an buffer/event. Everything seems to work as suposed to with no error except that the outputstream produces atom boxes with 0 in size thus small file size aswell, no data seems to be produced in the boxes, the "debug test mp4 file" is analyzed with MP4Box and the box info is provided in the thread.

    &#xA;

    To be more specific why does this code produce empty atomboxes, is someone able to make the data produced actually contain any frame data from the gdigrab editing my code ?

    &#xA;

    `code :

    &#xA;

     public unsafe class ScreenStreamer : IDisposable&#xA; {&#xA;     private readonly AVCodec* productionCodec;&#xA;     private readonly AVCodec* screenCaptureAVCodec;&#xA;     private readonly AVCodecContext* productionAVCodecContext;&#xA;     private readonly AVFormatContext* productionFormatContext;&#xA;     private readonly AVCodecContext* screenCaptureAVCodecContext;&#xA;     private readonly AVDictionary* productionAVCodecOptions;&#xA;     private readonly AVInputFormat* screenCaptureInputFormat;&#xA;     private readonly AVFormatContext* screenCaptureInputFormatContext;&#xA;     private readonly int gDIGrabVideoStreamIndex;&#xA;     private readonly System.Drawing.Size screenBounds;&#xA;     private readonly int _produceAtleastAmount;&#xA;     public EventHandler OnNewVideoDataProduced;&#xA;     private MemoryStream unsafeToManagedBridgeBuffer;&#xA;     private CancellationTokenSource cancellationTokenSource;&#xA;     private Task recorderTask;&#xA;&#xA;     public ScreenStreamer(int fps, int bitrate, int screenIndex, int produceAtleastAmount = 1000)&#xA;     {&#xA;         ffmpeg.avdevice_register_all();&#xA;         ffmpeg.avformat_network_init();&#xA;         recorderTask = Task.CompletedTask;&#xA;         cancellationTokenSource = new CancellationTokenSource();&#xA;         unsafeToManagedBridgeBuffer = new MemoryStream();&#xA;         _produceAtleastAmount = produceAtleastAmount;&#xA;&#xA;         // Allocate and initialize production codec and context&#xA;         productionCodec = ffmpeg.avcodec_find_encoder(AVCodecID.AV_CODEC_ID_H264);&#xA;         if (productionCodec == null) throw new ApplicationException("Could not find encoder for codec ID H264.");&#xA;&#xA;         productionAVCodecContext = ffmpeg.avcodec_alloc_context3(productionCodec);&#xA;         if (productionAVCodecContext == null) throw new ApplicationException("Could not allocate video codec context.");&#xA;&#xA;         // Set codec parameters&#xA;         screenBounds = RetrieveScreenBounds(screenIndex);&#xA;         productionAVCodecContext->width = screenBounds.Width;&#xA;         productionAVCodecContext->height = screenBounds.Height;&#xA;         productionAVCodecContext->time_base = new AVRational() { den = fps, num = 1 };&#xA;         productionAVCodecContext->pix_fmt = AVPixelFormat.AV_PIX_FMT_YUV420P;&#xA;         productionAVCodecContext->bit_rate = bitrate;&#xA;&#xA;         int result = ffmpeg.av_opt_set(productionAVCodecContext->priv_data, "preset", "veryfast", 0);&#xA;         if (result != 0)&#xA;         {&#xA;             throw new ApplicationException($"Failed to set options with error code {result}.");&#xA;         }&#xA;&#xA;         // Open codec&#xA;         fixed (AVDictionary** pm = &amp;productionAVCodecOptions)&#xA;         {&#xA;             result = ffmpeg.av_dict_set(pm, "movflags", "frag_keyframe&#x2B;empty_moov&#x2B;default_base_moof", 0);&#xA;             if (result &lt; 0)&#xA;             {&#xA;                 throw new ApplicationException($"Failed to set dictionary with error code {result}.");&#xA;             }&#xA;&#xA;             result = ffmpeg.avcodec_open2(productionAVCodecContext, productionCodec, pm);&#xA;             if (result &lt; 0)&#xA;             {&#xA;                 throw new ApplicationException($"Failed to open codec with error code {result}.");&#xA;             }&#xA;         }&#xA;&#xA;         // Allocate and initialize screen capture codec and context&#xA;         screenCaptureInputFormat = ffmpeg.av_find_input_format("gdigrab");&#xA;         if (screenCaptureInputFormat == null) throw new ApplicationException("Could not find input format gdigrab.");&#xA;&#xA;         fixed (AVFormatContext** ps = &amp;screenCaptureInputFormatContext)&#xA;         {&#xA;             result = ffmpeg.avformat_open_input(ps, "desktop", screenCaptureInputFormat, null);&#xA;             if (result &lt; 0)&#xA;             {&#xA;                 throw new ApplicationException($"Failed to open input with error code {result}.");&#xA;             }&#xA;&#xA;             result = ffmpeg.avformat_find_stream_info(screenCaptureInputFormatContext, null);&#xA;             if (result &lt; 0)&#xA;             {&#xA;                 throw new ApplicationException($"Failed to find stream info with error code {result}.");&#xA;             }&#xA;         }&#xA;&#xA;         gDIGrabVideoStreamIndex = -1;&#xA;         for (int i = 0; i &lt; screenCaptureInputFormatContext->nb_streams; i&#x2B;&#x2B;)&#xA;         {&#xA;             if (screenCaptureInputFormatContext->streams[i]->codecpar->codec_type == AVMediaType.AVMEDIA_TYPE_VIDEO)&#xA;             {&#xA;                 gDIGrabVideoStreamIndex = i;&#xA;                 break;&#xA;             }&#xA;         }&#xA;&#xA;         if (gDIGrabVideoStreamIndex &lt; 0)&#xA;         {&#xA;             throw new ApplicationException("Failed to find video stream in input.");&#xA;         }&#xA;&#xA;         AVCodecParameters* codecParameters = screenCaptureInputFormatContext->streams[gDIGrabVideoStreamIndex]->codecpar;&#xA;         screenCaptureAVCodec = ffmpeg.avcodec_find_decoder(codecParameters->codec_id);&#xA;         if (screenCaptureAVCodec == null)&#xA;         {&#xA;             throw new ApplicationException("Could not find decoder for screen capture.");&#xA;         }&#xA;&#xA;         screenCaptureAVCodecContext = ffmpeg.avcodec_alloc_context3(screenCaptureAVCodec);&#xA;         if (screenCaptureAVCodecContext == null)&#xA;         {&#xA;             throw new ApplicationException("Could not allocate screen capture codec context.");&#xA;         }&#xA;&#xA;         result = ffmpeg.avcodec_parameters_to_context(screenCaptureAVCodecContext, codecParameters);&#xA;         if (result &lt; 0)&#xA;         {&#xA;             throw new ApplicationException($"Failed to copy codec parameters to context with error code {result}.");&#xA;         }&#xA;&#xA;         result = ffmpeg.avcodec_open2(screenCaptureAVCodecContext, screenCaptureAVCodec, null);&#xA;         if (result &lt; 0)&#xA;         {&#xA;             throw new ApplicationException($"Failed to open screen capture codec with error code {result}.");&#xA;         }&#xA;     }&#xA;&#xA;     public void Start()&#xA;     {&#xA;         recorderTask = Task.Run(() =>&#xA;         {&#xA;             AVPacket* packet = ffmpeg.av_packet_alloc();&#xA;             AVFrame* rawFrame = ffmpeg.av_frame_alloc();&#xA;             AVFrame* compatibleFrame = null;&#xA;             byte* dstBuffer = null;&#xA;&#xA;             try&#xA;             {&#xA;                 while (!cancellationTokenSource.Token.IsCancellationRequested)&#xA;                 {&#xA;                     if (ffmpeg.av_read_frame(screenCaptureInputFormatContext, packet) >= 0)&#xA;                     {&#xA;                         if (packet->stream_index == gDIGrabVideoStreamIndex)&#xA;                         {&#xA;                             int response = ffmpeg.avcodec_send_packet(screenCaptureAVCodecContext, packet);&#xA;                             if (response &lt; 0)&#xA;                             {&#xA;                                 throw new ApplicationException($"Error while sending a packet to the decoder: {response}");&#xA;                             }&#xA;&#xA;                             response = ffmpeg.avcodec_receive_frame(screenCaptureAVCodecContext, rawFrame);&#xA;                             if (response == ffmpeg.AVERROR(ffmpeg.EAGAIN) || response == ffmpeg.AVERROR_EOF)&#xA;                             {&#xA;                                 continue;&#xA;                             }&#xA;                             else if (response &lt; 0)&#xA;                             {&#xA;                                 throw new ApplicationException($"Error while receiving a frame from the decoder: {response}");&#xA;                             }&#xA;&#xA;                             compatibleFrame = ConvertToCompatiblePixelFormat(rawFrame, out dstBuffer);&#xA;&#xA;                             response = ffmpeg.avcodec_send_frame(productionAVCodecContext, compatibleFrame);&#xA;                             if (response &lt; 0)&#xA;                             {&#xA;                                 throw new ApplicationException($"Error while sending a frame to the encoder: {response}");&#xA;                             }&#xA;&#xA;                             while (response >= 0)&#xA;                             {&#xA;                                 response = ffmpeg.avcodec_receive_packet(productionAVCodecContext, packet);&#xA;                                 if (response == ffmpeg.AVERROR(ffmpeg.EAGAIN) || response == ffmpeg.AVERROR_EOF)&#xA;                                 {&#xA;                                     break;&#xA;                                 }&#xA;                                 else if (response &lt; 0)&#xA;                                 {&#xA;                                     throw new ApplicationException($"Error while receiving a packet from the encoder: {response}");&#xA;                                 }&#xA;&#xA;                                 using var packetStream = new UnmanagedMemoryStream(packet->data, packet->size);&#xA;                                 packetStream.CopyTo(unsafeToManagedBridgeBuffer);&#xA;                                 byte[] managedBytes = unsafeToManagedBridgeBuffer.ToArray();&#xA;                                 OnNewVideoDataProduced?.Invoke(this, managedBytes);&#xA;                                 unsafeToManagedBridgeBuffer.SetLength(0);&#xA;                             }&#xA;                         }&#xA;                     }&#xA;                     ffmpeg.av_packet_unref(packet);&#xA;                     ffmpeg.av_frame_unref(rawFrame);&#xA;                     if (compatibleFrame != null)&#xA;                     {&#xA;                         ffmpeg.av_frame_unref(compatibleFrame);&#xA;                         ffmpeg.av_free(dstBuffer);&#xA;                     }&#xA;                 }&#xA;             }&#xA;             finally&#xA;             {&#xA;                 ffmpeg.av_packet_free(&amp;packet);&#xA;                 ffmpeg.av_frame_free(&amp;rawFrame);&#xA;                 if (compatibleFrame != null)&#xA;                 {&#xA;                     ffmpeg.av_frame_free(&amp;compatibleFrame);&#xA;                 }&#xA;             }&#xA;         });&#xA;     }&#xA;&#xA;     public AVFrame* ConvertToCompatiblePixelFormat(AVFrame* srcFrame, out byte* dstBuffer)&#xA;     {&#xA;         AVFrame* dstFrame = ffmpeg.av_frame_alloc();&#xA;         int buffer_size = ffmpeg.av_image_get_buffer_size(productionAVCodecContext->pix_fmt, productionAVCodecContext->width, productionAVCodecContext->height, 1);&#xA;         byte_ptrArray4 dstData = new byte_ptrArray4();&#xA;         int_array4 dstLinesize = new int_array4();&#xA;         dstBuffer = (byte*)ffmpeg.av_malloc((ulong)buffer_size);&#xA;         ffmpeg.av_image_fill_arrays(ref dstData, ref dstLinesize, dstBuffer, productionAVCodecContext->pix_fmt, productionAVCodecContext->width, productionAVCodecContext->height, 1);&#xA;&#xA;         dstFrame->format = (int)productionAVCodecContext->pix_fmt;&#xA;         dstFrame->width = productionAVCodecContext->width;&#xA;         dstFrame->height = productionAVCodecContext->height;&#xA;         dstFrame->data.UpdateFrom(dstData);&#xA;         dstFrame->linesize.UpdateFrom(dstLinesize);&#xA;&#xA;         SwsContext* swsCtx = ffmpeg.sws_getContext(&#xA;             srcFrame->width, srcFrame->height, (AVPixelFormat)srcFrame->format,&#xA;             productionAVCodecContext->width, productionAVCodecContext->height, productionAVCodecContext->pix_fmt,&#xA;             ffmpeg.SWS_BILINEAR, null, null, null);&#xA;&#xA;         if (swsCtx == null)&#xA;         {&#xA;             throw new ApplicationException("Could not initialize the conversion context.");&#xA;         }&#xA;&#xA;         ffmpeg.sws_scale(swsCtx, srcFrame->data, srcFrame->linesize, 0, srcFrame->height, dstFrame->data, dstFrame->linesize);&#xA;         ffmpeg.sws_freeContext(swsCtx);&#xA;         return dstFrame;&#xA;     }&#xA;&#xA;     private System.Drawing.Size RetrieveScreenBounds(int screenIndex)&#xA;     {&#xA;         return new System.Drawing.Size(1920, 1080);&#xA;     }&#xA;&#xA;     public void Dispose()&#xA;     {&#xA;         cancellationTokenSource?.Cancel();&#xA;         recorderTask?.Wait();&#xA;         cancellationTokenSource?.Dispose();&#xA;         recorderTask?.Dispose();&#xA;         unsafeToManagedBridgeBuffer?.Dispose();&#xA;&#xA;         fixed (AVCodecContext** p = &amp;productionAVCodecContext)&#xA;         {&#xA;             if (*p != null)&#xA;             {&#xA;                 ffmpeg.avcodec_free_context(p);&#xA;             }&#xA;         }&#xA;         fixed (AVCodecContext** p = &amp;screenCaptureAVCodecContext)&#xA;         {&#xA;             if (*p != null)&#xA;             {&#xA;                 ffmpeg.avcodec_free_context(p);&#xA;             }&#xA;         }&#xA;&#xA;         if (productionFormatContext != null)&#xA;         {&#xA;             ffmpeg.avformat_free_context(productionFormatContext);&#xA;         }&#xA;&#xA;         if (screenCaptureInputFormatContext != null)&#xA;         {&#xA;             ffmpeg.avformat_free_context(screenCaptureInputFormatContext);&#xA;         }&#xA;&#xA;         if (productionAVCodecOptions != null)&#xA;         {&#xA;             fixed (AVDictionary** p = &amp;productionAVCodecOptions)&#xA;             {&#xA;                 ffmpeg.av_dict_free(p);&#xA;             }&#xA;         }&#xA;     }&#xA; }&#xA;

    &#xA;

    I call Start method and wait 8 econds, out of scope I write the bytes to an mp4 file without using the write trailer just to debug the atomboxes. and the mp4 debugging box output I got :

    &#xA;

    (Full OUTPUT)&#xA;https://pastebin.com/xkM4MfG7

    &#xA;


    &#xA;

    (Not full)

    &#xA;

    &#xA;&#xA;"&#xA;<boxes>&#xA;<uuidbox size="0" type="uuid" uuid="{00000000-00000000-00000000-00000000}" specification="unknown" container="unknown">&#xA;</uuidbox>&#xA;<trackreferencetypebox size="0" type="cdsc" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="hint" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="font" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="hind" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="vdep" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="vplx" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="subt" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="thmb" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="mpod" specification="p14" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="dpnd" specification="p14" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="sync" specification="p14" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="ipir" specification="p14" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="sbas" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="scal" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="tbas" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="sabt" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="oref" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="adda" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="adrc" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="iloc" specification="p12" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="avcp" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="swto" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="swfr" specification="p15" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="chap" specification="apple" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="tmcd" specification="apple" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="cdep" specification="apple" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="scpt" specification="apple" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="ssrc" specification="apple" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<trackreferencetypebox size="0" type="lyra" specification="apple" container="tref">&#xA;<trackreferenceentry trackid=""></trackreferenceentry>&#xA;</trackreferencetypebox>&#xA;<itemreferencebox size="0" type="tbas" specification="p12" container="iref">&#xA;<itemreferenceboxentry itemid=""></itemreferenceboxentry>&#xA;</itemreferencebox>&#xA;<itemreferencebox size="0" type="iloc" specification="p12" container="iref">&#xA;<itemreferenceboxentry itemid=""></itemreferenceboxentry>&#xA;</itemreferencebox>&#xA;<itemreferencebox size="0" type="fdel" specification="p12" container="iref">&#xA;<itemreferenceboxentry itemid=""></itemreferenceboxentry>&#xA;</itemreferencebox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<rollrecoveryentry></rollrecoveryentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<audioprerollentry></audioprerollentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<visualrandomaccessentry></visualrandomaccessentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<cencsampleencryptiongroupentry isencrypted="" kid=""></cencsampleencryptiongroupentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<operatingpointsinformation>&#xA; <profiletierlevel></profiletierlevel>&#xA;<operatingpoint minpicwidth="" minpicheight="" maxpicwidth="" maxpicheight="" maxchromaformat="" maxbitdepth="" avgframerate="" constantframerate="" maxbitrate="" avgbitrate=""></operatingpoint>&#xA;&#xA;</operatingpointsinformation>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<layerinformation>&#xA;<layerinfoitem></layerinfoitem>&#xA;</layerinformation>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<tileregiongroupentry tilegroup="" independent="" x="" y="" w="" h="">&#xA;<tileregiondependency tileid=""></tileregiondependency>&#xA;</tileregiongroupentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<nalumap rle="">&#xA;<nalumapentry groupid=""></nalumapentry>&#xA;</nalumap>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<temporallevelentry></temporallevelentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p12" container="stbl traf">&#xA;<sapentry></sapentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<syncsamplegroupentry></syncsamplegroupentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="p15" container="stbl traf">&#xA;<subpictureorderentry refs=""></subpictureorderentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="3gpp" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<samplegroupdescriptionbox size="0" type="sgpd" version="0" flags="0" specification="3gpp" container="stbl traf">&#xA;<defaultsamplegroupdescriptionentry size=""></defaultsamplegroupdescriptionentry>&#xA;</samplegroupdescriptionbox>&#xA;<sampledescriptionentrybox size="0" type="GNRM" specification="unknown" container="stsd" extensiondatasize="0">&#xA;</sampledescriptionentrybox>&#xA;<visualsampledescriptionbox size="0" type="GNRV" specification="unknown" container="stsd" version="0" revision="0" vendor="0" temporalquality="0" spacialquality="0" width="0" height="0" horizontalresolution="4718592" verticalresolution="4718592" compressorname="" bitdepth="24">&#xA;</visualsampledescriptionbox>&#xA;<audiosampledescriptionbox size="0" type="GNRA" specification="unknown" container="stsd" version="0" revision="0" vendor="0" channelcount="2" bitspersample="16" samplerate="0">&#xA;</audiosampledescriptionbox>&#xA;<trackgrouptypebox size="0" type="msrc" version="0" flags="0" specification="p12" container="trgr">&#xA;</trackgrouptypebox>&#xA;<trackgrouptypebox size="0" type="ster" version="0" flags="0" specification="p12" container="trgr">&#xA;</trackgrouptypebox>&#xA;<trackgrouptypebox size="0" type="cstg" version="0" flags="0" specification="p15" container="trgr">&#xA;</trackgrouptypebox>&#xA;<freespacebox size="0" type="free" specification="p12" container="*">&#xA;</freespacebox>&#xA;<freespacebox size="0" type="free" specification="p12" container="*">&#xA;</freespacebox>&#xA;<mediadatabox size="0" type="mdat" specification="p12" container="file">&#xA;</mediadatabox>&#xA;<mediadatabox size="0" type="mdat" specification="p12" container="meta">&#xA;"&#xA;</mediadatabox></boxes>

    &#xA;

  • ffmpeg : fps drop when one -map udp output unreachable [closed]

    14 mai 2024, par user25041039

    I stream a video from a raspberry pi (server) to a splitscreen of 5x5 devices (clients) through an ethernet LAN.

    &#xA;

    Server

    &#xA;

    On the server side, I use the following ffmpeg command that :

    &#xA;

      &#xA;
    1. reads a video list in loop ;
    2. &#xA;

    3. splits it into 25 different streams ;
    4. &#xA;

    5. maps each stream to a device through udp.
    6. &#xA;

    &#xA;

    I also have several options to minimize latency and keep the different subscreens in sync.

    &#xA;

    ffmpeg -loglevel repeat&#x2B;level&#x2B;verbose -re -copyts -start_at_zero -rtbufsize 100000k \&#xA;    -stream_loop -1 -f concat -i stream.lst -an \&#xA;    -filter_complex "\&#xA;    [0]crop=iw/5:ih/5:0*iw/5:0*ih/5[11];&#xA;    [0]crop=iw/5:ih/5:1*iw/5:0*ih/5[12];&#xA;    [...] # truncated for readability&#xA;    [0]crop=iw/5:ih/5:4*iw/5:4*ih/5[55]" \&#xA;    -map &#x27;[11]?&#x27; -flush_packets 1 -preset ultrafast -vcodec libx264 -tune zerolatency -f mpegts "udp://100.64.0.11:1234" \&#xA;    -map &#x27;[12]?&#x27; -flush_packets 1 -preset ultrafast -vcodec libx264 -tune zerolatency -f mpegts "udp://100.64.0.12:1234" \&#xA;    [...] # truncated for readability&#xA;    -map &#x27;[55]?&#x27; -flush_packets 1 -preset ultrafast -vcodec libx264 -tune zerolatency -f mpegts "udp://100.64.0.55:1234"&#xA;

    &#xA;

    Clients

    &#xA;

    On the client side, I use mpv to read the stream and display it. There are also options for low-latency.

    &#xA;

    mpv --no-cache --force-seekable=yes --profile=low-latency --untimed --no-audio --video-rotate=90 --fs --no-config --vo=gpu --hwdec=auto udp://100.64.0.1:1234/&#xA;

    &#xA;

    My problem

    &#xA;

    When a device is unreachable through the LAN (eg : powered down), the FPS stated by ffmpeg drops after a short period ( 10 seconds), and the stream is laggy (= some frames, then pause for 1s, ...). What I expect is the stream to go on normally, just having one of the subscreens black.

    &#xA;

    Here is the full log of ffmpeg when I start the stream normally then power down one of the clients after 15s.

    &#xA;

    [info] ffmpeg version 5.1.4-0&#x2B;rpt3&#x2B;deb12u1 Copyright (c) 2000-2023 the FFmpeg developers&#xA;[info]   built with gcc 12 (Debian 12.2.0-14)&#xA;[info]   configuration: --prefix=/usr --extra-version=0&#x2B;rpt3&#x2B;deb12u1 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --disable-mmal --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sand --enable-sdl2 --disable-sndio --enable-libjxl --enable-neon --enable-v4l2-request --enable-libudev --enable-epoxy --libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared&#xA;[info]   libavutil      57. 28.100 / 57. 28.100&#xA;[info]   libavcodec     59. 37.100 / 59. 37.100&#xA;[info]   libavformat    59. 27.100 / 59. 27.100&#xA;[info]   libavdevice    59.  7.100 / 59.  7.100&#xA;[info]   libavfilter     8. 44.100 /  8. 44.100&#xA;[info]   libswscale      6.  7.100 /  6.  7.100&#xA;[info]   libswresample   4.  7.100 /  4.  7.100&#xA;[info]   libpostproc    56.  6.100 / 56.  6.100&#xA;[h264 @ 0x5555f1407de0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter&#xA;[h264 @ 0x5555f140eca0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[info] Input #0, concat, from &#x27;stream.lst&#x27;:&#xA;[info]   Duration: N/A, start: 0.000000, bitrate: 47 kb/s&#xA;[info]   Stream #0:0(und): Video: h264 (Main), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt709, progressive, left), 1920x1080 (1920x1088), 47 kb/s, 24 fps, 24 tbr, 12288 tbn&#xA;[info]     Metadata:&#xA;[info]       handler_name    : Core Media Video&#xA;[info]       vendor_id       : [0][0][0][0]&#xA;[info] Stream mapping:&#xA;[info]   Stream #0:0 (h264) -> crop:default&#xA;... truncated&#xA;[info]   Stream #0:0 (h264) -> crop:default&#xA;[info]   crop:default -> Stream #0:0 (libx264)&#xA;... truncated&#xA;[info]   crop:default -> Stream #24:0 (libx264)&#xA;[info] Press [q] to stop, [?] for help&#xA;[h264 @ 0x5555f13fe050] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[graph 0 input from stream 0:0 @ 0x5555f1dfad40] [verbose] w:1920 h:1080 pixfmt:yuv420p tb:1/12288 fr:24/1 sar:0/1&#xA;... truncated&#xA;[graph 0 input from stream 0:0 @ 0x5555f1e01a50] [verbose] w:1920 h:1080 pixfmt:yuv420p tb:1/12288 fr:24/1 sar:0/1&#xA;[Parsed_crop_24 @ 0x5555f1dfa860] [verbose] w:1920 h:1080 sar:0/1 -> w:384 h:216 sar:0/1&#xA;... truncated&#xA;[Parsed_crop_0 @ 0x5555f1df23e0] [verbose] w:1920 h:1080 sar:0/1 -> w:384 h:216 sar:0/1&#xA;[libx264 @ 0x5555f147c220] [info] using cpu capabilities: ARMv8 NEON&#xA;[libx264 @ 0x5555f147c220] [info] profile Constrained Baseline, level 1.3, 4:2:0, 8-bit&#xA;[mpegts @ 0x5555f148ab70] [verbose] service 1 using PCR in pid=256, pcr_period=83ms&#xA;[mpegts @ 0x5555f148ab70] [verbose] muxrate VBR, sdt every 500 ms, pat/pmt every 100 ms&#xA;[info] Output #0, mpegts, to &#x27;udp://100.64.0.11:1234&#x27;:&#xA;[info]   Metadata:&#xA;[info]     encoder         : Lavf59.27.100&#xA;[info]   Stream #0:0: Video: h264, 1 reference frame, yuv420p(tv, bt709, progressive, left), 384x216 (0x0), q=2-31, 24 fps, 90k tbn&#xA;[info]     Metadata:&#xA;[info]       encoder         : Lavc59.37.100 libx264&#xA;[info]     Side data:&#xA;[info]       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;[libx264 @ 0x5555f1428760] [info] using cpu capabilities: ARMv8 NEON&#xA;[libx264 @ 0x5555f1428760] [info] profile Constrained Baseline, level 1.3, 4:2:0, 8-bit&#xA;[mpegts @ 0x5555f148b080] [verbose] service 1 using PCR in pid=256, pcr_period=83ms&#xA;[mpegts @ 0x5555f148b080] [verbose] muxrate VBR, sdt every 500 ms, pat/pmt every 100 ms&#xA;&#xA;... truncated&#xA;[info] Output #24, mpegts, to &#x27;udp://100.64.0.55:1234&#x27;:&#xA;[info]   Metadata:&#xA;[info]     encoder         : Lavf59.27.100&#xA;[info]   Stream #24:0: Video: h264, 1 reference frame, yuv420p(tv, bt709, progressive, left), 384x216 (0x0), q=2-31, 24 fps, 90k tbn&#xA;[info]     Metadata:&#xA;[info]       encoder         : Lavc59.37.100 libx264&#xA;[info]     Side data:&#xA;[info]       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;[info] frame=    1 fps=0.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 size=   [info] frame=    9 fps=0.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=13.0 q=12.0 size=   [info] frame=   22 fps= 21 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=   34 fps= 22 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=   46 fps= 22 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=   58 fps= 23 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [AVIOContext @ 0x5555f140fa70] [verbose] Statistics: 19517 bytes read, 0 seeks&#xA;[h264 @ 0x5555f1407de0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter&#xA;[info] frame=   70 fps= 23 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=   83 fps= 23 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=   95 fps= 23 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  107 fps= 23 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  119 fps= 23 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  132 fps= 23 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [AVIOContext @ 0x5555f140fa70] [verbose] Statistics: 19240 bytes read, 0 seeks&#xA;[h264 @ 0x5555f1407de0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter&#xA;[info] frame=  144 fps= 23 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  156 fps= 23 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  168 fps= 23 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  180 fps= 23 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  193 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=13.0 q=12.0 q=12.0 q=27.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  205 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=13.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [AVIOContext @ 0x5555f140fa70] [verbose] Statistics: 19218 bytes read, 0 seeks&#xA;[h264 @ 0x5555f1407de0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter&#xA;[h264 @ 0x5555f17af150] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[concat @ 0x5555f13febf0] [warning] New audio stream 0:1 at pos:68549 and DTS:8.99977s&#xA;[info] frame=  217 fps= 24 q=14.0 q=20.0 q=14.0 q=26.0 q=25.0 q=17.0 q=19.0 q=13.0 q=25.0 q=25.0 q=22.0 q=19.0 q=14.0 q=25.0 q=22.0 q=22.0 q=19.0 q=14.0 q=22.0 q=13.0 q=23.0 q=20.0 q=13.0 q=22.0 q=14.0 size=   [info] frame=  229 fps= 24 q=14.0 q=22.0 q=14.0 q=26.0 q=24.0 q=18.0 q=21.0 q=15.0 q=25.0 q=24.0 q=20.0 q=22.0 q=15.0 q=25.0 q=21.0 q=21.0 q=22.0 q=15.0 q=23.0 q=12.0 q=22.0 q=22.0 q=12.0 q=23.0 q=14.0 size=   [info] frame=  241 fps= 24 q=16.0 q=22.0 q=15.0 q=26.0 q=25.0 q=17.0 q=22.0 q=18.0 q=25.0 q=24.0 q=20.0 q=22.0 q=17.0 q=25.0 q=22.0 q=21.0 q=23.0 q=17.0 q=23.0 q=15.0 q=21.0 q=23.0 q=17.0 q=23.0 q=15.0 size=   [info] frame=  253 fps= 24 q=18.0 q=24.0 q=19.0 q=26.0 q=25.0 q=17.0 q=23.0 q=20.0 q=26.0 q=25.0 q=21.0 q=23.0 q=19.0 q=26.0 q=23.0 q=22.0 q=22.0 q=19.0 q=23.0 q=15.0 q=23.0 q=22.0 q=19.0 q=22.0 q=16.0 size=   [info] frame=  265 fps= 24 q=20.0 q=23.0 q=19.0 q=27.0 q=26.0 q=19.0 q=25.0 q=18.0 q=27.0 q=25.0 q=23.0 q=25.0 q=18.0 q=26.0 q=22.0 q=24.0 q=23.0 q=17.0 q=22.0 q=14.0 q=16.0 q=19.0 q=14.0 q=18.0 q=14.0 size=   [info] frame=  278 fps= 24 q=12.0 q=22.0 q=25.0 q=21.0 q=15.0 q=12.0 q=24.0 q=24.0 q=25.0 q=13.0 q=12.0 q=25.0 q=23.0 q=24.0 q=12.0 q=12.0 q=25.0 q=26.0 q=24.0 q=12.0 q=12.0 q=17.0 q=22.0 q=17.0 q=12.0 size=   [info] frame=  290 fps= 24 q=13.0 q=22.0 q=22.0 q=22.0 q=16.0 q=18.0 q=22.0 q=22.0 q=22.0 q=18.0 q=19.0 q=22.0 q=22.0 q=21.0 q=18.0 q=16.0 q=22.0 q=21.0 q=21.0 q=17.0 q=12.0 q=22.0 q=21.0 q=22.0 q=14.0 size=   [info] frame=  302 fps= 24 q=18.0 q=21.0 q=22.0 q=21.0 q=19.0 q=20.0 q=21.0 q=21.0 q=21.0 q=20.0 q=20.0 q=21.0 q=21.0 q=21.0 q=19.0 q=20.0 q=21.0 q=21.0 q=22.0 q=19.0 q=17.0 q=22.0 q=21.0 q=21.0 q=17.0 size=   [info] frame=  314 fps= 24 q=19.0 q=21.0 q=21.0 q=21.0 q=20.0 q=20.0 q=21.0 q=21.0 q=21.0 q=20.0 q=20.0 q=21.0 q=21.0 q=21.0 q=20.0 q=20.0 q=21.0 q=20.0 q=21.0 q=20.0 q=19.0 q=21.0 q=21.0 q=21.0 q=19.0 size=   [info] frame=  326 fps= 24 q=20.0 q=21.0 q=21.0 q=20.0 q=21.0 q=21.0 q=21.0 q=20.0 q=21.0 q=21.0 q=21.0 q=21.0 q=20.0 q=21.0 q=21.0 q=21.0 q=21.0 q=20.0 q=21.0 q=21.0 q=20.0 q=21.0 q=21.0 q=21.0 q=20.0 size=   [info] frame=  339 fps= 24 q=20.0 q=20.0 q=21.0 q=20.0 q=21.0 q=21.0 q=20.0 q=19.0 q=21.0 q=21.0 q=21.0 q=21.0 q=20.0 q=20.0 q=21.0 q=20.0 q=21.0 q=20.0 q=20.0 q=21.0 q=20.0 q=21.0 q=20.0 q=21.0 q=20.0 size=   [info] frame=  351 fps= 24 q=21.0 q=20.0 q=21.0 q=20.0 q=20.0 q=20.0 q=20.0 q=19.0 q=21.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=21.0 q=21.0 q=21.0 q=20.0 q=20.0 q=20.0 q=21.0 q=21.0 q=21.0 q=21.0 q=20.0 size=   [info] frame=  363 fps= 24 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=19.0 q=20.0 q=20.0 q=21.0 q=20.0 q=20.0 q=20.0 q=21.0 q=21.0 q=21.0 q=20.0 q=20.0 q=21.0 q=21.0 q=21.0 q=20.0 q=21.0 q=21.0 size=   [info] frame=  375 fps= 24 q=20.0 q=20.0 q=20.0 q=19.0 q=20.0 q=20.0 q=20.0 q=19.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=19.0 q=21.0 q=21.0 q=20.0 q=20.0 q=20.0 q=21.0 q=20.0 q=21.0 q=20.0 q=21.0 q=21.0 size=   [info] frame=  387 fps= 24 q=20.0 q=20.0 q=20.0 q=19.0 q=20.0 q=20.0 q=19.0 q=19.0 q=20.0 q=20.0 q=20.0 q=20.0 q=20.0 q=19.0 q=21.0 q=21.0 q=20.0 q=19.0 q=19.0 q=20.0 q=21.0 q=21.0 q=19.0 q=21.0 q=20.0 size=   [info] frame=  400 fps= 24 q=20.0 q=20.0 q=20.0 q=19.0 q=20.0 q=20.0 q=18.0 q=18.0 q=19.0 q=20.0 q=20.0 q=19.0 q=20.0 q=19.0 q=20.0 q=20.0 q=20.0 q=19.0 q=19.0 q=20.0 q=20.0 q=21.0 q=19.0 q=19.0 q=20.0 size=   [info] frame=  412 fps= 24 q=20.0 q=19.0 q=19.0 q=19.0 q=19.0 q=20.0 q=18.0 q=18.0 q=19.0 q=19.0 q=20.0 q=19.0 q=20.0 q=19.0 q=19.0 q=20.0 q=20.0 q=19.0 q=19.0 q=19.0 q=20.0 q=21.0 q=19.0 q=19.0 q=19.0 size=   [info] frame=  424 fps= 24 q=20.0 q=19.0 q=20.0 q=20.0 q=19.0 q=20.0 q=18.0 q=19.0 q=19.0 q=19.0 q=20.0 q=19.0 q=20.0 q=19.0 q=19.0 q=20.0 q=20.0 q=19.0 q=19.0 q=19.0 q=21.0 q=21.0 q=19.0 q=19.0 q=19.0 size=   [info] frame=  436 fps= 24 q=20.0 q=18.0 q=19.0 q=20.0 q=18.0 q=20.0 q=18.0 q=18.0 q=19.0 q=18.0 q=20.0 q=19.0 q=20.0 q=19.0 q=19.0 q=20.0 q=19.0 q=19.0 q=19.0 q=18.0 q=21.0 q=21.0 q=19.0 q=19.0 q=19.0 size=   [info] frame=  448 fps= 24 q=19.0 q=18.0 q=19.0 q=20.0 q=18.0 q=19.0 q=18.0 q=18.0 q=19.0 q=18.0 q=19.0 q=19.0 q=20.0 q=19.0 q=18.0 q=20.0 q=19.0 q=19.0 q=19.0 q=18.0 q=21.0 q=21.0 q=19.0 q=19.0 q=19.0 size=   [info] frame=  460 fps= 24 q=19.0 q=18.0 q=19.0 q=20.0 q=18.0 q=19.0 q=18.0 q=18.0 q=19.0 q=18.0 q=19.0 q=19.0 q=20.0 q=19.0 q=18.0 q=20.0 q=19.0 q=19.0 q=20.0 q=18.0 q=20.0 q=21.0 q=19.0 q=19.0 q=18.0 size=   [info] frame=  472 fps= 24 q=19.0 q=18.0 q=19.0 q=20.0 q=18.0 q=19.0 q=18.0 q=18.0 q=19.0 q=18.0 q=19.0 q=19.0 q=19.0 q=19.0 q=18.0 q=19.0 q=19.0 q=19.0 q=20.0 q=18.0 q=20.0 q=21.0 q=19.0 q=19.0 q=18.0 size=   [info] frame=  484 fps= 24 q=19.0 q=18.0 q=19.0 q=20.0 q=18.0 q=19.0 q=18.0 q=18.0 q=19.0 q=18.0 q=19.0 q=19.0 q=19.0 q=19.0 q=18.0 q=19.0 q=19.0 q=19.0 q=19.0 q=18.0 q=20.0 q=21.0 q=19.0 q=20.0 q=18.0 size=   [info] frame=  496 fps= 24 q=21.0 q=20.0 q=21.0 q=21.0 q=18.0 q=20.0 q=21.0 q=21.0 q=21.0 q=18.0 q=20.0 q=21.0 q=22.0 q=21.0 q=18.0 q=21.0 q=21.0 q=21.0 q=21.0 q=18.0 q=21.0 q=21.0 q=21.0 q=20.0 q=19.0 size=   [info] frame=  509 fps= 24 q=21.0 q=20.0 q=22.0 q=21.0 q=17.0 q=21.0 q=22.0 q=22.0 q=22.0 q=18.0 q=20.0 q=22.0 q=22.0 q=22.0 q=17.0 q=21.0 q=22.0 q=22.0 q=22.0 q=18.0 q=21.0 q=22.0 q=22.0 q=20.0 q=18.0 size=   [info] frame=  521 fps= 24 q=20.0 q=21.0 q=22.0 q=21.0 q=17.0 q=21.0 q=22.0 q=23.0 q=22.0 q=17.0 q=20.0 q=22.0 q=23.0 q=22.0 q=17.0 q=21.0 q=22.0 q=22.0 q=22.0 q=17.0 q=21.0 q=22.0 q=22.0 q=21.0 q=18.0 size=   [info] frame=  533 fps= 24 q=20.0 q=20.0 q=22.0 q=21.0 q=15.0 q=20.0 q=22.0 q=23.0 q=22.0 q=16.0 q=19.0 q=22.0 q=23.0 q=22.0 q=16.0 q=21.0 q=22.0 q=22.0 q=22.0 q=16.0 q=21.0 q=22.0 q=22.0 q=21.0 q=17.0 size=   [AVIOContext @ 0x5555f140fa70] [verbose] Statistics: 3205712 bytes read, 2 seeks&#xA;[h264 @ 0x5555f1df2c00] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter&#xA;[h264 @ 0x5555f1949030] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[info] frame=  546 fps= 24 q=16.0 q=17.0 q=18.0 q=18.0 q=13.0 q=17.0 q=18.0 q=18.0 q=18.0 q=13.0 q=16.0 q=18.0 q=19.0 q=18.0 q=14.0 q=17.0 q=19.0 q=18.0 q=18.0 q=14.0 q=18.0 q=19.0 q=18.0 q=18.0 q=14.0 size=   [info] frame=  558 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=14.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  570 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  582 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  594 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  606 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  618 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  631 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  643 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  655 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [AVIOContext @ 0x5555f140fa70] [verbose] Statistics: 120365 bytes read, 2 seeks&#xA;[h264 @ 0x5555f1df2c00] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter&#xA;[h264 @ 0x5555f1949030] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[info] frame=  667 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  679 fps= 24 q=20.0 q=12.0 q=12.0 q=12.0 q=12.0 q=20.0 q=12.0 q=25.0 q=12.0 q=12.0 q=21.0 q=20.0 q=24.0 q=12.0 q=12.0 q=20.0 q=19.0 q=22.0 q=13.0 q=13.0 q=13.0 q=14.0 q=17.0 q=12.0 q=12.0 size=   [info] frame=  691 fps= 24 q=17.0 q=12.0 q=21.0 q=12.0 q=12.0 q=15.0 q=13.0 q=23.0 q=12.0 q=12.0 q=16.0 q=19.0 q=21.0 q=17.0 q=12.0 q=15.0 q=12.0 q=21.0 q=13.0 q=13.0 q=12.0 q=12.0 q=13.0 q=12.0 q=12.0 size=   [info] frame=  703 fps= 24 q=19.0 q=12.0 q=21.0 q=12.0 q=12.0 q=16.0 q=12.0 q=23.0 q=12.0 q=12.0 q=14.0 q=17.0 q=21.0 q=15.0 q=12.0 q=13.0 q=12.0 q=20.0 q=13.0 q=13.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  715 fps= 24 q=20.0 q=12.0 q=20.0 q=15.0 q=12.0 q=18.0 q=22.0 q=23.0 q=23.0 q=12.0 q=16.0 q=17.0 q=22.0 q=17.0 q=12.0 q=15.0 q=21.0 q=22.0 q=13.0 q=13.0 q=12.0 q=14.0 q=13.0 q=12.0 q=12.0 size=   [info] frame=  728 fps= 24 q=18.0 q=12.0 q=12.0 q=12.0 q=12.0 q=16.0 q=14.0 q=23.0 q=12.0 q=12.0 q=16.0 q=19.0 q=22.0 q=13.0 q=12.0 q=15.0 q=19.0 q=21.0 q=13.0 q=12.0 q=12.0 q=12.0 q=14.0 q=12.0 q=12.0 size=   [info] frame=  740 fps= 24 q=17.0 q=12.0 q=12.0 q=12.0 q=12.0 q=15.0 q=14.0 q=22.0 q=12.0 q=12.0 q=14.0 q=18.0 q=21.0 q=12.0 q=12.0 q=15.0 q=19.0 q=20.0 q=13.0 q=13.0 q=12.0 q=13.0 q=16.0 q=12.0 q=12.0 size=   [info] frame=  752 fps= 24 q=23.0 q=14.0 q=14.0 q=14.0 q=14.0 q=21.0 q=16.0 q=25.0 q=14.0 q=14.0 q=21.0 q=20.0 q=23.0 q=16.0 q=20.0 q=22.0 q=21.0 q=23.0 q=22.0 q=20.0 q=22.0 q=24.0 q=24.0 q=23.0 q=23.0 size=   [info] frame=  764 fps= 24 q=16.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=14.0 q=23.0 q=12.0 q=12.0 q=14.0 q=18.0 q=22.0 q=12.0 q=12.0 q=13.0 q=16.0 q=18.0 q=13.0 q=13.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  776 fps= 24 q=21.0 q=14.0 q=19.0 q=12.0 q=12.0 q=20.0 q=23.0 q=23.0 q=19.0 q=12.0 q=15.0 q=23.0 q=23.0 q=21.0 q=12.0 q=16.0 q=16.0 q=20.0 q=13.0 q=13.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  788 fps= 24 q=22.0 q=12.0 q=19.0 q=18.0 q=13.0 q=21.0 q=12.0 q=23.0 q=24.0 q=16.0 q=19.0 q=12.0 q=24.0 q=26.0 q=23.0 q=15.0 q=12.0 q=27.0 q=25.0 q=16.0 q=13.0 q=13.0 q=16.0 q=12.0 q=12.0 size=   [info] frame=  800 fps= 24 q=21.0 q=12.0 q=12.0 q=12.0 q=12.0 q=18.0 q=12.0 q=12.0 q=12.0 q=12.0 q=13.0 q=12.0 q=15.0 q=15.0 q=12.0 q=13.0 q=12.0 q=14.0 q=17.0 q=13.0 q=13.0 q=12.0 q=13.0 q=12.0 q=12.0 size=   [AVIOContext @ 0x5555f140fa70] [verbose] Statistics: 984786 bytes read, 2 seeks&#xA;[h264 @ 0x5555f1407de0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter&#xA;[h264 @ 0x5555f187c0c0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[info] frame=  812 fps= 24 q=21.0 q=12.0 q=12.0 q=12.0 q=12.0 q=18.0 q=13.0 q=12.0 q=12.0 q=12.0 q=13.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=16.0 q=15.0 q=12.0 q=12.0 q=12.0 q=13.0 q=16.0 q=12.0 size=   [info] frame=  824 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  836 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  848 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  861 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=13.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=24.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  873 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  885 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=23.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=13.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  897 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  909 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=13.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=25.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  922 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  934 fps= 24 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  938 fps= 23 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [AVIOContext @ 0x5555f140fa70] [verbose] Statistics: 29154 bytes read, 0 seeks&#xA;[h264 @ 0x5555f1407de0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter&#xA;[h264 @ 0x5555f17af150] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p&#xA;[info] frame=  963 fps= 23 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=15.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  967 fps= 22 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=17.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  994 fps= 22 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=15.0 q=19.0 q=12.0 q=12.0 q=12.0 q=17.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame=  997 fps= 21 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=15.0 q=19.0 q=12.0 q=12.0 q=12.0 q=18.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame= 1023 fps= 21 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=14.0 q=20.0 q=18.0 q=15.0 q=15.0 q=14.0 q=13.0 q=13.0 q=13.0 q=13.0 q=13.0 q=13.0 size=   [info] frame= 1029 fps= 20 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=14.0 q=20.0 q=15.0 q=14.0 q=15.0 q=15.0 q=13.0 q=13.0 q=14.0 q=14.0 q=14.0 q=13.0 size=   [info] frame= 1055 fps= 21 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=15.0 q=19.0 q=15.0 q=14.0 q=15.0 q=16.0 q=12.0 q=13.0 q=13.0 q=13.0 q=13.0 q=12.0 size=   [info] frame= 1060 fps= 20 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=16.0 q=19.0 q=15.0 q=14.0 q=15.0 q=16.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=   [info] frame= 1086 fps= 20 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=13.0 q=16.0 q=15.0 q=14.0 q=14.0 q=12.0 q=13.0 q=13.0 q=13.0 q=13.0 q=12.0 size=   [info] frame= 1092 fps= 19 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=13.0 q=16.0 q=13.0 q=13.0 q=13.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 q=12.0 size=&#xA;

    &#xA;

    What I tried & My guesses

    &#xA;

    My best guess is that the issue comes from one of the data buffers between the two applications (ffmpeg -> mpv). There are several buffers and I don't know exactly which ones, but there is at least a UDP buffer at the output of the server and another one at the input of the client.

    &#xA;

    When a client is unreachable, the server's UDP buffer seems to fill up and thus don't continue streaming for other clients.

    &#xA;

    I tried to tweak several parameters of ffmpeg concerning buffers but without success.

    &#xA;

      &#xA;
    • udp://100.64.0.32:1234?buffer_size=1024&amp;connect=0&amp;fifo_size=10&amp;overrun_nonfatal=0
    • &#xA;

    • fps_mode
    • &#xA;

    • thread_queue_size
    • &#xA;

    &#xA;

    Any help is welcome !

    &#xA;