Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7268 closed defect (invalid)

ffmpeg-vaapi hevc vbr encode can not control the output bitrate

Reported by: focusluo Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -v verbose -f rawvideo -s:v 1920x1080 -i ./1080p_blue_sky.yuv -vf format=nv12,hwupload -c:v hevc_vaapi -g 12 -bf 0 -b:v 4M -quality 4 -y ./hevce_vbr_1920x1080_gop12_refdist0_bitrate4M.h265

My input is 4M bitrate, but the output is bitrate=3480.3kbits/s, which is out of the 10% range

some log of output:
[hevc_vaapi @ 0x5654f5b96240] Input 1920x1080 -> Surface 1920x1088 -> CTU 60x34.
Output #0, hevc, to './hevce_vbr_1920x1080_gop12_refdist0_bitrate4M.h265':

Metadata:

encoder : Lavf58.17.100
Stream #0:0: Video: hevc (hevc_vaapi) (Main), 1 reference frame, vaapi_vld, 1920x1080, q=2-31, 4000 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:

encoder : Lavc58.20.101 hevc_vaapi

No more output streams to write to, finishing.e=00:00:07.92 bitrate=3442.3kbits/s speed=3.12x
frame= 217 fps= 78 q=-0.0 Lsize= 3688kB time=00:00:08.68 bitrate=3480.3kbits/s speed=3.11x
video:3688kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
Input file #0 (/root/media_streamsencoderbitstreams1080p_blue_sky.yuv):

Input stream #0:0 (video): 217 packets read (674956800 bytes); 217 frames decoded;
Total: 217 packets (674956800 bytes) demuxed

Output file #0 (./hevce_vbr_1920x1080_gop12_refdist0_bitrate4M.h265):

Output stream #0:0 (video): 217 frames encoded; 217 packets muxed (3776077 bytes);
Total: 217 packets (3776077 bytes) muxed

Change History (5)

comment:1 by Carl Eugen Hoyos, 6 years ago

What is the 10% range?
Please provide the command line you tested together with the complete, uncut console output to make this a valid ticket.

Not necessarily related: It is not possible to reach any (high) bitrate for a given input.

comment:2 by Carl Eugen Hoyos, 6 years ago

I don't think there is a -quality option for hevc_vaapi.

comment:3 by Jun Zhao, 6 years ago

I think this is GPU driver issue, and I don't know why report this issue in FFmpeg trac. And this https://github.com/intel/media-driver/pull/187 fix the issue in iHD driver.

comment:4 by Jun Zhao, 6 years ago

Resolution: fixed
Status: newclosed

comment:5 by Carl Eugen Hoyos, 6 years ago

Resolution: fixedinvalid
Note: See TracTickets for help on using tickets.