Skip navigation
Currently Being Moderated

Bitrate in H.264 encoding

Nov 13, 2012 6:11 AM

Tags: #export #h264

Which (target & maximum) bitrate is quality lossless when using Main Profile with VBR to encode 1280x720 50p video in H.264 ?

 
Replies 1 2 Previous Next
  • Currently Being Moderated
    Nov 13, 2012 6:14 AM   in reply to Saša Bruvo

    None. If you want lossless, encode to uncompressed or visually uncompressed like Lagarith or UT.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 6:49 AM   in reply to Saša Bruvo

    The context is video production, and in that context lossless means without any loss of information.  You just can't get there with H.264 out of PP.  You need Uncompressed or one of the codecs Harm recommended.  (And you really can't change resolution at all if you want truly lossless.)

     

    The point is, you're going to lose some data in the encode, no way around it.  You can experiment to see which bitrates serve the quality needs on this project.  I gnerally find the default settings quite good, myself.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 7:00 AM   in reply to Saša Bruvo

    The highest bitrate allowed on the export medium with the duration of your timeline. See http://dvd-hq.info/bitrate_calculator.php#Calculator

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 7:08 AM   in reply to Saša Bruvo

    You're looking for a correlation that doesn't really exist here.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 7:14 AM   in reply to Saša Bruvo

    You can set the bitrate to anything you want within the limits of the codec and your delivery medium.  But as the quality of the video will depend on several different factors, not just bitrate, no there is no direct correlation here.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 7:22 AM   in reply to Saša Bruvo

    That depends.  Going to such a high bitrate can ensure that very little degradation occurs during the transcode.  For example, exporting with AVC-I 100 will provide Mastering quality, with little if any visible difference between the export and the original.

     

    So yes, there are times when you might want to do that.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 7:28 AM   in reply to Saša Bruvo

    Not predictable.  Lossless isn't constrained by anything, so the size will depend on the material and efficiency of the codec used.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 7:45 AM   in reply to Saša Bruvo

    Generally, no.  File size isn't dependant upon resolution at all.  Only bitrate and duration will have a significant impact on file size.

     

    Think of it this way.  Files are measured in bits.  So...bits per second x seconds = size.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 8:58 AM   in reply to Saša Bruvo

    Filesize = (size per frame) x (number of frames).

     

    Number of frames is a given, so the determining factor is size per frame. Size per frame is only bitrate dependent, not resolution dependent. You can have 1920 x 1080 frames with X as the size or 1280 x 720 frames with 2X as size, it all dependws on the bitrate PER FRAME.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 12:12 PM   in reply to Saša Bruvo

    Still talking about lossless compression ?

     

    Nope, all compression.

     

     

    Bits = data. Each pixel with it's color is "1 data".

     

    It doesn't always work out that way.  In fact, with most compression schemes there ends up being less than 1 bit/pixel.  MPEG encoders use blocks of pixels encoded as a group.

     

    less bits(pixels) per second x seconds = smaller size

     

    Well, the less bits part is true, but pixels doesn't play a factor with file size.

     

     

     

    Higher output bitrate (50 Mbps) on smaler resolution can not produce quality that does not exist in original (bigger) frame encoded at lower bitrate (28 Mbps).

     

    You're right.  But during compression, data is thrown out.  Higher bitrates means less data is thrown out.  So while no extra quality is added with higher bitrates, more of the original quality is kept in.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 12:19 PM   in reply to Saša Bruvo

    But what is bitrate dependent on ?

     

    Your settings.

     

     

    Don't tell me that it is value for bitrate that I choose.

     

    Bit...it is.

     

     

    When I recode it to lossless compressed 1280x720 50p, resulting file size must be smaller then 100 just because it has less pixels, less data to process, less data to store.

     

    With lossless compression, it probably will be smaller.  Lossless doesn't have any bitrate constraints, there are no bitrate settings.  Lossless uses whatever bits it needs to make sure the file can be reconstructed exactly.  MPEG is a different situation.

     

     

    So - resolution must have some influence in resulting file size.

     

    It's not so much the resolution that's affecting fie size, at least not directly.  It's that with lossless, the lower resolution simply means fewer bits are needed.  It's still the bitrate that's the important factor here.

     


    And now we are at the beginning of this discussion - what is approximate correlation in bitrates between 1920 / 1280 for approximately same loss in quality of video.

     

    With the same answer.  There is no direct correlation.  Too many factors come into play.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 1:03 PM   in reply to Saša Bruvo

    It might have the same size, but likely won't have the same quality.  Two very different aspects of encoding without a direct connection.

     

    Bitrate and duration affect the size.

     

    Resolution, frame rate, and other settings affect quality.

     

    Getting the best of both is an entire industry in itself not easily leearned in a forum.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 14, 2012 3:39 AM   in reply to Saša Bruvo

    The truth is:

    - everything under original bitrate lowers the file size;

    - whatever bitrate for H.264 you choose - either 28 Mbps, 100 Mbps or 200 Mbps - it lowers original quality.

     

    Run the following test or whatever similar one:

    - import your original footage into After Effects and set working space to linearised 32 bit;

    - re-encode your original footage to H.264 with whatever bitrate you like, reimport new file into the project, drop into the composition over the layer with the original footage and set Blending Mode to 'Difference' - you'll always see artifacts, and the lower was the bitrate, the more extensive artifacts you can see.

     

    Since those losses are not always visible for human eyes, it's up to you to decide which level of loss to compromise.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 14, 2012 4:32 AM   in reply to Saša Bruvo

    Just because it's not a rewrapping, but re-encoding with the lossy codec.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 14, 2012 4:33 AM   in reply to Saša Bruvo

    It is RE-compressed. Just like 2-nd or 3-rd generation DV files. You lose quality on every generation because of the re-compression that takes place.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 14, 2012 9:03 AM   in reply to Saša Bruvo

    1. I think you will not say that this statement is wrong:

    "The bitrate (data rate) affects the quality of a video cli

     

    Correct.

     

     

    2. I beleive that we can agree upon the fact that 1080p50 video from my last example would have poor quality because of low bitrate.

    If the same clip would be encoded with higher bitrate quality would be better ?

     

    If reencoded, no.  If originally encoded with a higher bitrate, yes.

     

     

    3. I can not accept that these files "might have the same size" if they have the same bitrate and "Bitrate and duration affect the size."

     

     

    Well...it took humans a few thousand years to accept the fact the the earth was not the 'center of the universe'.  However, what people accept doesn't always alter what is.

     

     

     

    4. On the following page you can notice that in "Levels" paragraph there is a table that shows direct correlation between bitrate and resolution.

     

    That paragraph is showing the allowable parameters for a particular level.  Not the same thing you're asking about here.

     

     

     

    5. Off course that "Bitrate and duration affect the size."

    But - with reducing the bitrate you reduce the file size only by means of reducing the quality because in the smaller file you can store less information.

     

     

    Generally yes.  But there are more parameters than just bitrate involved here.  It is possible to get a smaller file with better quality if you know what you're doing.  In fact doing precisely that is the very goal of the entire compression industry.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 14, 2012 8:54 AM   in reply to Saša Bruvo

    Why should anyone want to have 5 GB video file which in reproduction gives the same video quality as 2 GB version of the same video ?

     

    A fair question.  Because that 5 GB file may well have the same quality as the original.  But if you're reencoding, then a 2GB copy will almost certainly have less quality than the original.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 14, 2012 9:03 AM   in reply to Saša Bruvo

    If what I sad is correct, the conclusion is that there is a bitrate "threshold"

         - everything under that threshold lowers the file size and video quality,

         - everything over that threshold produces bigger files without any quality gain.

     

    Simple as that.

     

    It's not quite that simple.  Like I said, it is possible to get a smaller file with better quality, if you know what you're doing.

     

    And reencoding "over that threshold" won't add to the quality, but it will keep more of that quality, which you generally lose some of every time you reencode.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 14, 2012 8:58 AM   in reply to Saša Bruvo
    I hoped to be advised what should this "threshold" be for 725p50 clip recoded from the source clip that was 1080p50 with "threshold" at 28 Mbps.

     

    It doesn't exist.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 14, 2012 9:01 AM   in reply to Saša Bruvo

    BITRATE/FILE SIZE AFFECTS QUALITY !

     

    You're correct.  I will rephrase.

     

    Bitrate and duration affect the size.

     

    Bitrate, resolution, frame rate, etc. affect the quality.  But of those parameters that affect quality, the only one that also affects the size is bitrate.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 14, 2012 10:11 AM   in reply to Saša Bruvo

    Same duration and smaller size means lower quality.

     

    It is either or, not and.

     

    Bigger size means better quality, smaller size means lower quality. EOS.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 14, 2012 10:44 AM   in reply to Saša Bruvo

    Of course with a given number of frames and a given bitrate per frame, and thus a total filesize, there are differences in quality based on the efficiency of the codec used. I think that is what Jim alluded to.

     

    With a certain filesize, (frames and bitrate/frame), MPEG1 will deliver far less quality than H.264, due to the efficiency of the codec used.

     
    |
    Mark as:
1 2 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points