New FFmpeg Parameters
The following FFmpeg parameters are designed to simplify the integration of Quadra with FFmpeg.
New advanced per-file options
force_nidec: This parameter forces the selection of Netint HW decoders
Supported values:
- logan
- quadra
The format of the input streams does not need to be specified as FFmpeg will automatically detect all the input stream formats.
Command Example:
Force select Quadra h265_ni_quadra_dec decoder
ffmpeg -y -hide_banner -nostdin -vsync 0 -force_nidec quadra -xcoder-params "out=sw" -i input.265 -c:v rawvideo output.yuv
Parameters for updating PMT
The PMTs provide information on each program present in the transport stream, including the program_number, and list the elementary streams that comprise the MPEG-2 program. Quadra provides a feature to update maximum bitrate descriptors in PMT:
mpegts_max_bitrate: The value indicates an upper bound of the total bitrate, including transport overhead, that will be encountered in this program element or program.
mpegts_max_video_bitrate: The value indicates an upper bound of the video bitrate.
mpegts_max_audio_bitrates: The value indicates an upper bound of the bitrate for audio tracks, separated by commas for multiple audio streams. The maximum number of audio tracks supported is 40.
Supported values:
- Up to 1600000000 in the unit of bit per second
force_pat_pmt_key_off: If set to 1, it doesn’t force PAT/PMT on keyframes. The default value is 0.
force_pcr_key_off: If set to 1, it doesn’t force PCR on keyframes. The default value is 0.
Command Example:
Set PMT with maximum bitrate to 32 Mbps, maximum video bitrate to 16 Mbps, maximum audio bitrate of track 0 to 64000 bps, maximum audio bitrate of track 1 to 56000 bps, and maximum audio bitrate of track 2 to 48000 bps if source.ts contains 1 video stream and 3 audio streams.
ffmpeg -y -hide_banner -nostdin -vsync 0 -i source.ts -map 0:v -c:v copy -map 0:a:0 -c:a:0 copy -map 0:a:1 -c:a:1 copy -map 0:a:2 -c:a:2 copy -mpegts_max_bitrate 32000000 -mpegts_max_video_bitrate 16000000 -mpegts_max_audio_bitrates 64000,56000,48000 -f mpegts test.ts
Real time FPS monitoring parameter
ni_interval_fps:
Sets the window size in seconds. This means it defines how long the period should be for averaging the frame rate within a moving window.
When enabled by setting it with a positive integer, it calculates and reports the average frame rate over the specified window size in seconds. This allows the observation of frame rate averages within that specific period rather than from the start of the processing task.
If ni_interval_fps is set to 0 or a negative value, the feature is disabled. In this case, it defaults to reporting the average frame rate from the start of the process up to the current time.
This parameter is useful for monitoring and diagnosing performance in streaming and processing scenarios where real-time variations in frame rate over specified intervals need to be assessed.
Supported Values:
- Less than or equal to 0: Disable
- Positive integer: Enable
Default: 0
Command Example:
Set the window size to 5 seconds. This setting will calculate the average frame rate over every 5-second window, but FFmpeg may report the FPS more frequently.
ffmpeg -y -ni_interval_fps 5 -i source.ts -c:v h265_ni_quadra_enc test.mp4
During an FFmpeg process, the following line may be printed periodically, showcasing a FPS value:
"frame= 1173 fps=781.9 q=-0.0 size=N/A time=00:00:39.10 bitrate=N/A speed= 26x "