Recherche avancée

Médias (91)

Autres articles (63)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

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

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

Sur d’autres sites (6825)

  • Two nearly identical ffmpeg commands, one works, the other freezes up

    28 septembre 2015, par dylanjha

    In both of these examples, I’m passing two inputs to ffmpeg applying a filter to the first input, and outputting it all to a .mp4.

    Example 1

    ffmpeg -y -threads 4 -ss 23.536 -t 44.854 -i .tmp/processing/vid-one.webm -ss 13.516 -t 54.874 -i .tmp/processing/vid-two.webm -filter_complex "[0]scale=320:-1,pad=2*iw:2*ih:0:120[left];[1]scale=320:-1[right];[left][right]overlay=main_w/2:120,scale=640:480" -shortest .tmp/processing/temp-23536-68390.mp4

    Example 2

    ffmpeg -y -threads 4 -ss 68.39 -t 3.646 -i .tmp/processing/vid-one.webm -ss 58.37 -t 13.666 -i .tmp/processing/vid-two.webm -filter_complex "[0]scale=320:-1,pad=2*iw:2*ih:0:120[left];[1]scale=320:-1[right];[left][right]overlay=main_w/2:120,scale=640:480" -shortest .tmp/processing/temp-68390-72036.mp4

    In the logging output I can get an idea of where it gets hung up.

    Output Example 1

    the output gets to this frame= line and it updates the output like this

    ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers
     built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/2.7.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --enable-opencl --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
     libavutil      54. 27.100 / 54. 27.100
     libavcodec     56. 41.100 / 56. 41.100
     libavformat    56. 36.100 / 56. 36.100
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 16.101 /  5. 16.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.100 /  1.  2.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, matroska,webm, from '.tmp/processing/vid-one.webm':
     Metadata:
       encoder         : libwebm-0.2.1.0
       creation_time   : 2015-09-27 18:54:09
     Duration: 00:01:10.35, start: 0.000000, bitrate: 45 kb/s
       Stream #0:0(eng): Audio: opus, 48000 Hz, mono, fltp (default)
       Stream #0:1(eng): Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 1k tbr, 1k tbn, 1k tbc (default)
    Input #1, matroska,webm, from '.tmp/processing/vid-two.webm':
     Metadata:
       encoder         : libwebm-0.2.1.0
       creation_time   : 2015-09-27 18:54:19
     Duration: 00:00:59.58, start: 0.000000, bitrate: 356 kb/s
       Stream #1:0(eng): Audio: opus, 48000 Hz, mono, fltp (default)
       Stream #1:1(eng): Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 1k tbr, 1k tbn, 1k tbc (default)
    [libx264 @ 0x7faa59843e00] using SAR=1/1
    [libx264 @ 0x7faa59843e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x7faa59843e00] profile High, level 5.2
    [libx264 @ 0x7faa59843e00] 264 - core 144 r2533 c8a773e - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to '.tmp/processing/temp-23536-68390.mp4':
     Metadata:
       encoder         : Lavf56.36.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 1k fps, 16k tbn, 1k tbc (default)
       Metadata:
         encoder         : Lavc56.41.100 libx264
       Stream #0:1(eng): Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 48000 Hz, mono, s16, 128 kb/s (default)
       Metadata:
         encoder         : Lavc56.41.100 libvo_aacenc
    Stream mapping:
     Stream #0:1 (vp8) -> scale (graph 0)
     Stream #1:1 (vp8) -> scale (graph 0)
     scale (graph 0) -> Stream #0:0 (libx264)
     Stream #0:0 -> #0:1 (opus (native) -> aac (libvo_aacenc))
    Press [q] to stop, [?] for help
    Input stream #0:1 frame changed from size:640x480 fmt:yuv420p to size:320x240 fmt:yuv420p
    Input stream #1:1 frame changed from size:640x480 fmt:yuv420p to size:1016x846 fmt:yuv420p
    frame=13321 fps=268 q=33.0 size=    1321kB time=00:00:41.85 bitrate= 258.5kbits/s dup=13frame=25895 fps=258 q=33.0 size=    2268kB time=00:00:44.81 bitrate= 414.5kbits/s dup=25frame=35230 fps=244 q=33.0 size=    2936kB time=00:00:44.81 bitrate= 536.6kbits/s dup=35frame=41866 fps=231 q=33.0 size=    3552kB time=00:00:44.81 bitrate= 649.4kbits/s dup=41Past duration 0.999992 too large
    frame=41868 fps=231 q=-1.0 Lsize=    4089kB time=00:00:44.85 bitrate= 746.8kbits/s dup=41862 drop=20    
    video:3108kB audio:479kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 13.986680%
    [libx264 @ 0x7faa59843e00] frame I:168   Avg QP:18.70  size: 12936
    [libx264 @ 0x7faa59843e00] frame P:10552 Avg QP:14.49  size:    37
    [libx264 @ 0x7faa59843e00] frame B:31148 Avg QP:17.67  size:    20
    [libx264 @ 0x7faa59843e00] consecutive B-frames:  0.8%  0.0%  0.0% 99.2%
    [libx264 @ 0x7faa59843e00] mb I  I16..4: 40.0% 39.7% 20.3%
    [libx264 @ 0x7faa59843e00] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.2%  0.0%  0.0%  0.0%  0.0%    skip:99.7%
    [libx264 @ 0x7faa59843e00] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%  L0: 7.4% L1:92.6% BI: 0.0%
    [libx264 @ 0x7faa59843e00] 8x8 transform intra:39.8% inter:54.0%
    [libx264 @ 0x7faa59843e00] coded y,uvDC,uvAC intra: 31.6% 26.7% 16.9% inter: 0.0% 0.1% 0.0%
    [libx264 @ 0x7faa59843e00] i16 v,h,dc,p: 68% 22%  9%  1%
    [libx264 @ 0x7faa59843e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 45% 14%  1%  3%  5%  2%  5%  3%
    [libx264 @ 0x7faa59843e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 47% 10%  1%  2%  2%  3%  2%  3%
    [libx264 @ 0x7faa59843e00] i8c dc,h,v,p: 73% 13% 12%  2%
    [libx264 @ 0x7faa59843e00] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0x7faa59843e00] ref P L0: 99.3%  0.4%  0.1%  0.2%
    [libx264 @ 0x7faa59843e00] ref B L0: 68.7% 31.3%
    [libx264 @ 0x7faa59843e00] ref B L1: 99.3%  0.7%
    [libx264 @ 0x7faa59843e00] kb/s:608.06

    Output Example 2

    When it gets to the frame= line, it hangs

    ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers
     built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/2.7.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --enable-opencl --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
     libavutil      54. 27.100 / 54. 27.100
     libavcodec     56. 41.100 / 56. 41.100
     libavformat    56. 36.100 / 56. 36.100
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 16.101 /  5. 16.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.100 /  1.  2.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, matroska,webm, from '.tmp/processing/vid-one.webm':
     Metadata:
       encoder         : libwebm-0.2.1.0
       creation_time   : 2015-09-27 18:54:09
     Duration: 00:01:10.35, start: 0.000000, bitrate: 45 kb/s
       Stream #0:0(eng): Audio: opus, 48000 Hz, mono, fltp (default)
       Stream #0:1(eng): Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 1k tbr, 1k tbn, 1k tbc (default)
    Input #1, matroska,webm, from '.tmp/processing/vid-two.webm':
     Metadata:
       encoder         : libwebm-0.2.1.0
       creation_time   : 2015-09-27 18:54:19
     Duration: 00:00:59.58, start: 0.000000, bitrate: 356 kb/s
       Stream #1:0(eng): Audio: opus, 48000 Hz, mono, fltp (default)
       Stream #1:1(eng): Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 1k tbr, 1k tbn, 1k tbc (default)
    [libx264 @ 0x7fdb4a802600] using SAR=1/1
    [libx264 @ 0x7fdb4a802600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x7fdb4a802600] profile High, level 5.2
    [libx264 @ 0x7fdb4a802600] 264 - core 144 r2533 c8a773e - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to '.tmp/processing/temp-68390-72036.mp4':
     Metadata:
       encoder         : Lavf56.36.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 1k fps, 16k tbn, 1k tbc (default)
       Metadata:
         encoder         : Lavc56.41.100 libx264
       Stream #0:1(eng): Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 48000 Hz, mono, s16, 128 kb/s (default)
       Metadata:
         encoder         : Lavc56.41.100 libvo_aacenc
    Stream mapping:
     Stream #0:1 (vp8) -> scale (graph 0)
     Stream #1:1 (vp8) -> scale (graph 0)
     scale (graph 0) -> Stream #0:0 (libx264)
     Stream #0:0 -> #0:1 (opus (native) -> aac (libvo_aacenc))
    Press [q] to stop, [?] for help
    Input stream #0:1 frame changed from size:640x480 fmt:yuv420p to size:320x240 fmt:yuv420p
    Input stream #1:1 frame changed from size:640x480 fmt:yuv420p to size:1016x846 fmt:yuv420p
    frame=    0 fps=0.0 q=0.0 Lsize=      17kB time=00:00:01.97 bitrate=  71.8kbits/s

    version : ffmpeg version 2.7.2

  • How to include audio in an overlay ffmpeg command ?

    27 avril 2021, par gilad s

    Using ffmpeg I add a video overlay successfully over an origin video (origin has audio, overlay doesn't). However the audio of the origin video doesn't appear in the result video.

    


      ffmpeg  -i source.mp4 -i overlay.mp4 -filter_complex "[0:v]setpts=PTS-STARTPTS, scale=1280x720[top]; 
  [1:v]setpts=PTS-STARTPTS, scale=1280x720, format=yuva420p, 
  colorchannelmixer=aa=0.2[bottom]; [top][bottom]overlay=shortest=1" 
  -shortest -acodec copy -vcodec libx264 result1.mp4


    


    Even if I execute the following separate command on the result of the previous command - still no audio appears in the new result video.

    


      ffmpeg -i result1.mp4 -i audio.mp3 -c:v copy -c:a aac result2.mp4


    


    Here is the log :

    


    ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'course/final_video/3008_01_01_01_audio.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.76.100
  Duration: 00:06:01.48, start: 0.000000, bitrate: 215 kb/s
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 141 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 70 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'images/overlay.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.76.100
  Duration: 00:24:00.38, start: 0.000000, bitrate: 575 kb/s
  Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 442 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 11/22/2020.
      vendor_id       : [0][0][0][0]
  Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 11/22/2020.
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 (h264) -> setpts
  Stream #1:0 (h264) -> setpts
  overlay -> Stream #0:0 (libx264)
  Stream #1:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[swscaler @ 0x10c590000] No accelerated colorspace conversion found from yuva420p to argb.
[libx264 @ 0x7fc532813200] using SAR=1/1
[libx264 @ 0x7fc532813200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fc532813200] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x7fc532813200] 264 - core 161 r3049 55d517b - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'course/final_video/3008_01_01_01_overlay.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.76.100
  Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 12800 tbn (default)
    Metadata:
      encoder         : Lavc58.134.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 11/22/2020.
      vendor_id       : [0][0][0][0]

Stream mapping:
  Stream #0:0 (h264) -> setpts
  Stream #1:0 (h264) -> setpts
  overlay -> Stream #0:0 (libx264)
  Stream #1:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[swscaler @ 0x10c590000] No accelerated colorspace conversion found from yuva420p to argb.
[libx264 @ 0x7fc532813200] using SAR=1/1
[libx264 @ 0x7fc532813200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fc532813200] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x7fc532813200] 264 - core 161 r3049 55d517b - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'course/final_video/3008_01_01_01_overlay.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.76.100
  Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 12800 tbn (default)
    Metadata:
      encoder         : Lavc58.134.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 11/22/2020.
      vendor_id       : [0][0][0][0]
frame= 9037 fps= 32 q=-1.0 Lsize=   20954kB time=00:06:01.62 bitrate= 474.7kbits/s speed=1.26x    
video:15006kB audio:5651kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.439596%
[libx264 @ 0x7fc532813200] frame I:37    Avg QP:14.51  size:123799
[libx264 @ 0x7fc532813200] frame P:2277  Avg QP:16.97  size:  3221
[libx264 @ 0x7fc532813200] frame B:6723  Avg QP:24.31  size:   513
[libx264 @ 0x7fc532813200] consecutive B-frames:  0.8%  0.0%  0.0% 99.2%
[libx264 @ 0x7fc532813200] mb I  I16..4:  8.3% 64.9% 26.9%
[libx264 @ 0x7fc532813200] mb P  I16..4:  0.5%  1.1%  0.2%  P16..4: 16.1%  3.1%  2.3%  0.0%  0.0%    skip:76.7%
[libx264 @ 0x7fc532813200] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 10.5%  0.1%  0.0%  direct: 0.2%  skip:89.2%  L0:45.2% L1:54.7% BI: 0.1%
[libx264 @ 0x7fc532813200] 8x8 transform intra:63.6% inter:83.0%
[libx264 @ 0x7fc532813200] coded y,uvDC,uvAC intra: 56.4% 61.0% 42.7% inter: 1.9% 1.9% 0.0%
[libx264 @ 0x7fc532813200] i16 v,h,dc,p: 29% 18% 18% 35%
[libx264 @ 0x7fc532813200] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 19% 31%  4%  4%  4%  4%  5%  5%
[libx264 @ 0x7fc532813200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 22% 15%  4%  5%  6%  5%  5%  5%
[libx264 @ 0x7fc532813200] i8c dc,h,v,p: 51% 29% 14%  6%
[libx264 @ 0x7fc532813200] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fc532813200] ref P L0: 66.0%  6.9% 17.0% 10.1%
[libx264 @ 0x7fc532813200] ref B L0: 77.2% 20.6%  2.2%
[libx264 @ 0x7fc532813200] ref B L1: 90.2%  9.8%
[libx264 @ 0x7fc532813200] kb/s:340.06


    


  • FFMPEG frames lost

    4 juin 2018, par ST94

    I use ffmpeg to stream video from the source to destination. The workflow is as follows,
    At the source using ffmpeg, I stream live feed from a webcam using tcp and also save a copy of the live video as mp4 file locally and the command I use is

    $ ffmpeg -hide_banner -f v4l2 -i /dev/video0 -filter:v "fps=30" -c:v libx264 -f mpegts tcp://hostname:port -c:v libx264 /path/to/.mp4file

    `Input #0, video4linux2,v4l2, from '/dev/video0':
     Duration: N/A, start: 272402.639303, bitrate: 147456 kb/s
       Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
     Stream #0:0 -> #1:0 (rawvideo (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    No pixel format specified, yuv422p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 0x55e421ec9560] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x55e421ec9560] profile High 4:2:2, level 3.0, 4:2:2 8-bit
    Output #0, mpegts, to 'tcp://172.16.0.169:50000':
     Metadata:
       encoder         : Lavf57.71.100
       Stream #0:0: Video: h264 (libx264), yuv422p, 640x480, q=-1--1, 30 fps, 90k tbn, 30 tbc
       Metadata:
         encoder         : Lavc57.89.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    No pixel format specified, yuv422p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 0x55e421ed5ea0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x55e421ed5ea0] profile High 4:2:2, level 3.0, 4:2:2 8-bit
    [libx264 @ 0x55e421ed5ea0] 264 - core 148 r2795 aaa9aa8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #1, mp4, to '/path/to/tcp.mp4':
     Metadata:
       encoder         : Lavf57.71.100
       Stream #1:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv422p, 640x480, q=-1--1, 30 fps, 15360 tbn, 30 tbc
       Metadata:
         encoder         : Lavc57.89.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    [sana@localhost ~]$ frame=  978 fps= 30 q=-1.0 Lq=-1.0 size=    5062kB time=00:00:32.53 bitrate=1274.6kbits/s dup=514 drop=0 speed=0.991x    
    video:9174kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    [libx264 @ 0x55e421ec9560] frame I:463   Avg QP:19.03  size:  9994
    [libx264 @ 0x55e421ec9560] frame P:476   Avg QP:22.85  size:   137
    [libx264 @ 0x55e421ec9560] frame B:39    Avg QP:23.33  size:    19
    [libx264 @ 0x55e421ec9560] consecutive B-frames: 94.7%  0.0%  0.0%  5.3%
    [libx264 @ 0x55e421ec9560] mb I  I16..4: 60.4% 39.0%  0.5%
    [libx264 @ 0x55e421ec9560] mb P  I16..4:  0.2%  0.0%  0.0%  P16..4:  4.2%  0.3%  0.5%  0.0%  0.0%    skip:94.8%
    [libx264 @ 0x55e421ec9560] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%  L0:15.4% L1:84.6% BI: 0.0%
    [libx264 @ 0x55e421ec9560] 8x8 transform intra:38.9% inter:100.0%
    [libx264 @ 0x55e421ec9560] coded y,uvDC,uvAC intra: 34.9% 97.2% 83.8% inter: 0.0% 1.5% 0.0%
    [libx264 @ 0x55e421ec9560] i16 v,h,dc,p:  0% 31%  0% 69%
    [libx264 @ 0x55e421ec9560] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  3% 50% 16%  4%  2%  1%  6%  1% 17%
    [libx264 @ 0x55e421ec9560] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 52% 14%  4%  7%  3%  5%  1%  3%
    [libx264 @ 0x55e421ec9560] i8c dc,h,v,p: 55% 12% 25%  8%
    [libx264 @ 0x55e421ec9560] Weighted P-Frames: Y:0.2% UV:0.0%
    [libx264 @ 0x55e421ec9560] ref P L0: 96.7%  0.5%  2.7%  0.1%
    [libx264 @ 0x55e421ec9560] kb/s:1151.61
    [libx264 @ 0x55e421ed5ea0] frame I:463   Avg QP:19.02  size: 10007
    [libx264 @ 0x55e421ed5ea0] frame P:477   Avg QP:22.84  size:   140
    [libx264 @ 0x55e421ed5ea0] frame B:39    Avg QP:23.33  size:    19
    [libx264 @ 0x55e421ed5ea0] consecutive B-frames: 94.7%  0.0%  0.0%  5.3%
    [libx264 @ 0x55e421ed5ea0] mb I  I16..4: 60.4% 39.0%  0.5%
    [libx264 @ 0x55e421ed5ea0] mb P  I16..4:  0.3%  0.0%  0.0%  P16..4:  4.2%  0.3%  0.5%  0.0%  0.0%    skip:94.8%
    [libx264 @ 0x55e421ed5ea0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%  L0:15.4% L1:84.6% BI: 0.0%
    [libx264 @ 0x55e421ed5ea0] 8x8 transform intra:38.9% inter:100.0%
    [libx264 @ 0x55e421ed5ea0] coded y,uvDC,uvAC intra: 35.0% 97.2% 84.0% inter: 0.0% 1.6% 0.0%
    [libx264 @ 0x55e421ed5ea0] i16 v,h,dc,p:  0% 31%  0% 69%
    [libx264 @ 0x55e421ed5ea0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  3% 50% 16%  4%  2%  1%  6%  1% 17%
    [libx264 @ 0x55e421ed5ea0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 52% 14%  4%  7%  3%  5%  1%  3%
    [libx264 @ 0x55e421ed5ea0] i8c dc,h,v,p: 55% 12% 25%  8%
    [libx264 @ 0x55e421ed5ea0] Weighted P-Frames: Y:0.2% UV:0.0%
    [libx264 @ 0x55e421ed5ea0] ref P L0: 96.8%  0.5%  2.7%  0.1%
    [libx264 @ 0x55e421ed5ea0] kb/s:1152.39`

    At the receiver, I take the tcp url as the input and output it to an mp4 file.

    $ffmpeg -hide_banner -i tcp://hostname:port?listen out.mp4 /path/to/.mp4

    The output is

    `Input #0, mpegts, from 'tcp://172.16.0.169:50000?listen':
     Duration: N/A, start: 1.466667, bitrate: N/A
     Program 1
       Metadata:
         service_name    : Service01
         service_provider: FFmpeg
       Stream #0:0[0x100]: Video: h264 (High 4:2:2) ([27][0][0][0] / 0x001B), yuv422p(progressive), 640x480, 30 fps, 30 tbr, 90k tbn, 60 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    No pixel format specified, yuv422p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 0x55c1d6bff0a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x55c1d6bff0a0] profile High 4:2:2, level 3.0, 4:2:2 8-bit
    [libx264 @ 0x55c1d6bff0a0] 264 - core 148 r2795 aaa9aa8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to '/home/sana/Desktop/receiver_new_mp4/tcp2.mp4':
     Metadata:
       encoder         : Lavf57.71.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv422p, 640x480, q=-1--1, 30 fps, 15360 tbn, 30 tbc
       Metadata:
         encoder         : Lavc57.89.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    frame=  160 fps=0.0 q=26.0 size=     158kB time=00:00:03.36 bitrate= 384.5kbits/frame=  175 fps=168 q=26.0 size=     200kB time=00:00:03.86 bitrate= 424.8kbits/frame=  190 fps=119 q=26.0 size=     242kB time=00:00:04.36 bitrate= 453.3kbits/frame=  206 fps= 97 q=29.0 size=     292kB time=00:00:04.90 bitrate= 487.8kbits/frame=  222 fps= 84 q=29.0 size=     336kB time=00:00:05.43 bitrate= 506.5kbits/frame=  238 fps= 75 q=29.0 size=     378kB time=00:00:05.96 bitrate= 519.2kbits/frame=  254 fps= 68 q=29.0 size=     422kB time=00:00:06.50 bitrate= 531.6kbits/frame=  270 fps= 64 q=26.0 size=     457kB time=00:00:07.03 bitrate= 532.0kbits/frame=  286 fps= 60 q=29.0 size=     511kB time=00:00:07.56 bitrate= 552.8kbits/frame=  302 fps= 57 q=26.0 size=     562kB time=00:00:08.10 bitrate= 568.3kbits/frame=  318 fps= 54 q=26.0 size=     609kB time=00:00:08.63 bitrate= 577.9kbits/frame=  334 fps= 52 q=26.0 size=     674kB time=00:00:09.16 bitrate= 602.7kbits/frame=  350 fps= 51 q=29.0 size=     719kB time=00:00:09.70 bitrate= 606.8kbits/frame=  366 fps= 49 q=26.0 size=     770kB time=00:00:10.23 bitrate= 616.1kbits/frame=  382 fps= 48 q=29.0 size=     828kB time=00:00:10.76 bitrate= 630.3kbits/frame=  398 fps= 47 q=26.0 size=     872kB time=00:00:11.30 bitrate= 632.0kbits/frame=  414 fps= 46 q=26.0 size=     933kB time=00:00:11.83 bitrate= 645.9kbits/frame=  430 fps= 45 q=29.0 size=     987kB time=00:00:12.36 bitrate= 653.9kbits/frame=  446 fps= 44 q=26.0 size=    1033kB time=00:00:12.90 bitrate= 656.2kbits/frame=  462 fps= 43 q=29.0 size=    1098kB time=00:00:13.43 bitrate= 669.7kbits/frame=  478 fps= 43 q=29.0 size=    1132kB time=00:00:13.96 bitrate= 664.2kbits/frame=  548 fps= 47 q=-1.0 Lsize=    1536kB time=00:00:18.16 bitrate= 692.8kbits/s speed=1.56x    
    video:1531kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.377405%
    [libx264 @ 0x55c1d6bff0a0] frame I:115   Avg QP:18.12  size:  8204
    [libx264 @ 0x55c1d6bff0a0] frame P:203   Avg QP:21.62  size:  1893
    [libx264 @ 0x55c1d6bff0a0] frame B:230   Avg QP:21.99  size:  1039
    [libx264 @ 0x55c1d6bff0a0] consecutive B-frames: 41.1%  6.6%  7.1% 45.3%
    [libx264 @ 0x55c1d6bff0a0] mb I  I16..4: 67.6% 32.3%  0.1%
    [libx264 @ 0x55c1d6bff0a0] mb P  I16..4: 15.3%  3.1%  0.0%  P16..4: 28.6%  2.8%  2.0%  0.0%  0.0%    skip:48.3%
    [libx264 @ 0x55c1d6bff0a0] mb B  I16..4:  0.8%  0.3%  0.0%  B16..8: 26.2%  0.4%  0.0%  direct:13.5%  skip:58.7%  L0:65.0% L1:34.5% BI: 0.5%
    [libx264 @ 0x55c1d6bff0a0] 8x8 transform intra:28.4% inter:100.0%
    [libx264 @ 0x55c1d6bff0a0] coded y,uvDC,uvAC intra: 15.0% 89.4% 53.1% inter: 2.6% 28.7% 0.2%
    [libx264 @ 0x55c1d6bff0a0] i16 v,h,dc,p:  2% 49%  1% 47%
    [libx264 @ 0x55c1d6bff0a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  6% 57% 19%  2%  1%  1%  4%  1%  9%
    [libx264 @ 0x55c1d6bff0a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 59% 18%  1%  2%  1%  2%  0%  1%
    [libx264 @ 0x55c1d6bff0a0] i8c dc,h,v,p: 52% 17% 27%  4%
    [libx264 @ 0x55c1d6bff0a0] Weighted P-Frames: Y:17.7% UV:6.9%
    [libx264 @ 0x55c1d6bff0a0] ref P L0: 68.7%  0.7% 18.3% 10.6%  1.7%
    [libx264 @ 0x55c1d6bff0a0] ref B L0: 86.1% 10.6%  3.3%
    [libx264 @ 0x55c1d6bff0a0] ref B L1: 96.6%  3.4%
    [libx264 @ 0x55c1d6bff0a0] kb/s:686.10`

    From the ffmpeg processes running on both ends, if you notice the number of B frames at the receiver is more than the B frames at the sender. In other cases that I tried, the number of I as well as P frames are higher at the receiver than that at the sender.
    Can anyone please tell me why is it so ? I am not able to figure out why.