[FFmpeg-user] MPEG-2 encoding problem
Carl Eugen Hoyos
ceffmpeg at gmail.com
Thu Feb 14 18:43:19 EET 2019
2019-02-14 14:14 GMT+01:00, Jane <friendjane at nefu.edu.cn>:
> Hello everyone! I'm encoding video to MPEG-2 using Zeranoe's Windows
> builds. The source file is 720p 60fps, progressive. I want to keep high
> quality and compatibility with DVD standards, so I use:
> ffmpeg -hwaccel auto -i "input" -vf scale=ntsc,interlace,fps=fps=29.97 -c:v
> mpeg2video -q:v 3 -g 15 -mpeg_quant 1 -aspect 16:9 -sc_threshold 40 -bf 2
> -intra_vlc 1 -b_stratgey 2 -flags ilme+ildct -maxrate 9M -bufsize 224k -c:a
> mp2 -b:a 224k "output"
Apart from what Moritz wrote (use -target if you need dvd compatibility)
note that "29.97" is not correct, ntsc framerate is 30000/1001.
> It works all right, but the quality is very low. And I noticed during
> encoding, qp is floting around 31, what's wrong? After disabled ildct and
> ilme, the quality is normal. Is the command incorrect?
This does indeed sound like a serious bug but as also indicated by
Moritz the reason is that you overwrite flags by not using "+ilme+ildct".
More information about the ffmpeg-user