RF and File Size
RF and File Size
Hello, first post here.
Been using Handbrake a while (great software BTW) and I'm having a bit of an issue with something. What I'd like to do it target a file size using Constant Quality. Right now the only way I can see to do that is with trial and error. I don't want to use Average Bitrate because from what I understand image quality can vary and I don't want that.
Is there a way to calculate the correct Constant Quality RF number for a target file size without resorting to trial and error?
Been using Handbrake a while (great software BTW) and I'm having a bit of an issue with something. What I'd like to do it target a file size using Constant Quality. Right now the only way I can see to do that is with trial and error. I don't want to use Average Bitrate because from what I understand image quality can vary and I don't want that.
Is there a way to calculate the correct Constant Quality RF number for a target file size without resorting to trial and error?
-
- Veteran User
- Posts: 4859
- Joined: Wed May 04, 2011 11:06 pm
Re: RF and File Size
No, Constant Quality means just that. Bitrate will vary to maintain a certain quality.
Re: RF and File Size
The size will vary from movie to movie depending on the length and complexity of encoding it. Grainy high motion scenes like Saving Private Ryan take a lot more bits to get the same quality than clean slow moving scenes like The Social Network.
Encode a variety of movies to see what size you typically get on average and adjust from there. Rule of thumb is changing RF by 6 points will double or halve the size.
Encode a variety of movies to see what size you typically get on average and adjust from there. Rule of thumb is changing RF by 6 points will double or halve the size.
Re: RF and File Size
Thanks, I understand that, but file size varies with RF and I'd like to select an RF that arrives at a file size within some range.
Re: RF and File Size
For the same output bitrate, 2-pass average bitrate and constant RF are the same (only a computer could tell the two apart). The difference is, you cannot predict file size when using CRF, but you cannot predict quality when using 2-pass ABR.
Re: RF and File Size
I can't see where to edit the posts here. Wanted to add that I'd like to be able to find the resulting file size of a video without having to actually encode it. Thought maybe there might be a tool to do that or something. So I guess I'm stuck with encoding a movie at various RF values to see how they come out (trial and error).
-
- Veteran User
- Posts: 4859
- Joined: Wed May 04, 2011 11:06 pm
Re: RF and File Size
If you want a fixed size use 2 pass ABR.
Re: RF and File Size
So that brings up a point I'm not clear on with Average Bitrate. From what I understand bitrate varies depending on what's happening from frame to frames. Does Average Bitrate allow those fluctuations or does it throttle quality to maintain a constant bitrate at any small interval?
Thing is if the quality is not all over the place with Average Bitrate, then I could just use that. But everything I read says not to use it unless you have an actual bitrate restriction, which I don't.
-
- Veteran User
- Posts: 4859
- Joined: Wed May 04, 2011 11:06 pm
Re: RF and File Size
If you don’t have bitrate restrictions why are you trying to restrict the bitrate?
Re: RF and File Size
RF naturally varies greatly with the source material's complexity, so you'll be stuck with trial and error for every source. If you really care about size, 2-pass average bit rate will still allow quality to vary while maintaining an overall average bit rate, hence its name and purpose.
Re: RF and File Size
You're thinking of Constant Bitrate. 1-pass Average Bitrate also has some restrictions by not knowing video oroperties ahead of time, but 2-pass ABR and Constant RF are equivalent (except each serve a different purpose).CraigHB wrote: ↑Tue Jul 23, 2019 7:18 pmSo that brings up a point I'm not clear on with Average Bitrate. From what I understand bitrate varies depending on what's happening from frame to frames. Does Average Bitrate allow those fluctuations or does it throttle quality to maintain a constant bitrate at any small interval?
Re: RF and File Size
Okay, thanks for the replies people.
It sounds like 2 pass Average Bit rate is what I'm looking for. If quality holds fairly constant from frame to frame I'll be good with that. I just didn't want to have quality go way down for higher bitrate sections of the video compared to lower bitrate sections.
It sounds like 2 pass Average Bit rate is what I'm looking for. If quality holds fairly constant from frame to frame I'll be good with that. I just didn't want to have quality go way down for higher bitrate sections of the video compared to lower bitrate sections.
Re: RF and File Size
Time (Sec) x Bitrate (Mbps) x .125 = File Size (MB)
Bitrate means Average video bitrate plus the sum of audio bitrates.
Unless you need a constrained bandwidth for streaming and broadcast servers, there is no need to know the exact bitrate. Storage size is no longer an issue.
Bitrate means Average video bitrate plus the sum of audio bitrates.
Unless you need a constrained bandwidth for streaming and broadcast servers, there is no need to know the exact bitrate. Storage size is no longer an issue.
Re: RF and File Size
Frame to frame is consistent with 2 pass (well, subject to the x264 psychovisual model), but movie to movie variation will still occur.CraigHB wrote: ↑Wed Jul 24, 2019 12:42 amIt sounds like 2 pass Average Bit rate is what I'm looking for. If quality holds fairly constant from frame to frame I'll be good with that. I just didn't want to have quality go way down for higher bitrate sections of the video compared to lower bitrate sections.
Re: RF and File Size
Yeah I expect that movie to movie quality will vary. Thing is I want to store a bunch of movies on my laptop computer's SSD and I don't have a huge amount of space on that drive. I want movie files to be more on the smaller side without getting too much visual loss. I end up doing trial and error with Constant Quality which becomes time consuming. I've tried a few now with 2 pass Average Bitrate and it seems to be doing what I want. I think that will work for me.
-
- Veteran User
- Posts: 4859
- Joined: Wed May 04, 2011 11:06 pm
Re: RF and File Size
If you post your logs we might be able to suggest some settings.