[FFmpeg-user] How to improve result of transitions
Rob Hallam
ffmpeg at roberthallam.com
Tue Jun 22 20:00:06 EEST 2021
On Tue, 22 Jun 2021 at 17:52, Carl Zwanzig <cpz at tuunq.com> wrote:
>
> On 6/22/2021 9:26 AM, Rob Hallam wrote:
> > Is that always true? When I have tried (eg [1]) the second input
> > starts*after* the first, easiest to see with eg testsrc filter.
>
> No time to try this at the moment, but might that be an artifact of using
> the lavfi device? I wouldn't think so, but maybe. A better test would be
> with two files.
I see the same behaviour with two files, generated from the different
lavfi inputs:
ffmpeg -f lavfi -i color=black:640x480:d=3 -c:v h264 black.mkv
ffmpeg -f lavfi -i testsrc=duration=3:size=640x480 -c:v h264 -crf 20
-an -pix_fmt yuv420p testsrc.mkv
ffmpeg -i black.mkv -i testsrc.mkv -c:v h264 -crf 20 -an -pix_fmt
yuv420p -filter_complex
"xfade=transition=radial:duration=0.5:offset=2.5" wb7.mkv
testsrc seems to start during xfade filter. Output appended for this example.
Cheers,
Rob
--
ffmpeg version n4.4 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11.1.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static
--disable-stripping --enable-amf --enable-avisynth -
-enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp
--enable-gnutls --enable-gpl --enable-ladspa --enabl
e-libaom --enable-libass --enable-libbluray --enable-libdav1d
--enable-libdrm --enable-libfreetype --enable-libfribi
di --enable-libgsm --enable-libiec61883 --enable-libjack
--enable-libmfx --enable-libmodplug --enable-libmp3lame --e
nable-libopencore_amrnb --enable-libopencore_amrwb
--enable-libopenjpeg --enable-libopus --enable-libpulse --enable-
librav1e --enable-librsvg --enable-libsoxr --enable-libspeex
--enable-libsrt --enable-libssh --enable-libsvtav1 --en
able-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf
--enable-libvorbis --enable-libvpx --enable-lib
webp --enable-libx264 --enable-libx265 --enable-libxcb
--enable-libxml2 --enable-libxvid --enable-libzimg --enable-n
vdec --enable-nvenc --enable-shared --enable-version3
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
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 'black.mkv':
Metadata:
ENCODER : Lavf58.76.100
Duration: 00:00:03.00, start: 0.000000, bitrate: 9 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 640x480 [SAR
1:1 DAR 4:3], 25 fps, 25 tbr, 1k tbn, 50 tbc (
default)
Metadata:
ENCODER : Lavc58.134.100 libx264
DURATION : 00:00:03.000000000
Input #1, matroska,webm, from 'testsrc.mkv':
Metadata:
ENCODER : Lavf58.76.100
Duration: 00:00:03.00, start: 0.000000, bitrate: 75 kb/s
Stream #1:0: Video: h264 (High), yuv420p(tv, progressive), 640x480
[SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 1k tbn, 50 t
bc (default)
Metadata:
ENCODER : Lavc58.134.100 libx264
DURATION : 00:00:03.000000000
Stream mapping:
Stream #0:0 (h264) -> xfade:main
Stream #1:0 (h264) -> xfade:xfade
xfade -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[libx264 @ 0x560396d77e00] using SAR=1/1
[libx264 @ 0x560396d77e00] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x560396d77e00] profile High, level 3.0, 4:2:0, 8-bit
[libx264 @ 0x560396d77e00] 264 - core 161 r3039 544c61f - H.264/MPEG-4
AVC codec - Copyleft 2003-2021 - http://www.v
ideolan.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 thread
s=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_r
efresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0
qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, matroska, to '/tmp/wb7.mkv':
Metadata:
encoder : Lavf58.76.100
Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p(tv,
progressive), 640x480 [SAR 1:1 DAR 4:3], q=2-31, 25 fps,
1k 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
frame= 138 fps=0.0 q=-1.0 Lsize= 50kB time=00:00:05.40 bitrate=
75.9kbits/s speed=12.3x
video:48kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 3.205787%
[libx264 @ 0x560396d77e00] frame I:2 Avg QP:10.54 size: 1624
[libx264 @ 0x560396d77e00] frame P:40 Avg QP:11.19 size: 877
[libx264 @ 0x560396d77e00] frame B:96 Avg QP:11.50 size: 111
[libx264 @ 0x560396d77e00] consecutive B-frames: 7.2% 0.0% 0.0% 92.8%
[libx264 @ 0x560396d77e00] mb I I16..4: 67.1% 31.1% 1.8%
[libx264 @ 0x560396d77e00] mb P I16..4: 4.1% 2.4% 0.5% P16..4:
3.8% 1.9% 0.2% 0.0% 0.0% skip:87.1%
[libx264 @ 0x560396d77e00] mb B I16..4: 0.3% 0.1% 0.0% B16..8:
1.9% 0.1% 0.0% direct: 0.4% skip:97.2% L0:
56.9% L1:40.0% BI: 3.1%
[libx264 @ 0x560396d77e00] 8x8 transform intra:32.2% inter:86.9%
[libx264 @ 0x560396d77e00] coded y,uvDC,uvAC intra: 7.7% 38.1% 16.0%
inter: 0.2% 1.9% 0.4%
[libx264 @ 0x560396d77e00] i16 v,h,dc,p: 68% 6% 3% 23%
[libx264 @ 0x560396d77e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 20% 45%
5% 2% 1% 2% 2% 2%
[libx264 @ 0x560396d77e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 38% 17%
3% 2% 2% 1% 2% 1%
[libx264 @ 0x560396d77e00] i8c dc,h,v,p: 47% 10% 28% 14%
[libx264 @ 0x560396d77e00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x560396d77e00] ref P L0: 78.7% 3.1% 15.3% 2.9%
[libx264 @ 0x560396d77e00] ref B L0: 63.4% 31.3% 5.3%
[libx264 @ 0x560396d77e00] ref B L1: 94.3% 5.7%
[libx264 @ 0x560396d77e00] kb/s:70.93
More information about the ffmpeg-user
mailing list