[FFmpeg-user] splitting and concatenating file results in a different file

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed Nov 6 02:27:23 EET 2019


Am Do., 31. Okt. 2019 um 19:15 Uhr schrieb Jon Beyer <jbeyer at gmail.com>:

> ffmpeg -i concat.mp4 video2/frames_%05d.jpg
>
> ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers

Unrelated:
Please understand that only current FFmpeg git head is supported here
and that there is absolutely no release support for macos.

>   built with Apple clang version 11.0.0 (clang-1100.0.33.8)
>   configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.1_1 --enable-shared
> --enable-pthreads --enable-version3 --enable-avresample --cc=clang
> --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include
> -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include/darwin
> -fno-stack-check' --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-libvidstab
> --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-libsoxr --enable-videotoolbox --disable-libjack
> --disable-indev=jack
>   libavutil      56. 31.100 / 56. 31.100
>   libavcodec     58. 54.100 / 58. 54.100
>   libavformat    58. 29.100 / 58. 29.100
>   libavdevice    58.  8.100 / 58.  8.100
>   libavfilter     7. 57.100 /  7. 57.100
>   libavresample   4.  0.  0 /  4.  0.  0
>   libswscale      5.  5.100 /  5.  5.100
>   libswresample   3.  5.100 /  3.  5.100
>   libpostproc    55.  5.100 / 55.  5.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat.mp4':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2avc1mp41
>     encoder         : Lavf58.29.100
>   Duration: 00:02:15.94, start: 0.000000, bitrate: 5037 kb/s
>     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> 1280x720 [SAR 1:1 DAR 16:9], 4903 kb/s, 29.98 fps, 30 tbr, 15360 tbn, 60
> tbc (default)
>     Metadata:
>       handler_name    : VideoHandler
>     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
> stereo, fltp, 128 kb/s (default)
>     Metadata:
>       handler_name    : SoundHandler
> Stream mapping:
>   Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
> Press [q] to stop, [?] for help
> [swscaler @ 0x10ecd7000] deprecated pixel format used, make sure you did
> set range correctly
> Output #0, image2, to 'video2/frames_%05d.jpg':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2avc1mp41
>     encoder         : Lavf58.29.100
>     Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 1280x720 [SAR 1:1 DAR
> 16:9], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default)
>     Metadata:
>       handler_name    : VideoHandler
>       encoder         : Lavc58.54.100 mjpeg
>     Side data:
>       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1

> frame= 4076 fps= 73 q=24.8 Lsize=N/A time=00:02:15.86 bitrate=N/A dup=3
> drop=0 speed=2.44x

This indicates three frames were duplicated.

> video:97160kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: unknown

You can avoid the duplication with -vsync 0 at the cost of likely A/V desync.

Carl Eugen


More information about the ffmpeg-user mailing list