[FFmpeg-user] Slide show with vfr

Wolfgang Hugemann auto at hugemann.de
Sun Jan 24 19:23:07 EET 2021


I did one step backward and tried to construct a vfr video from the
scratch using slides a an input:

ffmpeg -y -f concat -i input.txt colors.mkv

with input.txt as:

ffconcat version 1.0
file 'red.png'
duration 250ms
file 'yellow.png'
duration 500ms
file 'green.png'
duration 500ms
file 'cyan.png'
duration 250ms
file 'blue.png'
duration 500ms
file 'black.png'
duration 500ms

This resulted in cfr for mp4 an vfr for mkv or webm (according to
MediaInfo, a Windows application). However, there seems to be something
wrong with the result colors.mkv, as no player, including ffplay uses
the specified durations.

This is the output:

ffmpeg version 2021-01-24-git-1775688292-full_build-www.gyan.dev
Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static
--disable-w32threads --disable-autodetect --enable-fontconfig
--enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp
--enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt
--enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray
--enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi
--enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg
--enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype
--enable-libfribidi --enable-libvidstab --enable-libvmaf
--enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid
--enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va
--enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan
--enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug
--enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame
--enable-libshine --enable-libtheora --enable-libtwolame
--enable-libvo-amrwbenc --enable-libilbc --enable-libgsm
--enable-libopencore-amrnb --enable-libopus --enable-libspeex
--enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite
--enable-libmysofa --enable-librubberband --enable-libsoxr
--enable-chromaprint
  libavutil      56. 63.101 / 56. 63.101
  libavcodec     58.117.101 / 58.117.101
  libavformat    58. 65.101 / 58. 65.101
  libavdevice    58. 11.103 / 58. 11.103
  libavfilter     7. 96.100 /  7. 96.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Input #0, concat, from 'input.txt':
  Duration: 00:00:05.00, start: 0.000000, bitrate: 0 kb/s
    Stream #0:0: Video: png, pal8(pc), 800x600, 25 fps, 25 tbr, 25 tbn,
25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 000002159ed90c00] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX
[libx264 @ 000002159ed90c00] profile High 4:4:4 Predictive, level 3.1,
4:4:4, 8-bit
[libx264 @ 000002159ed90c00] 264 - core 161 r3033 0d754ec - H.264/MPEG-4
AVC codec - Copyleft 2003-2020 - 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=4 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, matroska, to 'colors.mkv':
  Metadata:
    encoder         : Lavf58.65.101
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuv444p(tv,
progressive), 800x600, q=2-31, 25 fps, 1k tbn
    Metadata:
      encoder         : Lavc58.117.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=    1 fps=0.0 q=0.0 size=       1kB time=00:00:00.00 bitrate=N/A
speed=   0x
frame=   12 fps=0.0 q=-1.0 Lsize=       4kB time=00:00:03.76 bitrate=
9.2kbits/s speed=12.1x
video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 20.582470%
[libx264 @ 000002159ed90c00] frame I:1     Avg QP: 4.00  size:   194
[libx264 @ 000002159ed90c00] frame P:9     Avg QP: 4.89  size:    86
[libx264 @ 000002159ed90c00] frame B:2     Avg QP: 5.50  size:   960
[libx264 @ 000002159ed90c00] consecutive B-frames: 66.7% 33.3%  0.0%  0.0%
[libx264 @ 000002159ed90c00] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 000002159ed90c00] mb P  I16..4: 22.2%  0.0%  0.0%  P16..4:
0.0%  0.0%  0.0%  0.0%  0.0%    skip:77.8%
[libx264 @ 000002159ed90c00] mb B  I16..4: 99.9%  0.1%  0.0%  B16..8:
0.0%  0.0%  0.0%  direct: 0.0%  skip: 0.0%
[libx264 @ 000002159ed90c00] 8x8 transform intra:0.0% inter:100.0%
[libx264 @ 000002159ed90c00] coded y,u,v intra: 0.0% 0.0% 0.0% inter:
0.0% 0.0% 0.0%
[libx264 @ 000002159ed90c00] i16 v,h,dc,p: 97%  0%  3%  0%
[libx264 @ 000002159ed90c00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  0%  0% 100%
 0%  0%  0%  0%  0%  0%
[libx264 @ 000002159ed90c00] Weighted P-Frames: Y:77.8% UV:77.8%
[libx264 @ 000002159ed90c00] kb/s:4.58



More information about the ffmpeg-user mailing list