Nvidia H264, Nvidia H265

<< Click to Display Table of Contents >>

Navigation:  Nodes > Tasks > Encoders >

Nvidia H264, Nvidia H265

 

Purpose

 

To create .mp4 media files using the NVidia H265 and NVidia H264 nvenc encoders. These are GPU hardware encoders, so they are much faster than software based encoders.

Note: This node is only supported on systems with modern NVidia GPUs. The maximum resolution and other capabilities will depend on each GPU model, as specified in the NVENCODE SDK document (go to that link and click on the "Supported Format Details").

 

Inputs

 

AV In: The image track to be encoded.

 

Ext. Audio (Optional): The audio tracks to be encoded. Alternatively, you can use embedded audio from movie files connected to the AV In connector, which is decided with the Use AV audio property.

 

Outputs

 

AV Out: A video file with .mp4 extension, containing all the video and audio tracks.

 

 

Standard properties

 

Object Name

Color

Bypass

Dst. File Path

Lock

Name Convention

 

Standard Encoder properties

Use AV audio

Existing Outputs

Enable Frame Range (FirstFrame, Duration)

Resolution

Fit

Framerate

interlaced (*1)

Deinterlace mode

Pixel Aspect Ratio

Overwrite TC

Drop Frame

Rotation Metadata

Stereo Mode

Audio Codec

Metadata

Export Metadata

TapeName

Export CDL

Pack Audio Tracks

Write RND Only

Pack Audio Tracks

Write RND Only

Render Farm

 

 

(*1) Many nvidia gpus do not support to produce interlaced modes, on those models the Interlace setting should be left as No. (interlaced images will be de-interlaced on the fly)

 

Advanced image processes

Metadata

Unicolor

Lut3D

Display Filter

Burn In / Slate

 

 

Node specific properties

 

Transcoding->Codec: The H264 or H265 variant to be encoded (depending on the task node you are using). Each value in the codec list will indicate these characteristics:

 

Preliminary note: Main differences between H264 and H265 encoders in Mistika Workflows are as follows:

 

Nvidia H264 only supports 8bit. H265 supports 8bit and 10bit.

 

Nvidia H264 supports up to 4096x4096 resolutions. H265 supports up to 8192x8192 resolutions

 

In general, H265 is more recommended, for the above reasons and also because it uses less bitrate to achieve the same subjective quality. However, H265 is slower to decode than H264 (except for some hardware decoders) and H265 may not be compatible with older players.

 

In addition to the NvidiaH264 task node there is also a generic H264 task node that uses a software based encoder (slower) but it does not require an Nvidia GPU. At the date of this document there is no equivalent for H265.  

 

 

Bit depth: 8bits or 10bits. H264 only supports 8bit. H265 supports 8bit and 10bit. In general, when the available bitrate is not very high, it is recommended to use 8bit for more efficient compression, except for HDR formats.

 

Color sampling: 420 or 444

 

444 produces bigger files, as it will compress information of the three color components of each pixel.

420 produces smaller files, at the cost of significant chroma information, which will be partially shared between pixels.  With this method two color components are shared between adjacent pixels (one component in horizontal and one in vertical, but all adjacent pixels are still different in two color components). In general 420 is only intended for watching final content, not for any intermediate processes. It is based on the fact that the visual perception can distinguish less detail in color differences than in luminance differences. In general this format is just enough for watching content without noticeable artifacts, but it does not provide enough information for further post production tasks.

Note: A common mistake is to assume that using 444 will always produce more "quality" than 420 and that 10 bit will produce more "quality" than 8 bit. This is because the key aspect when applying compression is the bitrate, and when the available bitrate is limited it is recommended to dedicate the most of it to what is more relevant (a better visual perception or to keep more data for post-processing)

Bitrate: Constant bitrate, Quality profile or Lossless.

Constant bitrate (CBR): Tell the encoder to try to produce a constant bitrate, independently of the image content. It is only recommended if specifically requested, as it is not as efficient as the other methods. This is because depending on the image content the specified constant bitrate can be either too much in some frames (a waste of bitrate) and too little in others (producing bad quality in difficult scenes). If selected, a property called “bitrate” will appear below where you can specify the desired bitrate.

 

Quality Profile (Variable bitrate VBR ): In this mode what you select is a quality profile (basically and index of "subjective" quality) and the encoder will produce more or less bitrate as necessary to achieve it. In this mode the used bitrate is highly efficient because it is concentrated where it is needed.  

If you select a codec with Quality Profile then a new property named "quality profile compression" will appear below (instead of the bitrate field). Please note that lower quality profiles produce more image quality (being 1 the maximum and 50 the minimum).  In a way, you can think about this property as the "quality compression".

 

Lossless: Use as low compression as needed as to be considered “lossless” (according to the encoder manufacturer specifications), at the cost of high bitrates.  It is recommended for intermediate formats, at the cost of bigger file sizes.

 

Transcoding->Bitrate, QualityProfile: Optional properties that will appear depending of the selected codec, as per the above explanation.

 

Transcoding->GOP frames (Group of Frames): It is the number of intermediate frames between keyframes. Keyframes use intra-frame compression (so they don’t depend on previous or next frames). Meanwhile, GOP frames use time compression and motion estimation, so they only store differences between previous and next frames.  For editing purposes it is recommended to use a small GOP value (ideally 1). This will produce bigger sizes for a same quality but it will provide instant access to any frame when you load it in other applications, while also avoiding motion estimation artifacts. Longer GOP values will reduce file sizes and they can make a more efficient usage of the available bitrate, but if an artifact happens in one frame then the video images will not recover the affected area until approaching the next keyframe, so long GOP artifacts can be very noticeable.

 

The remaining properties are standard to all codec nodes, please find their links at the top of this document.

 

 

Troubleshooting

 

If the encoder refuses to start with an error related to NVIDIA (or CUDA):

 

Check that your GPU is an NVIDIA  board supporting the selected format and resolution (as per the NVENCODE SDK document).

 

In particular, note that (at the date of this document) the NVIDIan encoder for H264 is only supported up to 4K resolution, and up to 8K resolution in the case of H265.

 

Check  that other applications that could be using the encoder are closed (many  GPU models only support one encoder instance or a very limited number). Specifically, if you need the NVIDIan encoder check that Workflows is not opened two times.

 

Install the latest NVidia driver supported for your GPU.  NVIDIan encoders are rapidly changing, and having an obsolete NVIDIA driver is a common cause of failure.

 

If you are using remote desktops to launch Mistika Workflows (or virtual machines), make sure that the graphic session has a valid CUDA and openGL context. In particular, the basic version of Microsoft RDP is known to destroy the graphics context on disconnection.

 

If the problem is not to encode but to playback the files that you have produced with these nodes then we recommend to create test files using the default settings to start with, as they are the most compatible and known to work with most players.  If the test works then complete it from there.

 

 

 

 

Developer reference (API Rest - node/NVidiaH265/property/[Property ID])

 

Property Label

Property ID

Dst. File Path

url

Use AV Audio

useMovieAudio

Overwrite Mode

overwriteMode

Enable Frame Range

enableFrameRange

First Frame

rangeFirstFrame

Duration

rangeDuration

Codec

codec

Quality Profile

quality

Bitrate

bitrate

GOP

gop

Resolution

resolution

Resolution X

imageResX

Resolution Y

imageResY

Fit

fit

Framerate

fps

Interpolation Type

interpolationType

Trim if TC is Odd

trimIfOdd

Deinterlace Mode

deinterlaceMode

Overwrite TC

changetimecode

New Timecode

timecode

Drop Frame

dropFrame

Rotation Metadata

rotationMetadata

Stereo Mode

stereoMode

Audio Codec

audioCodec

Pack Audio Tracks

packAudioTracks

Write RND Only

writeRNDonly

Export Metadata

exportMetadata

Tape Name

tapeNameSource

Export CDL

exportCDL

CD Ltype

CDLtype

Output Color Space

colorSpace

Gamma

gamma

Gamut

gamut

LUT 3D

lut3D

Display Filter

displayFilter

Tt Burn In

ttBurnIn

Tt Burn In Custom Path

ttBurnInCustomPath

Tt Head Slate

ttHeadSlate

Tt Head Slate Custom Path

ttHeadSlateCustomPath

Tt Head Slate Duration

ttHeadSlateDuration

Tt Tail Slate

ttTailSlate

Tt Tail Slate Custom Path

ttTailSlateCustomPath

Tt Tail Slate Duration

ttTailSlateDuration

Add TimeStamp

addTimeStamp

Render Farm

renderFarmEnabled

Farm Params

farmParams