746f: H264 to H264 ignores Quality Factor setting

tobyW

Member
Many thanks, 746f is shaping up nicely! But maybe the following has sneaked through...

An ordinary output profile such as the stock "H.264 Transport Stream" has the following settings in its Advanced Options:
Bitrate calculation mode: Quality Factor
Quality Factor Adjustment:
MPEG-2 to H.264 : 70
H.264 to H.264 : 100

That's fine for MPEG-2 source files. But, if my source is one of the new H.264 broadcasts (in Australia), I might want to alter QF to 70, say.

The problem is that my edited QF setting (for H.264 input) is ignored and the resulting QF is always 100.

Instead, I can set Bitrate Calculation Mode to "Target File Size"; this works just fine, but it's a pain having to always work it out for the current source file and insert it in the output profile.

Toby W
 

jmc

Active member
I've found that some settings "require" a "Force Recode" setting to ON.

Especially if going from H264 to H264. Otherwise it is just "intelligent recode"
and no change at all.

jmc
 

tobyW

Member
I've found that some settings "require" a "Force Recode" setting to ON.

Especially if going from H264 to H264. Otherwise it is just "intelligent recode"
and no change at all.

jmc
Thanks jmc, but the "Quality Factor Adjustment" parameter is only available under Intelligent Recode, not under Force Recode.

The thing is, it actually will recode if I set Intelligent Recode to target a given filesize, rather than letting it work out the file size from a given Quality Factor.

I use the same technique to convert an mpeg-2 source to H264 with a Quality Factor that I specify, and it works just fine. So I would expect the same behaviour for an H264 source.

TobyW
 

Dan203

Senior Developer
Staff member
An intelligent profile will only recode if something triggers a recode. Otherwise it uses the smart editing capabilities of VRD.

Also the QF setting just calculates a bitrate based on resolution, frame rate and codec of the source file. If none of those things change then the calculated bitrate would be the same as the source file. I'm not sure that's what you're looking for.
 

tobyW

Member
Thanks Dan. Here is where I am coming from...

In the past, my old analog recordings had varying quality, with noise and rough edges, depending on their source. I created a corresponding set of output profiles with different cropping and Quality Factor settings, then transcoded the files from MPEG-2 to H.264 to save space. This worked fine.

More recently, my recordings were mainly from clean digital sources, but still MPEG-2. These are mainly SD, but I can save space by transcoding the edited files from MPEG-2 to H.264.

Coming up to date, we now have some H.264 broadcasts in Australia. These are mainly in HD, and I hope to shrink the less important ones without too much degradation.

I expected to do this H.264 shrinkage by setting the "Quality Factor Adjustment", in "H.264 to H.264" mode, under the "Intelligent Recode Options" heading. But that doesn't work, nor does typing in a bitrate there, only typing in a target filesize works.

I had assumed that even if framerate, resolution, and codec are all unchanged, then an Adjustment Percentage other than 100 would force a recode.

Why else would the Intelligent Recode Options dialog allow me to edit the Quality Factor Adjustment for H.264 to H.264, and bother to raise it to 50 if I've made it less than that?

Also the QF setting just calculates a bitrate based on resolution, frame rate and codec of the source file. If none of those things change then the calculated bitrate would be the same as the source file.
Surely there is a fourth input, i.e. the "Quality Factor Adjustment" as described in your old post of 14th Nov 2011 <http://www.videoredo.net/msgBoard/showthread.php?29360-Strange-behavior-encoding-to-mpeg>

(Quote...)
The basic calculation is...
Quality Factor = Source Bitrate / (Source FPS x Source Resolution)
Then we calculate the output bitrate using this calculation...
Destination Quality Factor = Adjustment Percentage x Quality Factor
Destination Bitrate = Destination QF x (Destination FPS x Destination Resolution)
(...end quote)

Hence if frame rate and resolution are unchanged, we have
Destination Bitrate = Adjustment Percentage x Source Bitrate
and this ought to trigger a recode, I reckon?

Perhaps I am not seeing the wider picture?

TobyW
 

Dan203

Senior Developer
Staff member
The Quality Factor is only used if something else triggers a recode. Unfortunately it itself can not trigger a recode. I never envisioned this scenario so it was never factored into the design. I can take a look at it and see if maybe this might be something I can add in a future update, but for now you'll have to either use Force Recode and manually enter the bitrates or use the Target File Size feature like you already discovered.
 

criggs

Member
Definitely!! Me too. I was quite surprised when I discovered that VideoReDo doesn't have standard Quality Factor settings. I've been living and dying my whole life on QF18, and it was a bit of a hiccup for me to discover that VideoReDo doesn't have that.
 

criggs

Member
I'm delighted to discover that your latest upgrade does have QF settings for h.264 to h.264! However I'd be curious to know how they line up with the standard CRF ratings. As I mentioned above, on other aps, I normally use CRF 18. What is the equivalent of CRF 18 in your 50 to 200 scale, please?
 

criggs

Member
Well, I just did some testing, comparing what I was getting at various levels from 100 to 200 with the known quantity of CRF renders from XMedia Recode. I discovered, somewhat to my surprise and some disappointment, that VideoReDo's new QF adjustment in the latest upgrade only goes up to the equivalent of about a 21 CRF. I was getting a bit rate of 3700 at 200 compared to the same file being re-rendered through XMedia Recode at the CRF 21 level. Since consensus on the part of most appears to be that the highest visible quality, or transparency, is achieved with CRF 18, this means that the current VideoReDo QF in the latest upgrade doesn't quite make it, even at the highest level of 200.

I'm guessing there was a reason why you decided not to simply use the standard CRF scale, and I'm thinking there must also have been a reason why you limited the QF range to a maximum which is less than what most would consider transparent. Could you explain your thinking? Thanks!!
 

Dan203

Senior Developer
Staff member
Quality Factor is NOT CRF. (aka Constant Quality) It's a simple calculation to adjust the bitrate automatically to achive the same perceived quality when transcoding between different codecs, resolutions and frame rates. We basically calculate a "quality factor" based on the bitrate, resolution and frame rate of the source. It's essentially bits per pixel, per second. Then we adjust that value based on the output resolution, frame rate and codec and apply it to the output bitrate. The output is still VBR encoded.

Our encoder does not support CRF which is why we don't offer that option. (we do have x264 support in Pro, but we do not have CRF wired in for it yet)
 

jirim100

Member
Small question for VideoRedo5 programmers: What is better for overall output quality of encoded video, variable bitrate or constant bitrate? Constant bitrate is still the same even for high motion scenes, I suppose (I'm not expert), but variable bitrate go high when high motion scenes.

I suppose when you've had in the past made the decision to choose variable bitrate as main method for encoding so it was due to better overall quality of output videos. Is it my reasoning correct?
 

criggs

Member
Quality Factor is NOT CRF. (aka Constant Quality) It's a simple calculation to adjust the bitrate automatically to achive the same perceived quality when transcoding between different codecs, resolutions and frame rates. We basically calculate a "quality factor" based on the bitrate, resolution and frame rate of the source. It's essentially bits per pixel, per second. Then we adjust that value based on the output resolution, frame rate and codec and apply it to the output bitrate. The output is still VBR encoded.

Our encoder does not support CRF which is why we don't offer that option. (we do have x264 support in Pro, but we do not have CRF wired in for it yet)
Thank you very much, as always, for getting back to me on my questions. You're very patient!
 

Dan203

Senior Developer
Staff member
Small question for VideoRedo5 programmers: What is better for overall output quality of encoded video, variable bitrate or constant bitrate? Constant bitrate is still the same even for high motion scenes, I suppose (I'm not expert), but variable bitrate go high when high motion scenes.

I suppose when you've had in the past made the decision to choose variable bitrate as main method for encoding so it was due to better overall quality of output videos. Is it my reasoning correct?
Our encoder does not support constant bitrate. We have a professional quality encoder available in Pro that does offer constant bitrate, but the consumer version only supports variable.

That being said there is really no reason a consumer would need constant. For constant to work properly you'd need to set the bitrate much higher then you would for variable since you'd basically have to encode everything for the worst case scenario. Variable tries to maintain an average bitrate, so saves bits in low motion scenes which it can then use in high motion scenes. So it creates better quality at lower bitrates then constant can.
 
Top Bottom