# NVENC (HW) H264 native encoder profile(s)

**URL:** https://discussion.mcebuddy2x.com/t/nvenc-hw-h264-native-encoder-profile-s/2584
**Category:** Hardware Encoding
**Created:** [January 31, 2019, 8:09pm UTC](https://discussion.mcebuddy2x.com/t/nvenc-hw-h264-native-encoder-profile-s/2584 "2019-01-31T20:09:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![awill](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@awill](https://discussion.mcebuddy2x.com/u/awill)
#### Post date: [January 31, 2019, 8:09pm UTC](https://discussion.mcebuddy2x.com/t/nvenc-hw-h264-native-encoder-profile-s/2584/1 "2019-01-31T20:09:22Z")

</div>

First of all a shout out to [Will\_Tschumy](https://discussion.mcebuddy2x.com/u/Will_Tschumy) for the work on the H265 NVENC constant quality encoder profile.

I have been toying around with some profiles and wanted to recreate a H264 native ffmpeg encoder profile for the types of shows/events where I want faster trans-coding than the H265 one can offer or if I want to prepare files for devices not yet equipped with a H265 decoder.

It was super easy once I had slept a little and focused, this is a straight copy of the original H265 profile reworked with the syntax for H264 instead, quality set to 27 in my default setup, but can easily be changed to whatever others might prefer depending on what it is needed for. (Was reminded that the quality setting for H264 is different than for H265)

I have done nothing with the fallback to Handbrake for now, as you can see it would fall back to the basic X265 encoder originally set by [Will\_Tschumy](https://discussion.mcebuddy2x.com/u/Will_Tschumy) for the original profile.

Next up I will be working on making similar profiles with constant bitrates for other purposes.

> ```
> [MKV H264 NVENC Constant Quality]
> Description=nVidia H264 NVENC Constant quality, varible bitrate
> order=ffmpeg, handbrake
> AllowH264CopyRemuxing=true
> FixedResolution=true
> AutoDeinterlace=true
> ffmpeg-UsingHardwareEncoding=True
> ffmpeg-general=-threads 0 -hwaccel auto
> ffmpeg-video=-ss 9 -c:v h264_nvenc -cq 27 -rc vbr -map 0:v
> ffmpeg-audio=-acodec libfdk_aac -ab 128k -map 0:a
> ffmpeg-audioac3=-acodec libfdk_aac -ab 320k -map 0:a
> ffmpeg-ext=.mkv
> ffmpeg-audiodelay=skip
> handbrake-UsingHardwareEncoding=true
> handbrake-general=--decomb --denoise="weak" --loose-anamorphic --verbose=2 -T -O
> handbrake-video=--start-at duration:3 -e x265 -q 18 
> handbrake-audio=-E ffac3 -R auto -B 192 -D 0 -a 1,2,3,4,5
> handbrake-audioac3=-E ffac3 -R auto -B 384 -D 0 -a 1,2,3,4,5
> handbrake-ext=.mkv
> handbrake-audiodelay=skip
> PreConversionCommercialRemover=true
> 
> ```

---

<div class="post-metadata">

### Author: ![Will\_Tschumy](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/w/ecc23a/32.png) [@Will\_Tschumy](https://discussion.mcebuddy2x.com/u/Will_Tschumy)
#### Post date: [January 31, 2019, 10:59pm UTC](https://discussion.mcebuddy2x.com/t/nvenc-hw-h264-native-encoder-profile-s/2584/2 "2019-01-31T22:59:56Z")

</div>

What does the log file say when it fails back?

Also, if you run handbrake, you’re able to use the nvenc selections?

And thanks for the shoutout 🙂

---

<div class="post-metadata">

### Author: ![awill](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@awill](https://discussion.mcebuddy2x.com/u/awill)
#### Post date: [February 1, 2019, 1:57am UTC](https://discussion.mcebuddy2x.com/t/nvenc-hw-h264-native-encoder-profile-s/2584/3 "2019-02-01T01:57:18Z")

</div>

Hey man my pleasure, you did the hard work on 265 codec profile, so when fallback’s happen it is just because I can’t do syntax proper 🙂

However I have been playing with HandbrakCli and NVENC the last couple of hours, and the results are quite good, will post some profile options later on when I have gotten the audio options to work the way I want them.

---

<div class="post-metadata">

### Author: ![awill](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@awill](https://discussion.mcebuddy2x.com/u/awill)
#### Post date: [February 1, 2019, 8:38pm UTC](https://discussion.mcebuddy2x.com/t/nvenc-hw-h264-native-encoder-profile-s/2584/4 "2019-02-01T20:38:20Z")

</div>

Hey, got some testing done the last two days, this profile works quite well the updated HandbrakeCli

I prefer my audio not being re-encoded in any way and let my Onkyo receiver handle the decoding and if there is any need for transcoding on other devices audio does not cost more than 1-2 % CPU utilization.

> ```
> [Handbrake Cli 1.2.0 H264 Testing]
> Description=nVidia HEVC (H264) Constant Quality
> order=handbrake
> FixedResolution=true
> PreConversionCommercialRemover=false
> UniversalCommercialRemover=false
> handbrake-general=--loose-anamorphic --comb-detect=fast --decomb=mode=7 --verbose=2 --format av_mkv --subtitle 1,2,3
> handbrake-video=--start-at duration:0 --encoder nvenc_h264 --encoder-preset medium --encoder-level 4.1 --quality 25 --vfr
> handbrake-audio=--aencoder copy:aac --audio 1,2,3
> handbrake-audioac3=--aencoder copy:ac3 --audio 1,2,3
> handbrake-ext=.mkv
> handbrake-audiodelay=skip
> 
> ```

Almost identical profile for H265

> ```
> [Handbrake Cli 1.2.0 H265 Quality Testing]
> Description=nVidia HEVC (H265) Quality Setting
> order=handbrake
> FixedResolution=true
> PreConversionCommercialRemover=false
> UniversalCommercialRemover=false
> handbrake-general=--loose-anamorphic --comb-detect=fast --decomb=mode=7 --verbose=2 --format av_mkv --subtitle 1,2,3
> handbrake-video=--start-at duration:0 --encoder nvenc_h265 --encoder-preset medium --encoder-level 4.1 --quality 28 --vfr
> handbrake-audio=--aencoder copy:aac --audio 1,2,3
> handbrake-audioac3=--aencoder copy:ac3 --audio 1,2,3
> handbrake-ext=.mkv
> handbrake-audiodelay=skip
> 
> ```

---

<div class="post-metadata">

### Author: ![Goose](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/g/5f9b8f/32.png) [@Goose](https://discussion.mcebuddy2x.com/u/Goose)
#### Post date: [March 3, 2019, 2:00pm UTC](https://discussion.mcebuddy2x.com/t/nvenc-hw-h264-native-encoder-profile-s/2584/5 "2019-03-03T14:00:58Z")

</div>

Nice! You may want to consider setting flags in your custom profile if you’ve optimized the profile and don’t want MCEBuddy to adjust certain parameters. Check out these flags:

> Handbrake-AudioOptimized=true  
> Handbrake-VideoOptimized=true  
> Handbrake-UsingHardwareEncoding=true

See this topic for more details on how these flags work.

> [@MCEBuddy - Advanced Settings, Commands and Tweaking](https://discussion.mcebuddy2x.com/t/mcebuddy-advanced-settings-commands-and-tweaking/30):
>
> Advanced concepts to use MCEBuddy Refer to the [MCEBuddy Profiles Basics](https://discussion.mcebuddy2x.com/t/27) page to learn about basic Profiles creation NOTE: Advanced Conversion Parameters apply to profiles.conf Do NOT edit mcebuddy.conf. As of v2.3.13 ALL Advanced Configuration Parameters (except FFmpegBackupRemux) in mcebuddy.conf can be accessed through the GUI, Settings → Expert Settings page DO NOT REPLACE THE NEW CONFIGURATION FILES WITH THE OLD FILES AS PARAMETERS IN THE NEW FILES ARE ADDED/UPDATED WITH EACH RELEASE. …
