What do these encoder options mean in H.264?

Richard-hardy wrote on 2/21/2019, 2:28 PM

When using the MainConcept H.264/AVC encoder in MEP, I am quite confused with the encoding options that are available. There is Constant Bitrate, Variable Bitrate, Constant Quantizer, & Target Quality. What do each of these options mean and which one provides the best video quality output?

Comments

CubeAce wrote on 2/21/2019, 5:14 PM

@Richard-hardy

There is little to gain if the source file is a variable bit rate to encode at a constant bit rate.

Individual frames seldom contain exactly the same amount of data in each frame, so using a variable bitrate allows the end file to be physically smaller than using a constant bit rate without losing quality beyond the normal encoding degradation. A constant quantizer stops faster scenes (more action) from reducing the bitrate from what it would be doing normally, which is taking information away where your eye doesn't perceive it, but it will increase the file size with little to no gain quality wise. Target quality is the how close to the original it can take the conversion with the added compression from transcoding.

There is no gain in quality to be had in my opinion from using H.264 over MP4. You just get smaller file sizes.

In fact, from a quality point of view, I prefer MP4.

 

Windows 10 Enterprise. Version 22H2 OS build 19045.5737

Direct X 12.1 latest hardware updates for Western Digital hard drives.

Asus ROG STRIX Z390-F Gaming motherboard Rev 1.xx with Supreme FX inboard audio using the S1220A code. Driver No 6.0.8960.1 Bios version 1401

Intel i9900K Coffee Lake 3.6 to 5.1GHz CPU with Intel UHD 630 Graphics .Driver version Graphics Driver 31.0.101.2135 for 7th-10th Gen Intel® with 64GB of 3200MHz Corsair DDR4 ram.

1000 watt EVGA modular power supply.

1 x 250GB Evo 970 NVMe: drive for C: drive backup 1 x 1TB Sabrent NVMe drive for Operating System / Programs only. 1X WD BLACK 1TB internal SATA 7,200rpm hard drives.1 for internal projects, 1 for Library clips/sounds/music/stills./backup of working projects. 1x500GB SSD current project only drive, 2x WD RED 2TB drives for latest footage storage. Total 31TB of 10 external WD drives for backup.

ASUS NVIDIA GeForce RTX 3060 12GB. nVidia Studio driver version 572.60 - 3584xCUDA cores Direct X 12.1. Memory interface 192bit Memory bandwidth 360.05GB/s 12GB of dedicated GDDR6 video memory, shared system memory 16307MB PCi Express x8 Gen3. Two Samsung 27" LED SA350 monitors with 5000000:1 contrast ratios at 60Hz.

Running MMS 2024 Suite v 23.0.1.182 (UDP3) and VPX 14 - v20.0.3.180 (UDP3)

M Audio Axiom AIR Mini MIDI keyboard Ver 5.10.0.3507

VXP 14, MMS 2024 Suite, Vegas Studio 16, Vegas Pro 18, Vegas Pro 21,Cubase 4. CS6, NX Studio, Mixcraft 9 Recording Studio. Mixcraft Pro 10 Studio. CS6 and DXO Photolab 8, OBS Studio.

Audio System 5 x matched bi-wired 150 watt Tannoy Reveal speakers plus one Tannoy 15" 250 watt sub with 5.1 class A amplifier. Tuned to room with Tannoy audio application.

Ram Acoustic Studio speakers amplified by NAD amplifier.

Rogers LS7 speakers run from Cambridge Audio P50 amplifier

Schrodinger's Backup. "The condition of any backup is unknown until a restore is attempted."

Richard-hardy wrote on 2/21/2019, 7:23 PM

@Richard-hardy

There is little to gain if the source file is a variable bit rate to encode at a constant bit rate.

Individual frames seldom contain exactly the same amount of data in each frame, so using a variable bitrate allows the end file to be physically smaller than using a constant bit rate without losing quality beyond the normal encoding degradation. A constant quantizer stops faster scenes (more action) from reducing the bitrate from what it would be doing normally, which is taking information away where your eye doesn't perceive it, but it will increase the file size with little to no gain quality wise. Target quality is the how close to the original it can take the conversion with the added compression from transcoding.

There is no gain in quality to be had in my opinion from using H.264 over MP4. You just get smaller file sizes.

In fact, from a quality point of view, I prefer MP4.

Hi, thanks for your help.

The thing with Target Quality though is that when I select it, I have no idea what to type in it. By default it usually has something like 24-25-27 but I have no idea what that means or how it affects the video quality.

Also, isn’t MP4 just a container?

CubeAce wrote on 2/22/2019, 1:41 AM

@Richard-hardy

Sorry, I meant to type MPEG4.

On Target quality, that would be tough to suggest as too low and it may not work at all leaving a blank video and too high will not render any improvements while only increasing file size.

 

Welcome to the frustrating world of working with video editing.

 

Windows 10 Enterprise. Version 22H2 OS build 19045.5737

Direct X 12.1 latest hardware updates for Western Digital hard drives.

Asus ROG STRIX Z390-F Gaming motherboard Rev 1.xx with Supreme FX inboard audio using the S1220A code. Driver No 6.0.8960.1 Bios version 1401

Intel i9900K Coffee Lake 3.6 to 5.1GHz CPU with Intel UHD 630 Graphics .Driver version Graphics Driver 31.0.101.2135 for 7th-10th Gen Intel® with 64GB of 3200MHz Corsair DDR4 ram.

1000 watt EVGA modular power supply.

1 x 250GB Evo 970 NVMe: drive for C: drive backup 1 x 1TB Sabrent NVMe drive for Operating System / Programs only. 1X WD BLACK 1TB internal SATA 7,200rpm hard drives.1 for internal projects, 1 for Library clips/sounds/music/stills./backup of working projects. 1x500GB SSD current project only drive, 2x WD RED 2TB drives for latest footage storage. Total 31TB of 10 external WD drives for backup.

ASUS NVIDIA GeForce RTX 3060 12GB. nVidia Studio driver version 572.60 - 3584xCUDA cores Direct X 12.1. Memory interface 192bit Memory bandwidth 360.05GB/s 12GB of dedicated GDDR6 video memory, shared system memory 16307MB PCi Express x8 Gen3. Two Samsung 27" LED SA350 monitors with 5000000:1 contrast ratios at 60Hz.

Running MMS 2024 Suite v 23.0.1.182 (UDP3) and VPX 14 - v20.0.3.180 (UDP3)

M Audio Axiom AIR Mini MIDI keyboard Ver 5.10.0.3507

VXP 14, MMS 2024 Suite, Vegas Studio 16, Vegas Pro 18, Vegas Pro 21,Cubase 4. CS6, NX Studio, Mixcraft 9 Recording Studio. Mixcraft Pro 10 Studio. CS6 and DXO Photolab 8, OBS Studio.

Audio System 5 x matched bi-wired 150 watt Tannoy Reveal speakers plus one Tannoy 15" 250 watt sub with 5.1 class A amplifier. Tuned to room with Tannoy audio application.

Ram Acoustic Studio speakers amplified by NAD amplifier.

Rogers LS7 speakers run from Cambridge Audio P50 amplifier

Schrodinger's Backup. "The condition of any backup is unknown until a restore is attempted."

johnebaker wrote on 2/22/2019, 4:11 AM

@Richard-hardy

Hi

. . . . I have no idea what to type in it. . . . .

If you want to learn more of what they do there are plenty of resources on the Internet, however, as you have been advised many times before - do no touch these settings, it is very easy to make the video quality worse if you deviate from the default export settings - they are already optimised and should not need changing.

HTH

John EB

VPX 16, Movie Studio 2025, and earlier versions 2015 and 2016, Music Maker Premium 2024.

PC - running Windows 11 23H2 Professional on Intel i7-8700K 3.2 GHz, 16GB RAM, RTX 2060 6GB 192-bit GDDR6, 1 x 1Tb Sabrent NVME SSD (OS and programs), 2 x 4TB (Data) internal HDD + 1TB internal SSD (Work disc), + 6 ext backup HDDs.

Laptop - Lenovo Legion 5i Phantom - running Windows 11 24H2 on Intel Core i7-10750H, 16GB DDR4-SDRAM, 512GB SSD, 43.9 cm screen Full HD 1920 x 1080, Intel UHD 630 iGPU and NVIDIA GeForce RTX 2060 (6GB GDDR6)

Sony FDR-AX53e Video camera, DJI Osmo Action 3 and Sony HDR-AS30V Sports cams.

CubeAce wrote on 2/22/2019, 6:26 AM

@johnebaker

I will second that after much fruitless fettling.

Sometimes in some settings where you get an 'auto' option, you can improve things by selecting 'Best' or 'better' instead, but that's about it. Messing around with bit rates often ends with less than optimum quality output. There are definite relationships between minimum and maximum bit rates that you can't narrow or extend without crashing the encoding process or ending up with blank or stuttering video. Similarly messing with GOP structures is equally unadvisable at all in my limited experience.

I think the problem is that older formats are always going to look bad on new equipment. It's the reason to film in 4k or 6k now before 8k becomes mainstream. And it will. Progress will always be continuous with shorter and more rapid time frames between formats. Where possible older formats with less resolution possibly need enhancing before they are re-encoded go be preserved on new formats, but that would need specialist programming. There are fractal programs for enhancing stills but I'm not aware of anything for old video footage that possibly came originally from 16mm film stock anyway. Look at the problems the BBC had with converting old Dr Who programs. They are barely watchable even with the resources they have. My old VHS tapes played back on an old TV look dreadful even without editing.

The other problem is the more you edit and convert video, the more your eyes will pick up on the imperfections between the two outputs that most people would not see. That's why I prefer the cinema to watching a film on a large screen TV. Once we train our brains to see something one way there is little going back without seeing the imperfections that were always there but not noticable until something better came along. I'm already fed up with 1080p.

 

Windows 10 Enterprise. Version 22H2 OS build 19045.5737

Direct X 12.1 latest hardware updates for Western Digital hard drives.

Asus ROG STRIX Z390-F Gaming motherboard Rev 1.xx with Supreme FX inboard audio using the S1220A code. Driver No 6.0.8960.1 Bios version 1401

Intel i9900K Coffee Lake 3.6 to 5.1GHz CPU with Intel UHD 630 Graphics .Driver version Graphics Driver 31.0.101.2135 for 7th-10th Gen Intel® with 64GB of 3200MHz Corsair DDR4 ram.

1000 watt EVGA modular power supply.

1 x 250GB Evo 970 NVMe: drive for C: drive backup 1 x 1TB Sabrent NVMe drive for Operating System / Programs only. 1X WD BLACK 1TB internal SATA 7,200rpm hard drives.1 for internal projects, 1 for Library clips/sounds/music/stills./backup of working projects. 1x500GB SSD current project only drive, 2x WD RED 2TB drives for latest footage storage. Total 31TB of 10 external WD drives for backup.

ASUS NVIDIA GeForce RTX 3060 12GB. nVidia Studio driver version 572.60 - 3584xCUDA cores Direct X 12.1. Memory interface 192bit Memory bandwidth 360.05GB/s 12GB of dedicated GDDR6 video memory, shared system memory 16307MB PCi Express x8 Gen3. Two Samsung 27" LED SA350 monitors with 5000000:1 contrast ratios at 60Hz.

Running MMS 2024 Suite v 23.0.1.182 (UDP3) and VPX 14 - v20.0.3.180 (UDP3)

M Audio Axiom AIR Mini MIDI keyboard Ver 5.10.0.3507

VXP 14, MMS 2024 Suite, Vegas Studio 16, Vegas Pro 18, Vegas Pro 21,Cubase 4. CS6, NX Studio, Mixcraft 9 Recording Studio. Mixcraft Pro 10 Studio. CS6 and DXO Photolab 8, OBS Studio.

Audio System 5 x matched bi-wired 150 watt Tannoy Reveal speakers plus one Tannoy 15" 250 watt sub with 5.1 class A amplifier. Tuned to room with Tannoy audio application.

Ram Acoustic Studio speakers amplified by NAD amplifier.

Rogers LS7 speakers run from Cambridge Audio P50 amplifier

Schrodinger's Backup. "The condition of any backup is unknown until a restore is attempted."

Richard-hardy wrote on 2/22/2019, 6:51 AM

@Richard-hardy

Sorry, I meant to type MPEG4.

On Target quality, that would be tough to suggest as too low and it may not work at all leaving a blank video and too high will not render any improvements while only increasing file size.

 

Welcome to the frustrating world of working with video editing.

Which part of MPEG-4 are you referring to?

johnebaker wrote on 2/22/2019, 7:37 AM

@Richard-hardy

Hi

. . . . MPEG-4 . . . .

MPEG-4 has many 'parts' ie specification levels see this article on Wikipedia.

It not advisable to touch these settings as you may render your exports unplayable on some devices, leave the level settings as is or set them to auto.

HTH

John EB

 

VPX 16, Movie Studio 2025, and earlier versions 2015 and 2016, Music Maker Premium 2024.

PC - running Windows 11 23H2 Professional on Intel i7-8700K 3.2 GHz, 16GB RAM, RTX 2060 6GB 192-bit GDDR6, 1 x 1Tb Sabrent NVME SSD (OS and programs), 2 x 4TB (Data) internal HDD + 1TB internal SSD (Work disc), + 6 ext backup HDDs.

Laptop - Lenovo Legion 5i Phantom - running Windows 11 24H2 on Intel Core i7-10750H, 16GB DDR4-SDRAM, 512GB SSD, 43.9 cm screen Full HD 1920 x 1080, Intel UHD 630 iGPU and NVIDIA GeForce RTX 2060 (6GB GDDR6)

Sony FDR-AX53e Video camera, DJI Osmo Action 3 and Sony HDR-AS30V Sports cams.

jak.willis wrote on 2/28/2019, 12:41 AM

@Richard-hardy

There is little to gain if the source file is a variable bit rate to encode at a constant bit rate.

Individual frames seldom contain exactly the same amount of data in each frame, so using a variable bitrate allows the end file to be physically smaller than using a constant bit rate without losing quality beyond the normal encoding degradation. A constant quantizer stops faster scenes (more action) from reducing the bitrate from what it would be doing normally, which is taking information away where your eye doesn't perceive it, but it will increase the file size with little to no gain quality wise. Target quality is the how close to the original it can take the conversion with the added compression from transcoding.

There is no gain in quality to be had in my opinion from using H.264 over MP4. You just get smaller file sizes.

In fact, from a quality point of view, I prefer MP4.

So isn’t Constant Quantizer effectively the same as Constant Bitrate??

johnebaker wrote on 2/28/2019, 4:18 AM

@jak.willis

Hi

. . . . .Constant Quantizer effectively the same as Constant Bitrate . . . .

No, they are 2 independant settings.

See this article on what Quantization does.

In a nutshell if you use Constant Quantizer settings you are stopping the encoder determining the best settings depending on the degree of fine detail in the video.

As has been advised do not touch these settings - there is nothing to be gained.

John EB

 

 

VPX 16, Movie Studio 2025, and earlier versions 2015 and 2016, Music Maker Premium 2024.

PC - running Windows 11 23H2 Professional on Intel i7-8700K 3.2 GHz, 16GB RAM, RTX 2060 6GB 192-bit GDDR6, 1 x 1Tb Sabrent NVME SSD (OS and programs), 2 x 4TB (Data) internal HDD + 1TB internal SSD (Work disc), + 6 ext backup HDDs.

Laptop - Lenovo Legion 5i Phantom - running Windows 11 24H2 on Intel Core i7-10750H, 16GB DDR4-SDRAM, 512GB SSD, 43.9 cm screen Full HD 1920 x 1080, Intel UHD 630 iGPU and NVIDIA GeForce RTX 2060 (6GB GDDR6)

Sony FDR-AX53e Video camera, DJI Osmo Action 3 and Sony HDR-AS30V Sports cams.

Richard-hardy wrote on 3/14/2019, 5:08 AM

@Richard-hardy

There is little to gain if the source file is a variable bit rate to encode at a constant bit rate.

Individual frames seldom contain exactly the same amount of data in each frame, so using a variable bitrate allows the end file to be physically smaller than using a constant bit rate without losing quality beyond the normal encoding degradation. A constant quantizer stops faster scenes (more action) from reducing the bitrate from what it would be doing normally, which is taking information away where your eye doesn't perceive it, but it will increase the file size with little to no gain quality wise. Target quality is the how close to the original it can take the conversion with the added compression from transcoding.

There is no gain in quality to be had in my opinion from using H.264 over MP4. You just get smaller file sizes.

In fact, from a quality point of view, I prefer MP4.

So is “Target Quality” the equivalent of “Constant Quality” then?

CubeAce wrote on 3/14/2019, 5:45 PM

@Richard-hardy

No. They have two different jobs as described so can't be equivalent to each other.

You have to realise that playing around with these settings is like taking a photo manually. There are lots of options with hundreds of permutations that won't work well together and possibly only one that will give the desired result.

I personally don't think it will matter if you chose a different software or went through all the various permutations available, you would probably end up very close to one of the presets.

 

Windows 10 Enterprise. Version 22H2 OS build 19045.5737

Direct X 12.1 latest hardware updates for Western Digital hard drives.

Asus ROG STRIX Z390-F Gaming motherboard Rev 1.xx with Supreme FX inboard audio using the S1220A code. Driver No 6.0.8960.1 Bios version 1401

Intel i9900K Coffee Lake 3.6 to 5.1GHz CPU with Intel UHD 630 Graphics .Driver version Graphics Driver 31.0.101.2135 for 7th-10th Gen Intel® with 64GB of 3200MHz Corsair DDR4 ram.

1000 watt EVGA modular power supply.

1 x 250GB Evo 970 NVMe: drive for C: drive backup 1 x 1TB Sabrent NVMe drive for Operating System / Programs only. 1X WD BLACK 1TB internal SATA 7,200rpm hard drives.1 for internal projects, 1 for Library clips/sounds/music/stills./backup of working projects. 1x500GB SSD current project only drive, 2x WD RED 2TB drives for latest footage storage. Total 31TB of 10 external WD drives for backup.

ASUS NVIDIA GeForce RTX 3060 12GB. nVidia Studio driver version 572.60 - 3584xCUDA cores Direct X 12.1. Memory interface 192bit Memory bandwidth 360.05GB/s 12GB of dedicated GDDR6 video memory, shared system memory 16307MB PCi Express x8 Gen3. Two Samsung 27" LED SA350 monitors with 5000000:1 contrast ratios at 60Hz.

Running MMS 2024 Suite v 23.0.1.182 (UDP3) and VPX 14 - v20.0.3.180 (UDP3)

M Audio Axiom AIR Mini MIDI keyboard Ver 5.10.0.3507

VXP 14, MMS 2024 Suite, Vegas Studio 16, Vegas Pro 18, Vegas Pro 21,Cubase 4. CS6, NX Studio, Mixcraft 9 Recording Studio. Mixcraft Pro 10 Studio. CS6 and DXO Photolab 8, OBS Studio.

Audio System 5 x matched bi-wired 150 watt Tannoy Reveal speakers plus one Tannoy 15" 250 watt sub with 5.1 class A amplifier. Tuned to room with Tannoy audio application.

Ram Acoustic Studio speakers amplified by NAD amplifier.

Rogers LS7 speakers run from Cambridge Audio P50 amplifier

Schrodinger's Backup. "The condition of any backup is unknown until a restore is attempted."