ffmpeg - top coded first (swapped) vs progressive -top 1 does not stick

1.4k views Asked by At

please help: I'm encoding a video, and because of my specific use-case, I have to encode it twice, in sequence, so that the output from the first run of ffmpeg goes into second encoding of ffmpeg as an input. I use "-top 1" option to force "top coded first (swapped)".

When encoding the first iteration of encoding, everything works great (output from ffprobe below):

Duration: 00:00:22.16, start: 0.000000, bitrate: 61390 kb/s
    Stream #0:0(eng): Video: mpeg2video (4:2:2) (xd5c / 0x63356478), yuv422p(tv, bt709, top coded first (swapped)), 1920x1080 ... etc-etc.

However, when I run the second iteration, the "top coded first (swapped)" switches to "progressive"

I tried removing the "top 1" option from my first iteration and only add it to the second, without success". What am I doing wrong? Please advise. The first iteration adds special watermark on the video, hence the filter_complex:

ffmpeg -i pre-input.mov -c:v prores_ks -profile:v 3 -pix_fmt yuv422p10le -b:v 178458816 -maxrate 178458816 -minrate 178458816 -r 29.97 -top 1 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -vtag apch -c:a copy -c:s copy -qscale 0 -filter_complex " my_filter=enable='between(t,2,22)':x=1050:y=108:size=184:contrast=40:string=hello " -y output.mov

Just to be clear, same parameters as on the second iteration, and produces exactly what I need.

The only thing I'd add is that on my second iteration I'm using:

ffmpeg -i input.mov -filter_complex " [0][1]overlay=1504:214:enable='between(t,2,3.600)'[v1]; [v1][2]overlay=1504:214:enable='between(t,4,5.500)'[v2]; [v2][3]overlay=1504:214:enable='between(t,6,20)'[v3]" -map '[v3]' -map 0:a ... etc-etc.

from the 3 images that I'm overlaying on top of the video.

0

There are 0 answers