timebase error while giving effect using FFMPEG
I am giving effects to the multiple video's and I am getting timebase error. Please help me fixing the same.
Error below: [Parsed_xfade_0 @ 000000f9115e4700] First input link main timebase (1/10000) do not match the corresponding second input link xfade timebase (1/12800) [Parsed_xfade_0 @ 000000f9115e4700] Failed to configure output pad on Parsed_xfa de_0 Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Error while processing the decoded data for stream #4:0 Conversion failed!
Command below:
ffmpeg -i 6442.mov
-i 1339.mov
-i 3792.mov
-i 3332.mov
-i 2645.mov
-filter_complex "[0][1]xfade=transition=fade:duration=0.5:offset=2[V01];
[V01][2]xfade=transition=fade:duration=0.5:offset=7.5[V02];
[V02][3]xfade=transition=fade:duration=0.5:offset=190.44[V03];
[V03][4]xfade=transition=fade:duration=0.5:offset=195.94,format=yuv420p[video];
[0:a][1:a]acrossfade=d=0.5:c1=tri:c2=tri[A01];[A01][2:a]acrossfade=d=0.5:c1=tri:c2=tri[A02];
[A02][3:a]acrossfade=d=0.5:c1=tri:c2=tri[A03];[A03][4:a]acrossfade=d=0.5:c1=tri:c2=tri[audio]" -map "[video]"
-map "[audio]" -movflags +faststart 3914.mov
Solution 1:
The xfade filter requires both inputs to have the same timebase. Also, the same resolution and framerate. The framerate is checked after the timebase, so if you get errors related to that, add fps=30 after the settb filter.
ffmpeg -i 6442.mov
-i 1339.mov
-i 3792.mov
-i 3332.mov
-i 2645.mov
-filter_complex "
[0]settb=AVTB[0v];
[1]settb=AVTB[1v];
[2]settb=AVTB[2v];
[3]settb=AVTB[3v];
[4]settb=AVTB[4v];
[0v][1v]xfade=transition=fade:duration=0.5:offset=2[V01];
[V01][2v]xfade=transition=fade:duration=0.5:offset=7.5[V02];
[V02][3v]xfade=transition=fade:duration=0.5:offset=190.44[V03];
[V03][4v]xfade=transition=fade:duration=0.5:offset=195.94,format=yuv420p[video];
[0:a][1:a]acrossfade=d=0.5:c1=tri:c2=tri[A01];[A01][2:a]acrossfade=d=0.5:c1=tri:c2=tri[A02];
[A02][3:a]acrossfade=d=0.5:c1=tri:c2=tri[A03];[A03][4:a]acrossfade=d=0.5:c1=tri:c2=tri[audio]" -map "[video]"
-map "[audio]" -movflags +faststart 3914.mov