Recherche avancée

Médias (91)

Autres articles (98)

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (13072)

  • ffmpeg realtime bad quality variable fps cams inputs to constant framerate problem

    23 janvier 2023, par BloodMan
        ../ffmpeg/ffmpeg -err_detect ignore_err -nostdin -threads 0 -y -strict experimental -thread_queue_size 10M -max_delay 20M -rtbufsize 20M -fflags +discardcorrupt \
        -i "${cam1}" -i "${cam2}" -i "${cam3}" -i "${cam4}" \
        -filter_complex " \
        nullsrc=size=3840x2160:rate=30 [main1]; \
        anullsrc=channel_layout=stereo:sample_rate=44100 [a]; \
        [0:v] scale=1920:1080 [overlay1]; \
        [1:v] scale=1920:1080 [overlay2]; \
        [2:v] scale=1920:1080 [overlay3]; \
        [3:v] scale=1920:1080 [overlay4]; \
        [main1][overlay1] overlay=0:0 [main2]; \
        [main2][overlay2] overlay=1920:0 [main3]; \
        [main3][overlay3] overlay=0:1080 [main4]; \
        [main4][overlay4] overlay=1920:1080 [v] " \
        -t 10 -r 30 -g 60 -map "[v]" -map "[a]" \
        -shortest -video_size 3840x2160 -pix_fmt yuv420p -vcodec libx264 -preset ultrafast -tune zerolatency -minrate 2M -maxrate 2M -bufsize 20M -c:a aac -b:a 96k -ac 2 -ar 48000 -copytb 1 \
        -f flv -y -fflags +genpts rtmp://b.rtmp.youtube.com/live2/${key}?backup=1


    


    ffmpeg version N-109650-g9d5e66942c Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/home/bloodman/ffmpeg --pkg-config-flags=--static --extra-cflags='-I/home/bloodman/ffmpeg/include -march=native' --extra-ldflags=-L/home/bloodman/ffmpeg/lib --extra-libs='-lpthread -lm' --bindir=/home/bloodman/ffmpeg --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk-aac --enable-libmp3lame --enable-libfreetype --enable-hardcoded-tables
  libavutil      57. 44.100 / 57. 44.100
  libavcodec     59. 56.100 / 59. 56.100
  libavformat    59. 35.100 / 59. 35.100
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 54.100 /  8. 54.100
  libswscale      6.  8.112 /  6.  8.112
  libswresample   4.  9.100 /  4.  9.100
  libpostproc    56.  7.100 / 56.  7.100
[hls @ 0x56019db77780] Skip ('#EXT-X-VERSION:3')
[hls @ 0x56019db77780] Opening 'cams/stream1_113.ts' for reading
Input #0, hls, from 'cams/stream1.m3u8':
  Duration: N/A, start: 1122.341667, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 0
  Stream #0:0: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p, 2048x1536, 15 fps, 15 tbr, 90k tbn
    Metadata:
      variant_bitrate : 0
[hls @ 0x56019db9e980] Skip ('#EXT-X-VERSION:3')
[hls @ 0x56019db9e980] Opening 'cams/stream2_105.ts' for reading
Input #1, hls, from 'cams/stream2.m3u8':
  Duration: N/A, start: 1042.633000, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 0
  Stream #1:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 100 tbr, 90k tbn
    Metadata:
      variant_bitrate : 0
[hls @ 0x56019dccdbc0] Skip ('#EXT-X-VERSION:3')
[hls @ 0x56019dccdbc0] Opening 'cams/stream3_14.ts' for reading
Input #2, hls, from 'cams/stream3.m3u8':
  Duration: N/A, start: 132.469000, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 0
  Stream #2:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 2688x1520, 25 fps, 100 tbr, 90k tbn
    Metadata:
      variant_bitrate : 0
[hls @ 0x56019f0ec980] Skip ('#EXT-X-VERSION:3')
[hls @ 0x56019f0ec980] Opening 'cams/stream4_26.ts' for reading
Input #3, hls, from 'cams/stream4.m3u8':
  Duration: N/A, start: 253.389000, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 0
  Stream #3:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709), 1920x1080, 90k tbr, 90k tbn
    Metadata:
      variant_bitrate : 0
Stream mapping:
  Stream #0:0 (h264) -> scale:default
  Stream #1:0 (h264) -> scale:default
  Stream #2:0 (h264) -> scale:default
  Stream #3:0 (h264) -> scale:default
  overlay:default -> Stream #0:0 (libx264)
  anullsrc:default -> Stream #0:1 (aac)
[hls @ 0x56019db77780] Opening 'cams/stream1_114.ts' for reading
[hls @ 0x56019db77780] Opening 'cams/stream1_115.ts' for reading
[swscaler @ 0x5601a2c78e40] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x5601a332c940] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x5601a2c78e40] deprecated pixel format used, make sure you did set range correctly
    Last message repeated 2 times
[swscaler @ 0x5601a332c940] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x5601a361fc00] deprecated pixel format used, make sure you did set range correctly
    Last message repeated 1 times
[libx264 @ 0x56019e5212c0] using SAR=1/1
[libx264 @ 0x56019e5212c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x56019e5212c0] profile Constrained Baseline, level 5.1, 4:2:0, 8-bit
[libx264 @ 0x56019e5212c0] 264 - core 160 r3011 cde9a93 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=8 lookahead_threads=8 sliced_threads=1 slices=8 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=60 keyint_min=6 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=2000 vbv_bufsize=20000 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
Output #0, flv, to 'rtmp://b.rtmp.youtube.com/live2/XXXX-XXXX-XXXX-XXXX-XXXX?backup=1':
  Metadata:
    encoder         : Lavf59.35.100
  Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p(progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 1k tbn
    Metadata:
      encoder         : Lavc59.56.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 2000000/0/0 buffer size: 20000000 vbv_delay: N/A
  Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 96 kb/s
    Metadata:
      encoder         : Lavc59.56.100 aac
[hls @ 0x56019db77780] Skip ('#EXT-X-VERSION:3')00:00:03.22 bitrate=7519.6kbits/s speed=0.359x
[hls @ 0x56019db77780] Opening 'cams/stream1_116.ts' for reading
[hls @ 0x56019db77780] Skip ('#EXT-X-VERSION:3')00:00:07.23 bitrate=4470.2kbits/s speed=0.383x
[hls @ 0x56019db77780] Opening 'cams/stream1_117.ts' for reading
[hls @ 0x56019f0ec980] Skip ('#EXT-X-VERSION:3')00:00:09.04 bitrate=3978.1kbits/s speed=0.384x
[hls @ 0x56019f0ec980] Opening 'cams/stream4_27.ts' for reading
[hls @ 0x56019dccdbc0] Skip ('#EXT-X-VERSION:3')
[hls @ 0x56019dccdbc0] Opening 'cams/stream3_15.ts' for reading
[hls @ 0x56019db9e980] Skip ('#EXT-X-VERSION:3')
[hls @ 0x56019db9e980] Opening 'cams/stream2_106.ts' for reading
[flv @ 0x56019e639a00] Failed to update header with correct duration.811.6kbits/s speed=0.385x
[flv @ 0x56019e639a00] Failed to update header with correct filesize.
frame=  299 fps= 12 q=34.0 Lsize=    4622kB time=00:00:09.98 bitrate=3792.7kbits/s speed=0.386x
video:4603kB audio:3kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.349536%
[libx264 @ 0x56019e5212c0] frame I:5     Avg QP:45.60  size:275880
[libx264 @ 0x56019e5212c0] frame P:294   Avg QP:38.77  size: 11340
[libx264 @ 0x56019e5212c0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x56019e5212c0] mb P  I16..4:  1.4%  0.0%  0.0%  P16..4:  4.7%  0.0%  0.0%  0.0%  0.0%    skip:93.9%
[libx264 @ 0x56019e5212c0] coded y,uvDC,uvAC intra: 16.2% 8.9% 1.2% inter: 1.8% 0.6% 0.0%
[libx264 @ 0x56019e5212c0] i16 v,h,dc,p: 64% 17% 15%  5%
[libx264 @ 0x56019e5212c0] i8c dc,h,v,p: 90%  6%  3%  1%
[libx264 @ 0x56019e5212c0] kb/s:3783.23
[aac @ 0x56019e63a700] Qavg: 65511.207
[hls @ 0x56019db77780] Skip ('#EXT-X-VERSION:3')
[hls @ 0x56019db77780] Opening 'cams/stream1_118.ts' for reading


    


    NOTES : sources are cams streamed first to hls/m3u8. -t 10 only for testing purposes.

    


    The problem is variable output fps= 12 (sometimes 2, 5, 10, maybe 13) where I expect 30. Machine is 10 times greater (encode uses up to 5% cpu).

    


    Im trying adding -re, -r 30, -r 15 to sources, convert sources via stream_filter (,fps=30), vsync (old versions of ffmpeg), wallclock time, etc. and reading stackoverflow of course. And... nothing.

    


    Where is the problem ?

    


  • 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.

    


    Server

    


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

    


      

    1. reads a video list in loop ;
    2. 


    3. splits it into 25 different streams ;
    4. 


    5. maps each stream to a device through udp.
    6. 


    


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

    


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


    


    Clients

    


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

    


    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/


    


    My problem

    


    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.

    


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

    


    [info] ffmpeg version 5.1.4-0+rpt3+deb12u1 Copyright (c) 2000-2023 the FFmpeg developers
[info]   built with gcc 12 (Debian 12.2.0-14)
[info]   configuration: --prefix=/usr --extra-version=0+rpt3+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
[info]   libavutil      57. 28.100 / 57. 28.100
[info]   libavcodec     59. 37.100 / 59. 37.100
[info]   libavformat    59. 27.100 / 59. 27.100
[info]   libavdevice    59.  7.100 / 59.  7.100
[info]   libavfilter     8. 44.100 /  8. 44.100
[info]   libswscale      6.  7.100 /  6.  7.100
[info]   libswresample   4.  7.100 /  4.  7.100
[info]   libpostproc    56.  6.100 / 56.  6.100
[h264 @ 0x5555f1407de0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter
[h264 @ 0x5555f140eca0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[info] Input #0, concat, from 'stream.lst':
[info]   Duration: N/A, start: 0.000000, bitrate: 47 kb/s
[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
[info]     Metadata:
[info]       handler_name    : Core Media Video
[info]       vendor_id       : [0][0][0][0]
[info] Stream mapping:
[info]   Stream #0:0 (h264) -> crop:default
... truncated
[info]   Stream #0:0 (h264) -> crop:default
[info]   crop:default -> Stream #0:0 (libx264)
... truncated
[info]   crop:default -> Stream #24:0 (libx264)
[info] Press [q] to stop, [?] for help
[h264 @ 0x5555f13fe050] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[graph 0 input from stream 0:0 @ 0x5555f1dfad40] [verbose] w:1920 h:1080 pixfmt:yuv420p tb:1/12288 fr:24/1 sar:0/1
... truncated
[graph 0 input from stream 0:0 @ 0x5555f1e01a50] [verbose] w:1920 h:1080 pixfmt:yuv420p tb:1/12288 fr:24/1 sar:0/1
[Parsed_crop_24 @ 0x5555f1dfa860] [verbose] w:1920 h:1080 sar:0/1 -> w:384 h:216 sar:0/1
... truncated
[Parsed_crop_0 @ 0x5555f1df23e0] [verbose] w:1920 h:1080 sar:0/1 -> w:384 h:216 sar:0/1
[libx264 @ 0x5555f147c220] [info] using cpu capabilities: ARMv8 NEON
[libx264 @ 0x5555f147c220] [info] profile Constrained Baseline, level 1.3, 4:2:0, 8-bit
[mpegts @ 0x5555f148ab70] [verbose] service 1 using PCR in pid=256, pcr_period=83ms
[mpegts @ 0x5555f148ab70] [verbose] muxrate VBR, sdt every 500 ms, pat/pmt every 100 ms
[info] Output #0, mpegts, to 'udp://100.64.0.11:1234':
[info]   Metadata:
[info]     encoder         : Lavf59.27.100
[info]   Stream #0:0: Video: h264, 1 reference frame, yuv420p(tv, bt709, progressive, left), 384x216 (0x0), q=2-31, 24 fps, 90k tbn
[info]     Metadata:
[info]       encoder         : Lavc59.37.100 libx264
[info]     Side data:
[info]       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
[libx264 @ 0x5555f1428760] [info] using cpu capabilities: ARMv8 NEON
[libx264 @ 0x5555f1428760] [info] profile Constrained Baseline, level 1.3, 4:2:0, 8-bit
[mpegts @ 0x5555f148b080] [verbose] service 1 using PCR in pid=256, pcr_period=83ms
[mpegts @ 0x5555f148b080] [verbose] muxrate VBR, sdt every 500 ms, pat/pmt every 100 ms

... truncated
[info] Output #24, mpegts, to 'udp://100.64.0.55:1234':
[info]   Metadata:
[info]     encoder         : Lavf59.27.100
[info]   Stream #24:0: Video: h264, 1 reference frame, yuv420p(tv, bt709, progressive, left), 384x216 (0x0), q=2-31, 24 fps, 90k tbn
[info]     Metadata:
[info]       encoder         : Lavc59.37.100 libx264
[info]     Side data:
[info]       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
[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
[h264 @ 0x5555f1407de0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter
[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
[h264 @ 0x5555f1407de0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter
[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
[h264 @ 0x5555f1407de0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter
[h264 @ 0x5555f17af150] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[concat @ 0x5555f13febf0] [warning] New audio stream 0:1 at pos:68549 and DTS:8.99977s
[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
[h264 @ 0x5555f1df2c00] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter
[h264 @ 0x5555f1949030] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[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
[h264 @ 0x5555f1df2c00] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter
[h264 @ 0x5555f1949030] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[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
[h264 @ 0x5555f1407de0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter
[h264 @ 0x5555f187c0c0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[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
[h264 @ 0x5555f1407de0] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5555f1407720] [info] Auto-inserting h264_mp4toannexb bitstream filter
[h264 @ 0x5555f17af150] [verbose] Reinit context to 1920x1088, pix_fmt: yuv420p
[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=


    


    What I tried & My guesses

    


    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.

    


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

    


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

    


      

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


    • fps_mode
    • 


    • thread_queue_size
    • 


    


    Any help is welcome !

    


  • Using PyAV to encode mono audio to file, params match docs, but still causes Errno 22

    20 février 2023, par andrew8088

    While trying to use PyAV to encode live mono audio from a microphone to a compressed audio stream (using mp2 or flac as encoder), the program kept raising an exception ValueError: [Errno 22] Invalid argument.

    


    To remove the live microphone source as a cause of the problem, and to make the problematic code easier for others to run/test, I have removed the mic source and now just generate a pure tone as a sequence of input buffers.

    


    All attempts to figure out the missing or mismatched or incorrect argument have just resulted in seeing documentation and examples that are the same as my code.

    


    I would like to know from someone who has used PyAV successfully for mono audio what the correct method and parameters are for encoding mono frames into the mono stream.

    


    The package used is av 10.0.0 installed with
pip3 install av --no-binary av
so it uses my package-manager provided ffmpeg library, which is version 4.2.7.

    


    The problematic python code is :

    


    #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Recreating an error 22 when encoding sound with PyAV.

Created on Sun Feb 19 08:10:29 2023
@author: andrewm
"""
import typing
import sys
import math
import fractions

import av
from av import AudioFrame

""" Ensure some PyAudio constants are still defined without changing 
    the PyAudio recording callback function and without depending 
    on PyAudio simply for reproducing the PyAV bug [Errno 22] thrown in 
    File "av/filter/context.pyx", line 89, in av.filter.context.FilterContext.push
"""
class PA_Stub():
    paContinue = True
    paComplete= False

pyaudio = PA_Stub()


"""Generate pure tone at given frequency with amplitude 0...1.0 at 
   sampling frewuency fs and beginning at phase offset 'phase'.
   Returns the new phase after the sinusoid has cycled over the 
   sampling window length.
"""
def generate_tone(
        freq:int, phase:float, amp:float, fs, samp_fmt, buffer:bytearray
) -> float:
    assert samp_fmt == "s16", "Only s16 supported atm"
    samp_size_bytes = 2
    n_samples = int(len(buffer)/samp_size_bytes)
    window = [int(0) for i in range(n_samples)]
    theta = phase
    phase_inc = 2*math.pi * freq / fs
    for i in range(n_samples):
        v = amp * math.sin(theta)
        theta += phase_inc
        s = int((2**15-1)*v)
        window[i] = s
    for sample_i in range(len(window)):
        byte_i = sample_i * samp_size_bytes
        enc = window[sample_i].to_bytes(
                2, byteorder=sys.byteorder, signed=True
        )
        buffer[byte_i] = enc[0]
        buffer[byte_i+1] = enc[1]
    return theta


channels = 1
fs = 44100  # Record at 44100 samples per second
fft_size_samps = 256
chunk_samps = fft_size_samps * 10  # Record in chunks that are multiples of fft windows.

# print(f"fft_size_samps={fft_size_samps}\nchunk_samps={chunk_samps}")

seconds = 3.0
out_filename = "testoutput.wav"

# Store data in chunks for 3 seconds
sample_limit = int(fs * seconds)
sample_len = 0
frames = []  # Initialize array to store frames

ffmpeg_codec_name = 'mp2'  # flac, mp3, or libvorbis make same error.

sample_size_bytes = 2
buffer = bytearray(int(chunk_samps*sample_size_bytes))
chunkperiod = chunk_samps / fs
total_chunks = int(math.ceil(seconds / chunkperiod))
phase = 0.0

### uncomment if you want to see the synthetic data being used as a mic input.
# with open("test.raw","wb") as raw_out:
#     for ci in range(total_chunks):
#         phase = generate_tone(2600, phase, 0.8, fs, "s16", buffer)
#         raw_out.write(buffer)
# print("finished gen test")
# sys.exit(0)
# #---- 

# Using mp2 or mkv as the container format gets the same error.
with av.open(out_filename+'.mp2', "w", format="mp2") as output_con:
    output_con.metadata["title"] = "My title"
    output_con.metadata["key"] = "value"
    channel_layout = "mono"
    sample_fmt = "s16p"

    ostream = output_con.add_stream(ffmpeg_codec_name, fs, layout=channel_layout)
    assert ostream is not None, "No stream!"
    cctx = ostream.codec_context
    cctx.sample_rate = fs
    cctx.time_base = fractions.Fraction(numerator=1,denominator=fs)
    cctx.format = sample_fmt
    cctx.channels = channels
    cctx.layout = channel_layout
    print(cctx, f"layout#{cctx.channel_layout}")
    
    # Define PyAudio-style callback for recording plus PyAV transcoding.
    def rec_callback(in_data, frame_count, time_info, status):
        global sample_len
        global ostream
        frames.append(in_data)
        nsamples = int(len(in_data) / (channels*sample_size_bytes))
        
        frame = AudioFrame(format=sample_fmt, layout=channel_layout, samples=nsamples)
        frame.sample_rate = fs
        frame.time_base = fractions.Fraction(numerator=1,denominator=fs)
        frame.pts = sample_len
        frame.planes[0].update(in_data)
        print(frame, len(in_data))
        
        for out_packet in ostream.encode(frame):
            output_con.mux(out_packet)
        for out_packet in ostream.encode(None):
            output_con.mux(out_packet)
        
        sample_len += nsamples
        retflag = pyaudio.paContinue if sample_lencode>

    


    If you uncomment the RAW output part you will find the generated data can be imported as PCM s16 Mono 44100Hz into Audacity and plays the expected tone, so the generated audio data does not seem to be the problem.

    


    The normal program console output up until the exception is :

    


    mp2 at 0x7f8e38202cf0> layout#4
Beginning
 5120
. 5120


    


    The stack trace is :

    


    Traceback (most recent call last):&#xA;&#xA;  File "Dev/multichan_recording/av_encode.py", line 147, in <module>&#xA;    ret_data, ret_flag = rec_callback(buffer, ci, {}, 1)&#xA;&#xA;  File "Dev/multichan_recording/av_encode.py", line 121, in rec_callback&#xA;    for out_packet in ostream.encode(frame):&#xA;&#xA;  File "av/stream.pyx", line 153, in av.stream.Stream.encode&#xA;&#xA;  File "av/codec/context.pyx", line 484, in av.codec.context.CodecContext.encode&#xA;&#xA;  File "av/audio/codeccontext.pyx", line 42, in av.audio.codeccontext.AudioCodecContext._prepare_frames_for_encode&#xA;&#xA;  File "av/audio/resampler.pyx", line 101, in av.audio.resampler.AudioResampler.resample&#xA;&#xA;  File "av/filter/graph.pyx", line 211, in av.filter.graph.Graph.push&#xA;&#xA;  File "av/filter/context.pyx", line 89, in av.filter.context.FilterContext.push&#xA;&#xA;  File "av/error.pyx", line 336, in av.error.err_check&#xA;&#xA;ValueError: [Errno 22] Invalid argument&#xA;&#xA;</module>

    &#xA;

    edit : It's interesting that the error happens on the 2nd AudioFrame, as apparently the first one was encoded okay, because they are given the same attribute values aside from the Presentation Time Stamp (pts), but leaving this out and letting PyAV/ffmpeg generate the PTS by itself does not fix the error, so an incorrect PTS does not seem the cause.

    &#xA;

    After a brief glance in av/filter/context.pyx the exception must come from a bad return value from res = lib.av_buffersrc_write_frame(self.ptr, frame.ptr)
    &#xA;Trying to dig into av_buffersrc_write_frame from the ffmpeg source it is not clear what could be causing this error. The only obvious one is a mismatch between channel layouts, but my code is setting the layout the same in the Stream and the Frame. That problem had been found by an old question pyav - cannot save stream as mono and their answer (that one parameter required is undocumented) is the only reason the code now has the layout='mono' argument when making the stream.

    &#xA;

    The program output shows layout #4 is being used, and from https://github.com/FFmpeg/FFmpeg/blob/release/4.2/libavutil/channel_layout.h you can see this is the value for symbol AV_CH_FRONT_CENTER which is the only channel in the MONO layout.

    &#xA;

    The mismatch is surely some other object property or an undocumented parameter requirement.

    &#xA;

    How do you encode mono audio to a compressed stream with PyAV ?

    &#xA;