LEAD H264 Encoder User Interface (4.0)

The Encoder property page provides a user interface for changing the filter attributes. Changes are applied only when the filter's state is stopped, with the ability to set them permanently by clicking Apply or OK, or abandoning them by clicking Cancel. Positioning the mouse pointer over a control displays general information for that control. The property page is shown in the figure below:

 

LEAD H264 Encoder

 The following table shows the controls and their descriptions:

Control Description
Quality Driven radio button If this button is selected, a quality factor, set in the Quality Factor edit box, determines the video quality. A Quality Factor of 1 gives the highest quality and the largest video file size. A Quality Factor of 49 gives the smallest file size with low video quality. The default is 28.
Quality Factor edit box Value that determines the video quality if the Quality Driven radio button is selected.
Rate Driven radio button If this button is selected, the compression level is constant and the storage requirements can be easily predicted. However, the quality of more dynamic scenes or those with more picture detail may be affected. The associated bit rate describes the amount of data used/transferred within a time period. It is directly related to the compression level. The higher the bit rate, the lower the compression and the better the quality. The bit rate can be adjusted using the Bit Rate edit box in Bits Per Sec.
Bit Rate edit box Value that determines the bitrate if the Rate Driven radio button is selected. (In kilo bits/sec, NOT kilo bytes/sec)

The bitrate is limited to 10Mbps (10,000) in the Quick Sync Hardware encoder. To use higher bitrates, use the software or CUDA hardware encoder.

Max Bit Rate edit box Value that determines the bit rate if the Rate Driven radio button is selected. (In kilo bits/sec, NOT kilo bytes/sec). Not available when using Quick Sync Hardware acceleration. See Configuring the H.264 Encoder for Streaming for more information. 

If 0, the bit rate is not limited (default).

If -1, the maximum bit rate is set to be 20% higher than the Bit Rate. (In other words, 1.2 * Bit Rate.)

Max Frame Duration edit box Value that determines the maximum duration (in milliseconds) of the biggest single frame. The duration is calculated at the specified Bit Rate. Available when Rate Driven radio button is selected. Not available when using Quick Sync or CUDA Hardware acceleration is selected. See Configuring the H.264 Encoder for Streaming for more information. 

If 0, the frame duration is not limited. In extreme cases (like still image video), one frame (the I frame) can be as big as the whole GOP.

CABAC (Arithmetic Coding) radio button Sets the entropy coding mode to Context-based Adaptive Binary Arithmetic Coding (CABAC). CABAC gives better compression at the same quality but is a little bit slower than CAVLC.
CAVLC (Huffman) radio button Sets the entropy coding mode to Context-Adaptive Variable-Length Coding (CAVLC). CABAC gives better compression at the same quality but is a little bit slower than CAVLC.
Output Format drop-down list box Selects the output format. Possible values are as follows:
  Value Meaning
  Auto Allows the LEAD H264 Encoder to determine the appropriate format.
  Main Profile (h264) Uses MEDIATYPE_Video and MEDIASUBTYPE_h264

Generate Main profile video in which NAL units are prefixed with 00 00 01 start codes. This format is suitable for use in MPEG-2 containers.

  Main Profile (avc1)/ Flash Uses MEDIATYPE_Video and ISOMEDIATYPE_avc1 or MEDIASUBTYPE_avc1

Generate Main profile video in which NAL units are prefixed with NAL unit length (no start codes). This format is suitable for use in ISO/MP4 containers (for iPod/iPhone/iPad/Flash).

  LEAD (L264) Uses MEDIATYPE_Video and  MEDIASUBTYPE_L264 or MEDIASUBTYPE_LX64
  iPod (avc1) Uses MEDIATYPE_Video and ISOMEDIATYPE_avc1 or MEDIASUBTYPE_avc1

The LEAD H264 Encoder will use the appropriate setting to produce video files that can be played on iPod devices.

  PSP (avc1) Uses MEDIATYPE_Video and ISOMEDIATYPE_avc1 or MEDIASUBTYPE_avc1

The LEAD H264 Encoder will use the appropriate setting to produce video files that can be played on PSP devices.

  Baseline Profile(h264) Uses MEDIATYPE_Video and MEDIASUBTYPE_h264.

Generate Baseline profile video in which NAL units are prefixed with 00 00 01 start codes. This format is suitable for use in MPEG-2 containers.

Video uses only I and P frames (B frames are not allowed in Baseline profile).

  Baseline Profile(avc1)   Uses MEDIATYPE_Video and ISOMEDIATYPE_avc1 or MEDIASUBTYPE_avc1.

Generate Baseline profile video in which NAL units are prefixed with NAL unit length (no start codes). This format is suitable for use in ISO/MP4 containers (for iPod/iPhone/iPad/Flash).

Video uses only I and P frames (B frames are not allowed in Baseline profile).

  Main Profile(RTP Packetized) Uses MEDIATYPE_Stream and MEDIASUBTYPE_h264.

Generate Main profile video in which NAL units are packetized in RTP packets.

This format is suitable for streaming in videoconferencing applications (not for saving to files).

  Baseline Profile(RTP Packetized) Uses MEDIATYPE_Stream and MEDIASUBTYPE_h264.

Generate Baseline profile video in which NAL units are packetized in RTP packets.

This format is suitable for streaming in videoconferencing applications (not for saving to files).

  iPad (avc1) Uses MEDIATYPE_Video and ISOMEDIATYPE_avc1 or MEDIASUBTYPE_avc1

The LEAD H264 Encoder will use the appropriate setting to produce video files that can be played on iPad devices.

   High Profile (h264) Uses MEDIATYPE_Video and ISOMEDIATYPE_h264

Generate H264 video using High profile and NAL units are prefixed with 00 00 01 start codes. This format is suitable for use in MPEG-2 containers.

  High Profile (avc1) / Flash Uses MEDIATYPE_Video and ISOMEDIATYPE_avc1 or MEDIASUBTYPE_avc1

Generate H264 video using High profile and NAL units are prefixed with NAL unit length (no start codes). This format is suitable for use in ISO/MP4 containers (for iPad/Flash).

Super Compression check box If this check box is selected, LEAD's improvement to the H264 compression is used. This option produces very high compression and makes the encoding and decoding processes very fast. If high quality video is desired it is recommended to clear the check box.

This option is recommended for video conferencing and broadcast applications where speed and size are very important and moderate quality is ok.

This property is only available if the output is Auto,MainProifile (h264), Main Profile(avc1)  / Flash, LEAD (L264), Main Profile(RTP Packetized) or Baseline Profile( RTP Packetized).

Note: If this option is enabled, hardware compression will not be used (even if the computer is capable of hardware compression).

Output Frame Rate drop-down list box Sets the playback frame rate, in frames per second, of the compressed video, regardless of the rate of the input stream frames. The LEAD H264 Encoder automatically adjusts the input video to match the desired frame rate. The rate is adjusted by dropping or duplicating input frames. If the selected frame rate is lower than the original frame rate, the compression will be higher.

If "input framerate" is selected, the output frame rate will be exactly the same as the input frame rate. Use this selection when you don't want to change the frame rate.

No. of Ps between 2 Is drop-down list box If Enable Set GOP check box is cleared, then option shown is No. of Ps between 2 Is for the number of Ps between 2 successive I frames.
GOP Length drop-down list box If Enable Set GOP check box is selected, then the I frame length value can be selected from the drop-down list box. For example: GOP Length = 4, and No of Bs between 2 Ps = 1, results in IPBP... for each I frame.
No. of Bs between 2 Ps drop-down list box Sets the number of B frames between 2 successive P frames. 
Enable Set GOP Length check box Changes the units of measure of the distance between two I-frames.  

Enable Set GOP Length check box is selected: drop-down list box unit changes to GOP Length

Enable Set GOP Length check box is cleared: drop-down list box unit changes to No. of Ps between 2 Is 

Encoding Threads drop-down list box The number of threads used during encoding. The maximum number of threads that can be used is 16. Using two threads with a dual core machine or 2 CPUs will increase the encoding speed significantly. Possible values are:
  Value Meaning
  Auto Prompts the LEAD H264 Encoder to determine the appropriate number of threads.
  1 Uses 1 thread during encoding and 1 slice per frame.
  2 Uses 2 threads during encoding and 2 slices per frame.
  X Uses X threads during encoding and X slices per frame.
Capabilities section Reports the encoder's capabilities. It indicates whether hardware compression and the high profiles are available. Refer to How to Enable High Profiles and Hardware Compression in the LEAD H.264 Encoder topic for more information. Use the check boxes in this section to disable hardware acceleration.
Enable Original Software (Does Not Support High Profiles) check box Always selected, indicates the original software compression is always installed.
Enable Quick Sync Software (Supports High Profiles) check box If selected, it indicates the libmfx needed for Quick Sync software encoding is installed. It also indicates High Profiles are available even if hardware acceleration is not possible.
Enable Quick Sync Hardware check box If the Enable Quick Sync Hardware check box is selected, the encoder will use Quick Sync hardware in Intel processors if available (this is the default).

If the Enable Quick Sync Hardware check box is cleared, the encoder will not use Quick Sync hardware acceleration even if it is available.

This check box is disabled if the encoder is running or if the computer is not capable of Quick Sync hardware acceleration.

You can not change this setting while the encoder is running (this is why the setting is disabled in this case).

Enable CUDA Hardware (Supports High Profiles) check box  If the Enable CUDA Hardware check box is selected, the encoder will use CUDA hardware acceleration in NVIDIA graphics cards if available (this is the default).

If the Enable CUDA Hardware check box is cleared, the encoder will not use CUDA hardware acceleration even if it is available.

This check box is disabled if the encoder is running or if the computer is not capable of CUDA hardware acceleration.

You cannot change this setting while the encoder is running (this is why the setting is disabled in this case).

CUDA Info button Click this button to display additional information regarding the CUDA capabilities. Clicking this button opens a message box that displays the number of CUDA GPU units. If there are GPU units, the message box will also display the version of the CUDA engine installed, the required CUDA version for optimal performance, the GPU usage and the temperature.

If this message box indicates the installed version is less than the required version (5.5), it is recommended you install the latest driver for your graphics card from https://www.nvidia.com/content/global/global.php.

The CUDA Info note below includes figures that display example message boxes.

Enable Precision TimeStamps check box If the Enable Precision TimeStamps check box is selected, the encoder will add precision time stamps to each compressed frame.

If the Enable Precision TimeStamps check box is cleared, the encoder will not add precision time stamps to each compressed frame (this is the default).

Refer to the Precision Time Stamps topic for more information on precision time stamps.

Current radio button If this button is selected, the start value for the precision time stamp will be current time when the compression starts. This is equivalent to setting the precision time stamp start value to -1 (this is the default).

The Precision Time Stamps value is in microseconds since Jan 1, 1970 and is relative to Coordinates Universal Time (UTC)

This property is only available if the Enable Precision TimeStamps check box is selected.

Custom radio button If this button is selected, the start value for the precision time stamp will be a custom value presented as a date-time value. Change the value by clicking the Change button.

The  Precision Time Stamps value is in microseconds since Jan 1, 1970 and is relative to Coordinates Universal Time (UTC)

This property is only available if the Enable Precision TimeStamps check box is selected.

Change Button Click this button to display a date-time selection dialog, The custom precision time will be viewed in the dialog and the value can be changed.

This button is only available if the Enable Precision TimeStamps check box is checked and custom radio button is enabled

The Custom Date-Time note below includes a figure that displays an example dialog.

I Frames and P Frames

To increase the compression performance, H264 uses Temporal Compression. Temporal compression is achieved by encoding only the difference between successive frames instead of the frames themselves. This means that frames cannot be considered in isolation. A given picture is constructed from the prediction from a previous picture, and may be used to predict the next picture. An H264  video stream comprises I Frames, B Frames and P Frames:

To increase the compression of H264, more B and P frames should be used. You do so using the "No. of Ps between 2 Is" and "No. of Bs between 2 Ps" options on the Encoder Property Page:

For example if No. of Ps between 2 Is is 3, and No. of Bs between 2 Ps is 5, then the video stream looks like:

I B B B B B P B B B B B P B B B B B P &..

The distance between I frames must be a multiple of the distance between the P frames. The encoder will automatically adjust these values to preserve this relationship.

CUDA Info

If your computer has CUDA capabilities, clicking the CUDA Info button opens a message box similar to the following figures:

CUDA Info message box

The above message box shows a computer with two NVIDIA graphics cards, both of which have CUDA capabilities. At the time the message box was brought up, device 0 was in use (usage is 64%), while device 1 was available (usage is only 2%). So the encoder has automatically picked device 1. Also, the "(AutoSelect)" string following the device number indicates the GPU device was automatically selected and that this selection might change when the conversion starts (because by then device 0 might become available and device 1 might be in use).

By default, the encoder will automatically select the best GPU device to use. But you can override this default behavior programmatically by setting the ILMH264Encoder::PreferredCUDADevice property.

The following message box shows how the message box might look like if you set the ILMH264Encoder::PreferredCUDADevice property to 1 (note that in this case, there is no "(AutoSelect)" string following the selected device number:

Setting PreferredCUDADevice to 1

If your computer does not have CUDA capabilities, clicking the CUDA Info button opens a message box similar to the following figure:

No CUDA Support message

Custom Date-Time

To customize the start value of the precision time stamp, click the Change button to open a Date and Time Selector dialog, as shown in the following figure:

 

Date and Time Selector dialog
 

The Date format must be in the form of M:D:Y. Use the spin edit boxes to change the values. Values for the Month (M) are between 1 and 12. Values for the Day (D)  are between 1 and 31. Values for the Year must be above 1970.

The Time format must be in the form of H:M:S. Use the spin edit boxes to change the values. Values for the Hour (H) are between 1 and 12. Values for the Minute (M) are between 0 and 59. Values for the Second (S) are between 0 and 59. AM or PM must be selected in the combo box.

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help