INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Login:   Username:  Password:   Log me on automatically    
Register I forgot my password I forgot my username Resend the activation key

H.264: higher video bitrates than suggested image size not working?

Forum Index -> ffmpegX -> ffmpegX general discussion Printer-friendly version
Reply to topic
Author Message
FiD31
Member


Joined: 07 Feb 2007
Location: Switzerland

Post Posted: Jun 17, 2007 06:26 Posts Comp View users profile Send private message Reply with quote

Hello everyone,

I'm having a bit of trouble with my H.264 settings and a movie DVD, Superman Returns. I set the target file size to 1405 MB (due to the movie's length of 2:27:58 (147.967 minutes)), the aspect ratio to 2.35:1, and clicked "auto". I then manually set the video with to 720 x 304 pixels, without changing the video bitrate. The goal is to achieve more detail with the same file size. After a couple more adjustments in the options tab (CABAC, lanzcos, multi-hexagon, two-pass encoding) I hit the "encode" button, and it starts encoding.

When it's done, I first check the file size, and it's nowhere around the estimated 1405MB. And with a bitrate of only 729 instead of the desired video bitrate of 1185 that's understandable, and confusing.

What am I doing wrong? Isn't it possible to set the video bitrate regardless of the video size? I'd be thankful for any piece of advice.


Case
Explorer


Joined: 04 Feb 2004
Location: Middle Earth

Post Posted: Jun 17, 2007 07:48 Posts Comp View users profile Send private message Reply with quote

I think the encoder finds that "this bitrate gives all the space needed for accurate compression with this codec and these settings," and doesn't know what else to use the extra bitrate for. Hence it uses a lesser bitrate than you specified.
ffmpegX suggests 641 kbps (577-705) is good, more than 705 would be excess. H.264 is just that efficient. You want 1185 (185%!), you get 729 (114%). It would seem you already get excellent quality?

To get a little bit more visual quality, you could play with the quantizer value.
You could lower the Qmin a bit to get a larger output file, as lower values mean more quality. The developer suggests it is no use going lower than "10" for H.264.
You could set Qmax to the same value as Qmin to get a fixed quantizer and variable bitrate, which is quite close to what is perceived as constant quality. This would disregard your set bitrate and use whatever it needs. This also makes a second pass useless (there is nothing to optimize).
It would be trial and error to get close to your desired output file size, though.

If your source is a PAL DVD, then you have 576 vertical lines of resolution, including the 16:9 letterbox bars, leaving ~436 lines for the picture. So, instead of 720x304, you might also go with a bit larger size to get a larger, higher resolution file. 976x416 would fit nicely with a 1185 kbps bitrate.


FiD31
Member


Joined: 07 Feb 2007
Location: Switzerland

Post Posted: Jun 17, 2007 08:56 Posts Comp View users profile Send private message Reply with quote

Thanks for replying so quickly, Case.

Yeah, I figured I could play a little with the quantizer values. I just find the values so confusing and unpredictable. E.g., if lower quantizer values mean more quality, and by setting Qmin=10 and Qmax=51 you kind of set a range of quality, don't you? Does this also mean that the encoder doesn't necessarily need to compress the picture according to the Qmin value all the time, in order for it to stay in my desired bitrate? Meaning, it could just as well set Qmin=22 in one frame, and Qmin=10 in another, depending on the image, motion, whatever. If this is true, then why bother with the preset Qmin=22/Qmax=51, and why not just leave it at Qmin=10/Qmax=51, thus using the full range for H.264?

One other thing, in the summary tab it says that the source material's resolution is 720 x 576 pixels. Though, if said source is played on a DVD player (VLC), the actual screen size in 100% view isn't the resolution stated in the summary tab. So, what is the actual resolution of a DVD movie? Is it equal to 976x___? Because I don't want to blow up the image, as the developer doesn't suggest using a video size bigger than the source's.

I'm sorry for all the questions. As you can see, I truly am a newbie when it comes to all this digital video technology ... Hope to read from you people soon. Thanks anyways.


Case
Explorer


Joined: 04 Feb 2004
Location: Middle Earth

Post Posted: Jun 17, 2007 09:56 Posts Comp View users profile Send private message Reply with quote

Someone that knows a good deal more than me about quantizer matrices should answer your first question.

PAL DVDs are normally 720x576, but are stretched to 16:9 or 4:3, whichever of the two aspect ratios is set. You could say the pixels aren't square on DVD. (See enlarged picture.)



So a 720x576 DVD frame may be displayed on a computer screen as 1024x576 (16:9), keeping original height as VLC does, or 720x404 (16:9), keeping original width as some QuickTime aware apps do. Image scaling filters smooth things out so the stretching isn't noticeable.



FiD31
Member


Joined: 07 Feb 2007
Location: Switzerland

Post Posted: Jun 17, 2007 11:01 Posts Comp View users profile Send private message Reply with quote

I see, the pixels aren't square on DVDs. That's why it's always 720x576 pixels, regardless of the aspect ratio! Thanks, Case! This information really helps.

FiD31
Member


Joined: 07 Feb 2007
Location: Switzerland

Post Posted: Jun 23, 2007 10:06 Posts Comp View users profile Send private message Reply with quote

Setting Qmin=2 and Qmax=51 does the trick, actually! That way, the encoder has the option to put more information into the frame and thus resulting in my desired file size. Thanks for the help!

tomlee59
Member


Joined: 26 Aug 2005
Location: Palo Alto, California USA

Post Posted: Jun 23, 2007 10:45 Posts Comp View users profile Send private message Reply with quote

Yes, fiddling with Qmin forces a larger filesize, but the more important question is, can you really *see* any difference in the encoded result? Bloating filesize is relatively easy; the hard part is getting something in exchange for all those extra bits. smile.gif

FiD31
Member


Joined: 07 Feb 2007
Location: Switzerland

Post Posted: Jun 23, 2007 10:49 Posts Comp View users profile Send private message Reply with quote

Yes, I know what you mean. And in my case, I can actually see a difference. E.G., there's more detail in clothing, you can see more fabrics. But again, that's just a detail you see when you pause the movie! wink.gif

Reply to topic All times are GMT - 6 Hours
Forum Index -> ffmpegX -> ffmpegX general discussion Page 1 of 1





You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Jump to:  
Display:   
DVDFab DVD to DVD lets you backup DVDs to DVDr, AVI or MP4 for portable devices. More info or download trial!
About   Advertise   Forum Archive   RSS Feeds   Statistics