VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. I'm converting two videos to x264 MKV file with Handbrake. First video is in 4:3 format and has black bars on the left and right side. So I used "Automatic" cropping which cropped it to 1440x1080. The other is 16:9 so the resulting video is 1920x1080. However, both resulting videos have roughly the same filesizes (bitrate is the same, see below). Shouldn't the first one be smaller since the resolution is lower? How does that work?

    I have the following set in Handbrake:

    Codec: H.264 (x264)
    Framerate (FPS): Same as source
    Variable framerate
    x264 Preset: Fast
    x264 Tune: Animation
    H.264 Profile: High
    H.264 Level: 4.2
    Avg Bitrate (kbps): 2900
    2-Pass Encoding
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    You used the same Avg. Bitrate. That's what you got.
    size=bitrate x running time
    Quote Quote  
  3. I forgot to mention, the videos have the same duration. I still don't understand how they're the same size if the (average) bitrate is the same but the ammount of pixels differs significantly between them. Does that mean the first one (with fewer pixels) is of better visual quality than the second one (meaning less blocking, etc) ?
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Perplexer View Post
    I forgot to mention, the videos have the same duration. I still don't understand how they're the same size if the (average) bitrate is the same but the ammount of pixels differs significantly between them. Does that mean the first one (with fewer pixels) is of better visual quality than the second one (meaning less blocking, etc) ?
    If all you chopped of was the black on the sides, it may not make too much difference since the black doesn't use much bitrate.
    Perhaps you should try CRF encoding and then compare
    Quote Quote  
  5. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    The file won't play on your tv/media device if it's not uhd since it's set to H.264 Level: 4.2,if just on your computer then there won't be any issues.
    I think,therefore i am a hamster.
    Quote Quote  
  6. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Originally Posted by Perplexer View Post
    I forgot to mention, the videos have the same duration. I still don't understand how they're the same size if the (average) bitrate is the same but the ammount of pixels differs significantly between them. Does that mean the first one (with fewer pixels) is of better visual quality than the second one (meaning less blocking, etc) ?
    That's a good hunch, as there is some correllation, but the truth is more complicated than that since other factors weigh in as well: detail contrast, motion, noise...


    Scott
    Quote Quote  
  7. Originally Posted by Perplexer View Post
    I still don't understand how they're the same size if the (average) bitrate is the same but the ammount of pixels differs significantly between them.
    The resolution ("amount of pixels") means nothing. Reread what davexnet wrote. The running time (length) is the same. The bitrate is the same. Therefore the file size is the same.
    Quote Quote  
  8. The definition of bitrate is:

    Code:
    bitrate = stream_size / running_time
    Nothing else enters into the calculation. The frame size, frame rate, and complexity of the video don't matter. Of course, file size is the sum of the stream sizes plus a little overhead (typically less than 1 percent) for the container.

    Rearranging the equation gives:

    Code:
    stream_size = bitrate * running_time
    So if you encode two videos of the same running time, with the same bitrate, the sizes will be equal.

    But different videos require different bitrates in order to retain quality. Different frame sizes, frame rates, the amount of action, the amount of film grain, the sharpness, even the brightness of the picture, will change the amount of bitrate you need.
    Last edited by jagabo; 2nd Nov 2020 at 08:50.
    Quote Quote  
  9. So if I use the average bitrate setting to encode a 720p and a 1080p animation video of the same duration, the resulting filesize will be approximately the same? Does that mean the quality of the 720p video would be "higher" (meaning, there would be a higher chance of seeing potential compression artifacts in the 1080p video compared to the 720p one) ?

    I guess I would like all the videos I encode to have the same overall quality. That means I would expect shorter videos to be smaller and lower resolutions ones to be smaller as well. Did I go the wrong route with the average bitrate then? Should I have chosen Constant Quality (RF) ? But then I guess that would mean high-paced / complex scenes would be blocky, wouldn't it?

    This is really confusing me. I'm not really into encoding videos so I guess that's why.

    BTW, I didn't know about the level 4.2 limitations. I just Googled it and decided on it based on the supported resolution (1920x1080). But I went and copied the video onto a portable hard drive, plugged it into the USB port on a Full-HD LG smart TV model 43LF630V-ZA, selected the attached storage menu via TV OSD, navigated to the file, and the video played fine.
    Last edited by Perplexer; 2nd Nov 2020 at 10:27.
    Quote Quote  
  10. Originally Posted by Perplexer View Post
    So if I use the average bitrate setting to encode a 720p and a 1080p animation video of the same duration, the resulting filesize will be approximately the same?
    Yes.

    Originally Posted by Perplexer View Post
    Does that mean the quality of the 720p video would be "higher" (meaning, there would be a higher chance of seeing potential compression artifacts in the 1080p video compared to the 720p one) ?
    All else being equal, yes. But it really depends on the nature of the two videos. There an easily be a several fold difference in bitrate requirement between different videos of the same frame size.

    Originally Posted by Perplexer View Post
    I guess I would like all the videos I encode to have the same overall quality. That means I would expect shorter videos to be smaller and lower resolutions ones to be smaller as well. Did I go the wrong route with the average bitrate then?
    Yes. If you encode all your videos at very high bitrates they may all look good but you would have wasted a lot of bitrate on the videos that didn't really need it. If you encode them all at a very low bitrate a few might look ok but others will look terrible.

    Originally Posted by Perplexer View Post
    Should I have chosen Constant Quality (RF) ?
    Yes.

    Originally Posted by Perplexer View Post
    But then I guess that would mean high-paced / complex scenes would be blocky, wouldn't it?
    No. The encoder will use more bitrate where it's needed, less where it's not. This is why constant quality encoding was invented.
    Quote Quote  
  11. Ah, I misread what I myself wrote. It's "Constant Quality" and not "Constant Bitrate", ok. So then Constant Quality still is not constant bitrate ? If it means the encoder will use more bitrate where it's needed, that makes it variable bitrate then. But isn't that what "Average Bitrate" is also ? Or how does Average Bitrate option work then? I see only Average Bitrate has the checkbox for 2-pass encoding. MediaInfo reports 2900 in my case for all files encoded with this option. I'm wondering, is there an option that would just use a constant/fixed bitrate throughout the file, regardless of the scenes ?
    Quote Quote  
  12. Originally Posted by Perplexer View Post
    Ah, I misread what I myself wrote. It's "Constant Quality" and not "Constant Bitrate", ok. So then Constant Quality still is not constant bitrate ? If it means the encoder will use more bitrate where it's needed, that makes it variable bitrate then. But isn't that what "Average Bitrate" is also ? Or how does Average Bitrate option work then? I see only Average Bitrate has the checkbox for 2-pass encoding. MediaInfo reports 2900 in my case for all files encoded with this option. I'm wondering, is there an option that would just use a constant/fixed bitrate throughout the file, regardless of the scenes ?
    With constant quality encoding you are picking the quality you want. The encoder uses whatever bitrate is necessary to deliver that quality. You don't know what the final file size will be.

    With average bitrate you are picking the file size. The encoder delivers whatever quality it can for that file size. You don't know exactly what that quality will be.

    With bitrate based encoding you get the best quality with two (or more) passes. During the first pass the encoder analyzes the video. During the second (and optional later passes) it allocates bits optimally to each scene.

    When average bitrate is done with a single pass the encoder has no idea what's coming later in the video. So it can't allocate bits optimally.

    If you preform a CRF encoding and it results in a particular average bitrate, then encode the source again (2-pass) with that same average bitrate, the quality of the two videos will be nearly identical.

    So the decision is simple: If you have a size constraint (4.3 GiB on a DVD for example) use 2-pass VBR encoding. If you don't have a size constraint use CRF encoding.
    Last edited by jagabo; 2nd Nov 2020 at 12:59.
    Quote Quote  
  13. Thank you for clarification.
    Quote Quote  



Similar Threads