VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 18 of 18
Thread
  1. I'm wondering, is there any reason to use a different number of reference frames than the number used in the original video stream? Take for instance the following two examples, taken from Blu-ray remuxes.

    Gladiator:


    Salt:


    From what I've seen, a lot of people seem to agree that 4 reference frames is the sweet spot. But in the case of Salt, would 2 reference frames be more appropriate, since that's what was used for the Blu-ray? Or are the number of reference frames used in a Blu-ray encode irrelevant for the purposes of re-encoding with x264?
    Quote Quote  
  2. Originally Posted by Surlias View Post
    Or are the number of reference frames used in a Blu-ray encode irrelevant for the purposes of re-encoding with x264?
    This.

    It's irrelevant because source video is decoded to uncompressed YUV first when you re-encode it, so reference frames no longer exist when it's decoded
    Quote Quote  
  3. But couldn't you still consider the original number of reference frames used as a guide? If the original encoder only used 2 reference frames, then they must have decided that 2 was the most that would be useful for the content of that particular video, right?
    Quote Quote  
  4. Originally Posted by Surlias View Post
    But couldn't you still consider the original number of reference frames used as a guide? If the original encoder only used 2 reference frames, then they must have decided that 2 was the most that would be useful for the content of that particular video, right?
    Nope, it's completely irrelevant. "4" is the magic number because that's the highest number that most hardware decoder chips can decode at that resolution. They will stutter or refuse to play with 5 or more. Also, there are usually diminishing returns with more than 4 on "regular" content. This means drastically slower encoding times for marginal compression gains. (But higher then 4 can be beneficial for some content, if the goal was for computer playback, not specific devices)

    The reason why some BD's use "2" , is because of the software choice. For example, Sony Blu-Code uses 2 by default. It's not because of "quality" for certain, because "4" will never yield worse results than "2" at a given bitrate in the BD scenario.
    Quote Quote  
  5. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Just a quickie along these lines please, if I may...

    In using BDRB on the 'normal' veryfast setting, I am re-encoding a Blu-ray movie only that is roughly about 27 Gigs, so it's not super huge (actually, it is Dog Soldiers which is mostly dark and at night) I usually throw in a couple of 'Tweaks' having to do with something similar to a tune-film setting. After BDRB's 1st pass, I checked the .264 file that it was encoding on the 2nd pass, and I notice that it is using only 1 ref frame. Now, since I am not really compressing it THAT much, do you suppose that is why BDRB 'chose' to use only 1 ref frame, or is that just a standard of 'veryfast', OR should I be concerned that it is not using a higher ref frame and include that in my 'Tweaks'?

    BDRB indicated after extracting the A/V files that the bitrate (I'm thinking the resulting bitrate of the encode) will be about 24,000, which seems pretty high. I wanted to ask, too, as the bitrates are higher for an HD Blu-ray encode, say from about 17,000+, should I just not worry about it BECAUSE the resulting bitrate will be so high?

    Just trying to get a handle on the concept.

    Thanks kindly! Image
    [Attachment 48425 - Click to enlarge]
    Quote Quote  
  6. From x264 --fullhelp:
    Code:
          --preset <string>       Use a preset to select encoding settings [medium]
                                      Overridden by user settings.
    
                                      - veryfast:
                                        --no-mixed-refs --rc-lookahead 10
                                        --ref 1 --subme 2 --trellis 0 --weightp 1
    Quote Quote  
  7. veryfast is ref=1.
    faster is ref=2
    medium is ref=3
    slow and above is ref=4 (for blu-ray; constrained by level 4.1 and resolution)

    fast first pass is always ref=1
    Last edited by Sharc; 16th Mar 2019 at 17:24.
    Quote Quote  
  8. Originally Posted by Sharc View Post
    slow and above is ref=4 (for blu-ray; constrained by level 4.1 and resolution)
    Note that you must manually specify those constraints, they aren't applied by default. The defaults are:

    slow: ref=5
    slower: ref=8
    veryslow: ref=16
    placebo: ref=16
    Quote Quote  
  9. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Hey, thanks all you guys I do understand the basic principles and levels. BUT... what I was wondering was more specifically in the situation that I mentioned above. With the parameters as I stated, is there ANY benefit for me going into the 'Tweaks' of BDRB and SPECIFYING a higher ref frame number, since it's 'Very Fast' default is '1' OR... because of the fairly high bitrates involved at this level, will it really make any difference in the resulting quality of the encode that BDRB makes?

    Keep in mind... that BDRB has already done the 1st pass for the 'size' of the output. So, that size is pretty much predetermined at that point when the 2nd pass begins. Sooooo... what I want to know is that in THIS case (which does specifically come up often doing Blu-rays with BDRB) is there ANY benefit to raising the ref frames to 2, 3, or 4 in the 'Tweaks' beforehand, or will it not make any real difference in the resulting high bitrate encode?

    I KNOW that the BD constraints would keep it at no higher than 4. However, in THIS specific application, should I bother considering raising the ref frames? It just kind of bothered me when I checked that BDRB was using a ref frame of only '1'

    Thanks!
    Quote Quote  
  10. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Originally Posted by Sharc View Post
    veryfast is ref=1.
    faster is ref=2
    medium is ref=3
    slow and above is ref=4 (for blu-ray; constrained by level 4.1 and resolution)

    fast first pass is always ref=1
    Oh, hey Sharc! Being a fellow BDRB guy, you know what I mean

    Would bumping up the number of ref frames for the 2nd pass in the 'Tweaks' area make any difference in the quality of the final encode in the situation that I have stated? Thanks Bro!
    Quote Quote  
  11. Originally Posted by Lathe View Post
    Would bumping up the number of ref frames for the 2nd pass in the 'Tweaks' area make any difference in the quality of the final encode in the situation that I have stated?
    Yes, that's the whole point of having more reference frames. Bumping up from veryfast to a slower preset will give an even bigger boost in quality.
    Quote Quote  
  12. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by Lathe View Post
    Would bumping up the number of ref frames for the 2nd pass in the 'Tweaks' area make any difference in the quality of the final encode in the situation that I have stated?
    Yes, that's the whole point of having more reference frames. Bumping up from veryfast to a slower preset will give an even bigger boost in quality.
    I really appreciate you taking the time to reply and help me, thank you! But, I am not talking about raising the WHOLE preset. I am very clear on the differences between the presets. I am ONLY asking about the ref frames ALONE and its effect on the REST of the already chosen very fast setting.

    The point being is that the overall resulting bitrate is so high since I am only compressing the movie, say, about 10-12%. Thus the reason why I have chosen to use BDRB's Very fast setting. If the Blu-ray were larger, say 30 Gigs+, then I would go with BDRB's 'High Quality' setting, which would indeed raise the preset level. Like I mentioned in my first post above, BDRB has already determined that the resulting encoded bitrate will be about 24,000, which is pretty close to the original Blu-ray's bitrate. So, I already DO understand about the differences in the presets and what each means. I am NOT asking a GENERAL question since I am familiar with those principles already. What I am asking is only in THIS specific circumstance where I am not compressing the movie very much, and I don't mind using BDRB's very fast setting because of that, BUT... the fact that BDRB is using only a ref frame of '1' is what bothers me. The question is, in THAT context, should it...? Not changing anything else, will changing just that ONE parameter alone (raising the ref frames) leaving everything else alone, make ANY difference, or enough difference to bother...?

    You see what I mean. My question is extremely specific. Do I need to worry about increasing JUST the ref frames parameter from '1' in this specific circumstance? Or, should I just leave it alone, along with all the other 'very fast' parameters that are being used.

    Thanks for understanding!
    Quote Quote  
  13. Originally Posted by Lathe View Post
    the fact that BDRB is using only a ref frame of '1' is what bothers me. The question is, in THAT context, should it...?
    No, it should not bother you.

    Originally Posted by Lathe View Post
    Not changing anything else, will changing just that ONE parameter alone (raising the ref frames) leaving everything else alone, make ANY difference, or enough difference to bother...?
    It will make a very small difference. Not enough to lose sleep at night.
    Quote Quote  
  14. Originally Posted by Lathe View Post
    My question is extremely specific. Do I need to worry about increasing JUST the ref frames parameter from '1' in this specific circumstance?
    Why don't you just try it and see for yourself?
    Quote Quote  
  15. As jagabo suggests. Try it out.
    Make 2 encodes, and compare the frames in interleave mode stepping through the frames. Use a simple avisynth script for this.
    My guess is that you may spot very subtle differences when you look very carefully at the interleaved frames, but you will never be able to tell which one is better.
    Quote Quote  
  16. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Originally Posted by sneaker View Post
    Originally Posted by Lathe View Post
    the fact that BDRB is using only a ref frame of '1' is what bothers me. The question is, in THAT context, should it...?
    No, it should not bother you.

    Originally Posted by Lathe View Post
    Not changing anything else, will changing just that ONE parameter alone (raising the ref frames) leaving everything else alone, make ANY difference, or enough difference to bother...?
    It will make a very small difference. Not enough to lose sleep at night.
    There we go, thanks Bro!
    Quote Quote  
  17. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Originally Posted by Sharc View Post
    As jagabo suggests. Try it out.
    Make 2 encodes, and compare the frames in interleave mode stepping through the frames. Use a simple avisynth script for this.
    My guess is that you may spot very subtle differences when you look very carefully at the interleaved frames, but you will never be able to tell which one is better.
    Excellent, thank you! Image
    [Attachment 48436 - Click to enlarge]
    Quote Quote  
  18. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    I pretty much figured that at that high of a bitrate, it likely wouldn't make much difference. From what I understand (which clearly isn't much! ) more ref frames would go more toward making compression better.

    I very much appreciate the input from everyone, thank you!
    Quote Quote