I'm encoding QT .mov files to .m2v in order to author DVDs for commercial use. I have an updated version of ffmpeg from ffmpegmac.net and a compiled version of ffmpeg on win7, but I run into this problem with both.
My encodes use something along these lines:
ffmpeg -i input.mov -target ntsc-dvd -vcodec mpeg2video -b:v 5100k -minrate 4500k -maxrate 7800k output.m2v
With this I'm aiming for an average bitrate of 5500k, with a range of 4500-7800k. I'm authoring with DVDStudioPro (still), which doesn't want to accept video bitrates over 7800k (hence the -maxrate: -target ntsc-dvd has an internal max bitrate of 9000k). I find that when if I leave the -maxrate off, the video looks great - I can crank the bitrate down, and it continues to look good. But with -maxrate, certain scenes have an awful macroblock artifact pop up (usually on shots of trees, or fine detail that moves): the image seems to block up in a pulsing manner, in timing that suggests that it's hitting on the GOP boundaries.
Does anyone have experience with this? I've tried a number of flags, -qmin -qscale -refs -dc, to try to minimize the artifacts, but they keep popping up, moreso when I lower the average bitrate.
If anyone has any insight, I'd be grateful.
+ Reply to Thread
Results 1 to 13 of 13
-
-
DVDSP accepts video bitrates up to and including the 9800kbps spec max. Where are you getting this 7800kbps? Is it telling you this? Is it specifically saying "not over 7800"? or is it saying "too high...". Or maybe FCP isn't liking your encodes for another reason.
How is your audio figuring into your bitbudget? Are you using LPCM? If so, 1536kbps of your max is already used up.
What about other encoders? I'm a little surprised you aren't using Compressor, since you're on a Mac and already have FCP.
Should you using open or closed GOPs when encoding? (not really sure if ffmpeg's mpeg2 encoder has that option). Should you be using 2passVBR? Proper selection of those 2 things can greatly enhance the quality of a particular encode.
BTW, I noticed you stated a 5500k target, yet your script shows 5100. I'll assume one of them is a typo.
Why is either one of these your target? What's your datasize & bitrate budget assumptions?
Scott -
ffmpeg doesn't use B-frames in Mpeg-2 encoding (only I,P) so it should be closed GOP. Hence the poor quality at low bitrates. Attached is the script I use for dvd output. I export video + ac3 in a TS container. I then demux into m2v + ac3 using TsMuxer. DVD Architect accepts them just fine as compliant.
Code:SET PATH="E:\FFMpeg\64-bit" for %%a in ("*.mov") do ffmpeg -i "%%a" -c:v mpeg2video -s 720x480 -aspect 16:9 -pix_fmt yuv420p -b 6500k -bt 8192k -maxrate 9000k -c:a ac3 -ar 48000 -ab 256k -f mpegts "%%~na.ts" pause
Got my retirement plans all set. Looks like I only have to work another 5 years after I die........ -
Thanks for the responses!
Good point - it was complaining that it's too high. I must be pulled that 7800k thought from somewhere else. Audio is encoded as .ac3, with a bitrate up 448k. And lo, a test I did this morning has DVDSP pulling in a 9000k .m2v just fine. I don't seem to be able to recreate that problem
I'm committed to getting ffmpeg working based on some automation that we're building - when I run into problems I do use Compressor as a backup solutiuon. I'm targetting 5500k (or whatever) to get episodic content on a given number of discs.
racer-x, low bitrate doesn't seem to be an issue for the quality, as using -b:v gave me a final average of 3500k and the image looked acceptable.
I guess I'm really just wondering how I can control the bitrate better. The -maxrate flag seems to be the culprit at these lower bitrates, when I'm trying to make sure that I can pull off an encode and not overload my discs. -
Gotcha about using ffmpeg.
All 3 numbers in bitrate make a difference - if you've set your min to high, the max, even if it is set high, can rarely be reached or you would end up raising your average. For many/most titles, I suggest you keep your min & max symmetrical around your average. IOW, if your average is 6Mbps and your Max is 9Mbps, a good min might be 3Mbps. You want to be able to rob Peter to pay Paul occasionally.
Give this one a try:
Code:ffmpeg -i input.mov -target ntsc-dvd -vcodec mpeg2video -b:v 5500k -minrate 1000k -maxrate 9000k -dc 10 -bf 2 -aspect ? output.m2v
Also, I suggest usage of the -pass1 and -pass2 arguments. 2Pass will be much better and delivering quality for a given filesize/bitrate constraint and 1Pass is.
Scott -
Good call. Because ffmpeg had been kicking out good looking encodes at low bitrates, I was focused more on controlling what a 1-pass turned out, but there's no reason not to implement 2-pass.
Thanks again!
Unrelated to ffmpeg, I posted in the 'Authoring (DVD)' forum a question about DVDAuthor. Any experience with this? -
-
-
-
Hear that
Am I right that Adobe dropped Encore when they moved over to CC? I remember looking into that (I love me some Adobe), but it was a dead end.
I think the "professional" solution is Scenarist, which has a hefty price tag. -
Yes, Adobe "dropped" Encore, but according to other VH members, if you get CC, you can DL & install CS6 which includes Encore. That is, if you really want it that much. Not a complete dead end, just short-lived.
If you are on a Mac, your choices are small: get iDVD (blecchh!), get DVDSP ($$), get Encore (see above), or dual-boot into Windows and use a whole panoply of options (both free & paid).
Scenarist is a Windows-only app, so that wouldn't work in Mac world either. Plus, it is also now defunct (since ~2012).
Scott