1
I would like to convert a high quality non interlaced input video into a less quality but wider distributable H.264/MP4 format. The output should have some constraints - in particular: it should be interlaced!
I tried the following command, where mandelbrot
is a synonymous for the high quality input:
ffmpeg -hide_banner \
-t 10 -y \
-f lavfi \
-i anullsrc=r=48k:cl=stereo \
-f lavfi \
-i mandelbrot=r=50:size=1920x1080 \
-vf 'interlace=scan=tff:lowpass=complex,format=yuv420p' \
-codec:a aac \
-b:a 128k \
-aac_coder twoloop \
-codec:v libx264 \
-preset veryfast \
-tune animation \
-profile:v high \
-crf 35 \
-level 5.2 \
-x264opts interlaced=1 \
-shortest \
mandelbrot.mp4
My ffmpeg is ffmpeg version 3.4.2-2
.
However, I am not sure that the command line is correct.
libx264
does not detect an interlaced input by itself. I have to insert-x264opts interlaced=1
.- Other faq's tell something about
-flags +ilme+ildct
...
Can you confirm my parameters? Thank you very much.
1"it should be interlaced" ... why? Interlacing is a hangover from the days of CRTs, it has no place in the modern world and looks really bad. – Attie – 2018-07-30T13:19:18.370
Generally you are right... I recommend progressive in the digital world to everyone... But take this special case as a challenge... ;-) – Thomas R. – 2018-07-30T13:58:46.007
So why is interlacing needed in your case? Just curious… – slhck – 2018-07-30T14:36:37.837
Think of having a few hardware video players. Actually some of them have technical specification. Then you brew a video file exactly as described in those manuals. But the player refuse to play back. That is why I would like to generate both progressive and interlaced files... – Thomas R. – 2018-07-30T15:04:51.677
might be worth noting - I had some issues with generating interlaced mp4 files with ffmpeg and tried with many different parameters. Video worked correctly in a software player, but it appeared corrupt on air. I can't recall all specific details now, just saying - if that is for serious application you should test it on a real hardware, might happen you will need a proprietary encoder for ensuring compatibility. – Mikhail V – 2018-07-30T19:34:35.267