Opened 5 months ago

Last modified 5 months ago

#6477 new enhancement

NVENC: Warn explicitly when specific bit rate is out of range

Reported by: alexpigment Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: nvenc, bitrate, failure
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the enhancement:

Give an informative error when the user specifies a bit rate that is out of the encoder's range. NVENC appears to cap out at 144Mbps for progressive encoding and 37.5Mbps for interlaced encoding.

Currently, there is a generic "InitializeEncoder? failed: invalid param (8)" message that is given. This can cause (and has caused, in my case) the user to waste a considerable amount of time trying to change various parameters in the command line when the actual failure is the result of an invisible bit rate ceiling (which is especially low for interlaced).

How to reproduce:

Progressive FAILURE:

% ffmpeg -f lavfi -i smptebars -c:v h264_nvenc -s 1920x1080 -aspect 16:9 -profile:v high -r 29.97 -t 5 -rc cbr_hq -b:v 144.1M 1080p.mp4

Progressive SUCCESS:

% ffmpeg -f lavfi -i smptebars -c:v h264_nvenc -s 1920x1080 -aspect 16:9 -profile:v high -r 29.97 -t 5 -rc cbr_hq -b:v 144M 1080p.mp4

Interlaced FAILURE:

% ffmpeg -f lavfi -i smptebars -c:v h264_nvenc -s 1920x1080 -aspect 16:9 -profile:v high -r 29.97 -t 5 -rc cbr_hq -flags ildct -b:v 37.6M 1080i.mp4

Interlaced SUCCESS:

% ffmpeg -f lavfi -i smptebars -c:v h264_nvenc -s 1920x1080 -aspect 16:9 -profile:v high -r 29.97 -t 5 -rc cbr_hq -flags ildct -b:v 37.6M 1080i.mp4

ffmpeg version N-86330-gbd1179e
built on 2017-06-01

Change History (2)

comment:1 Changed 5 months ago by alexpigment

There is a typo in the code under "Interlaced SUCCESS". The bitrate used should be -b:v 37.5M , otherwise it will fail in the same way as the Failure case above it.

comment:2 Changed 5 months ago by alexpigment

  • Keywords nvenc bitrate failure added
Note: See TracTickets for help on using tickets.