Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (15)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (2491)

  • Video conversion (using ffmpeg) fails only on server

    22 avril 2022, par wb.waldemar

    I'm trying to convert a video using latest static build of ffmpeg and following command :

    


    ffmpeg -report -y -loglevel info -i en--story-video.mp4 -c:v libx264 -preset slow -crf 22 -c:a copy en--story-video-out.mp4


    


    This works actually fine on Ubuntu (desktop) and the same command works also on Win 10 but not on the server (Debian GNU/Linux 10) where it should actually work. I can't install or build ffmpeg directly so I've to use a static build. Also simple remux works on the server but not the converion and I do not understand why. I've also read and tried different approaches and suggestions, but none of them could solve the problem.

    


    Does someone have an idea what goes wrong ?

    


    ffmpeg started on 2022-04-22 at 13:02:44
Report written to "ffmpeg-20220422-130244.log"
Log level: 48
Command line:
/dev/tools/ffmpeg -report -y -loglevel info -i en--story-video.mp4 -c:v libx264 -preset slow -crf 22 -c:a copy en--story-video-out.mp4
ffmpeg version N-60837-ge81242bb13-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
  libavutil      57. 22.100 / 57. 22.100
  libavcodec     59. 21.103 / 59. 21.103
  libavformat    59. 17.102 / 59. 17.102
  libavdevice    59.  5.100 / 59.  5.100
  libavfilter     8. 27.100 /  8. 27.100
  libswscale      6.  5.100 /  6.  5.100
  libswresample   4.  4.100 /  4.  4.100
  libpostproc    56.  4.100 / 56.  4.100
Splitting the commandline.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'info'.
Reading option '-i' ... matched as input url with argument 'en--story-video.mp4'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'libx264'.
Reading option '-preset' ... matched as AVOption 'preset' with argument 'slow'.
Reading option '-crf' ... matched as AVOption 'crf' with argument '22'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option 'en--story-video-out.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set logging level) with argument info.
Successfully parsed a group of options.
Parsing a group of options: input url en--story-video.mp4.
Successfully parsed a group of options.
Opening an input file: en--story-video.mp4.
[NULL @ 0xb9b3b80] Opening 'en--story-video.mp4' for reading
[file @ 0xb9b41c0] Setting default whitelist 'file,crypto,data'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Processing st: 0, edit list 0 - media time: 512, duration: 522240
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Offset DTS by 512 to make first pts zero.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Setting codecpar->delay to 2 for stream st: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Processing st: 1, edit list 0 - media time: 0, duration: 1502222
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Before avformat_find_stream_info() pos: 15666151 bytes read:88959 seeks:1 nb_streams:2
[h264 @ 0xb9b6380] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0xb9b6380] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0xb9b6380] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0xb9b6380] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0xb9b6380] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0xb9b6380] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0xb9b6380] Format yuv420p chosen by get_format().
[h264 @ 0xb9b6380] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0xb9b6380] no picture 
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] After avformat_find_stream_info() pos: 43534 bytes read:155045 seeks:2 frames:4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'en--story-video.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.17.102
  Duration: 00:00:34.06, start: 0.000000, bitrate: 3679 kb/s
  Stream #0:0[0x1](und), 3, 1/15360: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 3544 kb/s, 60 fps, 60 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 04/10/2019.
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng), 1, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 04/10/2019.
      vendor_id       : [0][0][0][0]
Successfully opened the file.
Parsing a group of options: output url en--story-video-out.mp4.
Applying option c:v (codec name) with argument libx264.
Applying option c:a (codec name) with argument copy.
Successfully parsed a group of options.
Opening an output file: en--story-video-out.mp4.
[file @ 0xb9fbec0] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
detected 20 logical cores
[h264 @ 0xba04680] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0xba04680] nal_unit_type: 8(PPS), nal_ref_idc: 3
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba04680] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0xba04680] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0xba04680] Format yuv420p chosen by get_format().
[h264 @ 0xba04680] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0xba04680] no picture 
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbaa3b80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[h264 @ 0xbaa3b80] no picture 
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba067c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba9c2c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba21fc0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbab8e80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbac7b00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbad6840] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbae5580] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbaf42c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb03000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb11d40] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb20a80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb2f7c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb3e500] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb4d240] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba04680] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
[h264 @ 0xbaa3b80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'video_size' to value '1920x1080'
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'time_base' to value '1/15360'
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'frame_rate' to value '60/1'
[graph 0 input from stream 0:0 @ 0xba9f800] w:1920 h:1080 pixfmt:yuv420p tb:1/15360 fr:60/1 sar:1/1
[format @ 0xbaa0540] Setting 'pix_fmts' to value 'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le|gray|gray10le'
[AVFilterGraph @ 0xba16380] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[libx264 @ 0xba03c80] using mv_range_thread = 24
[libx264 @ 0xba03c80] using SAR=1/1
[libx264 @ 0xba03c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[AVIOContext @ 0xb9fba00] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[AVIOContext @ 0xb9b4480] Statistics: 220581 bytes read, 2 seeks
Conversion failed!


    


  • Concat failing with ffmpeg 5.0 vs ffmpeg 4.1.1

    16 avril 2022, par Woolwit

    I have ffmpeg 5.0 installed on a new Silicon M1 Mac Mini running Monterey and concat is failing with the same command that has served me well on ffmpeg 4.1.1 lo, all these many years. Anyone have an idea why this command would fail on the newer version of ffmpeg.
This is with the exact same mp4 files. The ffmpeg 4.1.1. completes the concat in less than a minute.

    


    ffmpeg -i vid1.mp4 -i vid2.mp4 -filter_complex "[0:v:0] [0:a:0] [1:v:0] [1:a:0] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" output.mp4



    


    Thank you !

    


    ffmpeg 4.1.1 Info and output...

    


    $ ffmpeg -version
ffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom -


$ ffmpeg -i vid1.mp4 -i vid2.mp4 -filter_complex "[0:v:0] [0:a:0] [1:v:0] [1:a:0] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" output.mp4
ffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr --enable-libvidstab
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'vid1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.16.100
  Duration: 00:00:13.01, start: 0.000000, bitrate: 1240 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x480, 1103 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'vid2.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.16.100
  Duration: 00:00:07.00, start: 0.000000, bitrate: 122 kb/s
    Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x480 [SAR 1:1 DAR 3:2], 112 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 (h264) -> concat:in0:v0
  Stream #0:1 (aac) -> concat:in0:a0
  Stream #1:0 (h264) -> concat:in1:v0
  Stream #1:1 (aac) -> concat:in1:a0
  concat:out:v0 -> Stream #0:0 (libx264)
  concat:out:a0 -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[libx264 @ 0x7fd56881dc00] using SAR=1/1
[libx264 @ 0x7fd56881dc00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
[libx264 @ 0x7fd56881dc00] profile High, level 3.0
[libx264 @ 0x7fd56881dc00] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - 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=3 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 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.20.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 720x480 [SAR 1:1 DAR 3:2], q=-1--1, 29.97 fps, 11988 tbn, 29.97 tbc (default)
    Metadata:
      encoder         : Lavc58.35.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      encoder         : Lavc58.35.100 aac
frame=   46 fps=0.0 q=0.0 size=       0kB time=00:00:01.55 bitrate=   0.2kbits/s spframe=   64 fps= 57 q=26.0 size=       0kB time=00:00:02.15 bitrate=   0.2kbits/s sframe=   83 fps= 51 q=29.0 size=       0kB time=00:00:02.78 bitrate=   0.1kbits/s sframe=  106 fps= 49 q=26.0 size=       0kB time=00:00:03.55 bitrate=   0.1kbits/s sframe=  131 fps= 49 q=29.0 size=     256kB time=00:00:04.38 bitrate= 478.0kbits/s sframe=  155 fps= 49 q=29.0 size=     256kB time=00:00:05.20 bitrate= 403.3kbits/s sframe=  178 fps= 48 q=29.0 size=     512kB time=00:00:05.96 bitrate= 702.9kbits/s sframe=  198 fps= 47 q=26.0 size=     512kB time=00:00:06.61 bitrate= 633.9kbits/s sframe=  218 fps= 46 q=29.0 size=     512kB time=00:00:07.26 bitrate= 577.2kbits/s sframe=  238 fps= 46 q=29.0 size=     768kB time=00:00:07.96 bitrate= 790.0kbits/s sframe=  255 fps= 44 q=29.0 size=     768kB time=00:00:08.52 bitrate= 738.3kbits/s sframe=  278 fps= 45 q=26.0 size=     768kB time=00:00:09.28 bitrate= 677.4kbits/s sframe=  296 fps= 44 q=29.0 size=    1024kB time=00:00:09.89 bitrate= 848.1kbits/s sframe=  317 fps= 43 q=29.0 size=    1024kB time=00:00:10.58 bitrate= 792.3kbits/s sframe=  333 fps= 42 q=29.0 size=    1024kB time=00:00:11.12 bitrate= 754.2kbits/s sframe=  351 fps= 42 q=29.0 size=    1024kB time=00:00:11.72 bitrate= 715.4kbits/s sframe=  363 fps= 41 q=29.0 size=    1024kB time=00:00:12.14 bitrate= 690.8kbits/s sframe=  377 fps= 40 q=29.0 size=    1280kB time=00:00:12.60 bitrate= 831.7kbits/s sframe=  389 fps= 39 q=29.0 size=    1280kB time=00:00:12.95 bitrate= 809.3kbits/s sframe=  401 fps= 38 q=29.0 size=    1280kB time=00:00:13.39 bitrate= 782.7kbits/s dframe=  410 fps= 37 q=29.0 size=    1280kB time=00:00:13.72 bitrate= 764.1kbits/s dframe=  425 fps= 37 q=29.0 size=    1536kB time=00:00:14.18 bitrate= 886.9kbits/s dframe=  446 fps= 37 q=29.0 size=    1536kB time=00:00:14.90 bitrate= 844.1kbits/s dframe=  506 fps= 40 q=29.0 size=    1536kB time=00:00:16.90 bitrate= 744.4kbits/s dframe=  564 fps= 43 q=29.0 size=    1536kB time=00:00:18.83 bitrate= 668.2kbits/s dframe=  600 fps= 44 q=-1.0 Lsize=    1807kB time=00:00:20.03 bitrate= 738.9kbits/s dup=35 drop=0 speed=1.45x    
video:1580kB audio:206kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.204253%
[libx264 @ 0x7fd56881dc00] frame I:74    Avg QP:19.97  size:  9747
[libx264 @ 0x7fd56881dc00] frame P:205   Avg QP:19.82  size:  2384
[libx264 @ 0x7fd56881dc00] frame B:321   Avg QP:20.41  size:  1269
[libx264 @ 0x7fd56881dc00] consecutive B-frames: 25.8%  5.3%  9.5% 59.3%
[libx264 @ 0x7fd56881dc00] mb I  I16..4: 17.8% 79.7%  2.5%
[libx264 @ 0x7fd56881dc00] mb P  I16..4:  2.7%  5.7%  0.7%  P16..4: 17.7%  3.1%  1.2%  0.0%  0.0%    skip:68.8%
[libx264 @ 0x7fd56881dc00] mb B  I16..4:  0.3%  1.1%  0.1%  B16..8: 18.4%  1.7%  0.2%  direct: 1.6%  skip:76.5%  L0:57.0% L1:40.0% BI: 3.0%
[libx264 @ 0x7fd56881dc00] 8x8 transform intra:75.9% inter:87.2%
[libx264 @ 0x7fd56881dc00] coded y,uvDC,uvAC intra: 54.9% 8.2% 1.3% inter: 6.5% 6.0% 0.9%
[libx264 @ 0x7fd56881dc00] i16 v,h,dc,p: 44% 34% 14%  8%
[libx264 @ 0x7fd56881dc00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 22% 30%  4%  5%  3%  5%  3%  5%
[libx264 @ 0x7fd56881dc00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 41% 29%  1%  2%  2%  2%  1%  1%
[libx264 @ 0x7fd56881dc00] i8c dc,h,v,p: 92%  5%  1%  1%
[libx264 @ 0x7fd56881dc00] Weighted P-Frames: Y:1.5% UV:0.5%
[libx264 @ 0x7fd56881dc00] ref P L0: 58.7%  9.7% 21.6% 10.0%  0.1%
[libx264 @ 0x7fd56881dc00] ref B L0: 85.1% 11.6%  3.3%
[libx264 @ 0x7fd56881dc00] ref B L1: 95.7%  4.3%
[libx264 @ 0x7fd56881dc00] kb/s:646.32
[aac @ 0x7fd56881f400] Qavg: 23136.783
$


    


    ffmpeg 5.0 Info and output... It never completes

    


    % ffmpeg -version
ffmpeg version 5.0-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2022 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)

% ffmpeg -i vid1.mp4 -i vid2.mp4 -filter_complex "[0:v:0] [0:a:0] [1:v:0] [1:a:0] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" output.mp4
ffmpeg version 5.0-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2022 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'vid1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.16.100
  Duration: 00:00:13.01, start: 0.000000, bitrate: 1240 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 720x480, 1103 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'vid2.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.16.100
  Duration: 00:00:07.00, start: 0.000000, bitrate: 122 kb/s
  Stream #1:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 720x480 [SAR 1:1 DAR 3:2], 112 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #1:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 (h264) -> concat
  Stream #0:1 (aac) -> concat
  Stream #1:0 (h264) -> concat
  Stream #1:1 (aac) -> concat
  concat -> Stream #0:0 (libx264)
  concat -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[mp4 @ 0x7fbab280dbc0] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
[libx264 @ 0x7fbab280e840] using SAR=1/1
[libx264 @ 0x7fbab280e840] MB rate (1350000000) > level limit (16711680)
[libx264 @ 0x7fbab280e840] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x7fbab280e840] profile High, level 6.2, 4:2:0, 8-bit
[libx264 @ 0x7fbab280e840] 264 - core 164 r3081 19856cc - 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=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 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.16.100
  Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 720x480 [SAR 1:1 DAR 3:2], q=2-31, 1000k tbn
    Metadata:
      encoder         : Lavc59.18.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc59.18.100 aac
frame=    1 fps=0.0 q=0.0 size=       0kB time=00:00:00.23 bitrate=   1.7kbits/sMore than 1000 frames duplicated
frame=33367 fps=843 q=33.0 size=    2048kB time=00:00:00.27 bitrate=60212.7kbitsMore than 10000 frames duplicatedx    
frame=66733 fps=841 q=33.0 size=    4352kB time=00:00:00.32 bitrate=109671.7kbitMore than 100000 frames duplicatedx    
frame=100100 fps=825 q=33.0 size=    6656kB time=00:00:00.34 bitrate=156550.4kbiframe=133467 fps=806 q=33.0 size=    8704kB time=00:00:00.39 bitrate=180634.7kbiframe=166834 fps=810 q=33.0 size=   11008kB time=00:00:00.41 bitrate=215757.8kbiframe=200200 fps=812 q=33.0 size=   13312kB time=00:00:00.46 bitrate=234824.6kbiframe=233567 fps=814 q=33.0 size=   153
...


    


  • FFmpeg not cropping video correctly

    7 avril 2022, par user973254

    I'm using ffmpeg as :

    


    ffmpeg -i "video.webm" -c:v libx264 -vf "crop=in_w:in_h:in_w/2:in_h" -ss 00:02:56.000 -to 00:03:02.750 cut.mp4 -y


    


    to get left side of screen to crop out right one, but in result I'm getting uncropped video (both sides present), when I change command to get right side (to crop out left one) :

    


    ffmpeg -i "video.webm" -c:v libx264 -vf "crop=in_w/2:in_h:in_w:in_h" -ss 00:2:56.000 -to 00:03:02.750 cut.mp4 -y


    


    everything works as it should (only right side of original video presents in "cut.mp4").

    


    What am I doing wrong ?

    


    P.S.

    


    ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11.2.1 (Gentoo 11.2.1_p20220115 p4) 20220115
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/share/doc/ffmpeg-4.4.1-r5/html --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --nm=x86_64-pc-linux-gnu-nm --strip=x86_64-pc-linux-gnu-strip --ranlib=x86_64-pc-linux-gnu-ranlib --pkg-config=x86_64-pc-linux-gnu-pkg-config --optflags='-march=native -O2 -pipe' --extra-libs= --disable-static --enable-avfilter --enable-avresample --disable-stripping --disable-optimizations --disable-libcelt --enable-nonfree --disable-indev=v4l2 --disable-outdev=v4l2 --disable-indev=alsa --disable-indev=oss --disable-indev=jack --disable-indev=sndio --disable-outdev=alsa --disable-outdev=oss --disable-outdev=sndio --enable-version3 --enable-bzlib --enable-runtime-cpudetect --disable-debug --disable-gcrypt --enable-gnutls --enable-gmp --enable-gpl --disable-hardcoded-tables --enable-iconv --disable-libxml2 --enable-lzma --enable-network --disable-opencl --enable-openssl --enable-postproc --disable-libsmbclient --disable-ffplay --disable-sdl2 --disable-vaapi --disable-vdpau --disable-vulkan --disable-xlib --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-zlib --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --disable-opengl --disable-libv4l2 --disable-libpulse --disable-libdrm --disable-libjack --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libcodec2 --enable-libdav1d --disable-libfdk-aac --disable-libopenjpeg --disable-libbluray --disable-libgme --disable-libgsm --disable-libaribb24 --disable-mmal --disable-libmodplug --disable-libopus --disable-libilbc --disable-librtmp --disable-libssh --disable-libspeex --disable-libsrt --enable-librsvg --disable-ffnvcodec --disable-libvorbis --disable-libvpx --disable-libzvbi --disable-appkit --disable-libbs2b --disable-chromaprint --disable-cuda-llvm --disable-libflite --disable-frei0r --disable-libvmaf --disable-libfribidi --disable-fontconfig --disable-ladspa --disable-libass --disable-libtesseract --disable-lv2 --enable-libfreetype --disable-libvidstab --disable-librubberband --disable-libzmq --disable-libzimg --disable-libsoxr --enable-pthreads --disable-amf --disable-libvo-amrwbenc --disable-libkvazaar --disable-libaom --disable-libmp3lame --disable-libopenh264 --disable-librav1e --disable-libsnappy --disable-libsvtav1 --disable-libtheora --disable-libtwolame --enable-libwebp --enable-libx264 --disable-libx265 --disable-libxvid --disable-gnutls --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-vfpv3 --disable-armv8 --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-vsx --disable-power8 --disable-amd3dnow --disable-amd3dnowext --disable-fma3 --disable-fma4 --disable-xop --cpu=host --disable-doc --disable-htmlpages --enable-manpages
  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, matroska,webm, from 'video.webm':
  Metadata:
    ENCODER         : Lavf58.76.100
  Duration: 00:36:29.58, start: -0.007000, bitrate: 1066 kb/s
  Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 1920x1080, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      DURATION        : 00:36:29.560000000
  Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:36:29.581000000
Stream mapping:
  Stream #0:0 -> #0:0 (vp9 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (opus (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x564b4eda52c0] using SAR=1/1
[libx264 @ 0x564b4eda52c0] using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX
[libx264 @ 0x564b4eda52c0] profile Progressive High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0x564b4eda52c0] 264 - core 157 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - 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=15 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 'cut.mp4':
  Metadata:
    encoder         : Lavf58.76.100
  Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 12800 tbn (default)
    Metadata:
      DURATION        : 00:36:29.560000000
      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(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      DURATION        : 00:36:29.581000000
      encoder         : Lavc58.134.100 aac
frame=  169 fps= 28 q=-1.0 Lsize=     851kB time=00:00:06.74 bitrate=1033.9kbits/s speed=1.12x
video:738kB audio:106kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.764865%
[libx264 @ 0x564b4eda52c0] frame I:1     Avg QP:14.29  size: 31413
[libx264 @ 0x564b4eda52c0] frame P:43    Avg QP:16.65  size:  9476
[libx264 @ 0x564b4eda52c0] frame B:125   Avg QP:22.36  size:  2529
[libx264 @ 0x564b4eda52c0] consecutive B-frames:  1.2%  0.0%  1.8% 97.0%
[libx264 @ 0x564b4eda52c0] mb I  I16..4: 31.6% 63.8%  4.6%
[libx264 @ 0x564b4eda52c0] mb P  I16..4:  1.4%  5.4%  0.3%  P16..4: 13.8%  3.2%  1.0%  0.0%  0.0%    skip:75.0%
[libx264 @ 0x564b4eda52c0] mb B  I16..4:  0.1%  0.2%  0.0%  B16..8: 11.4%  0.7%  0.1%  direct: 0.4%  skip:87.0%  L0:48.2% L1:48.1% BI: 3.7%
[libx264 @ 0x564b4eda52c0] 8x8 transform intra:73.0% inter:90.2%
[libx264 @ 0x564b4eda52c0] coded y,uvDC,uvAC intra: 38.9% 41.7% 6.4% inter: 2.2% 2.7% 0.0%
[libx264 @ 0x564b4eda52c0] i16 v,h,dc,p: 45% 18%  5% 31%
[libx264 @ 0x564b4eda52c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 20% 22%  5%  6%  7%  5%  7%  5%
[libx264 @ 0x564b4eda52c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 22% 14%  6% 10%  8%  7%  5%  3%
[libx264 @ 0x564b4eda52c0] i8c dc,h,v,p: 55% 19% 19%  6%
[libx264 @ 0x564b4eda52c0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x564b4eda52c0] ref P L0: 67.6%  9.2% 16.0%  7.3%
[libx264 @ 0x564b4eda52c0] ref B L0: 88.6%  9.5%  1.9%
[libx264 @ 0x564b4eda52c0] ref B L1: 97.3%  2.7%
[libx264 @ 0x564b4eda52c0] kb/s:893.47
[aac @ 0x564b4edde600] Qavg: 208.505