Opened 5 years ago

Closed 5 years ago

#7663 closed defect (fixed)

ffmpeg-qsv: it will overflow when set maxrate more than 65535 Kbps

Reported by: Wang zhanjun Owned by:
Priority: minor Component: avcodec
Version: unspecified Keywords: qsv
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffmpeg -init_hw_device qsv=qsv:hw -hwaccel qsv -filter_hw_device qsv -v verbose -f rawvideo -pix_fmt yuv420p -s:v 3840x2160 -r:v 25 -i /media_stream/assets/yuv/4k_2013_3840x2160_I420.yuv -vf 'format=nv12,hwupload=extra_hw_frames=64' -an -c:v h264_qsv -profile:v high -g 12 -bf 0 -slices 1 -b:v 70000k -maxrate 140000k -vframes 75 -refs 1 -preset 4 -y ./test.h264

System Environment
Platform: KBL
Arch: x86_64
Kernel: 4.18.0+
libva commit 566a1388b4e5961fb73d0fd03058d50c5965a7f4
media_driver commit 8968471978818839fed845ce918843a9ef3210c9
mediasdk commit 750cfb4776023fb5a9b2481c1bf1956ab5568651
ffmpeg: commit 1a6cca19898c5e65d0e3cb9b9b293146b8268dcc

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (7)

comment:1 by Carl Eugen Hoyos, 5 years ago

Component: undeterminedavcodec
Keywords: qsv added
Priority: normalminor
Status: newopen

While this is not the right bug tracker, I fear we have to clip the value.

Please understand that a valid ticket on this bug tracker needs a command line including the complete, uncut console output, not necessarily an analysis.

comment:3 by U. Artie Eoff, 5 years ago

MSDK provides mfxInfoMFX::BRCParamMultiplier for this reason. So it should be used to enable higher bitrates. We have the same issue in gst-msdk plugin, too, where a fix has already been proposed. FFmpeg-qsv will need similar fix.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/863

Last edited 5 years ago by U. Artie Eoff (previous) (diff)

comment:4 by Carl Eugen Hoyos, 5 years ago

They are joking, right?

comment:6 by Zhong,Li, 5 years ago

https://patchwork.ffmpeg.org/patch/11707/ has been sent to fix this issue.

comment:7 by Zhong,Li, 5 years ago

Resolution: fixed
Status: openclosed

Fixing patch has been merged as 87c165c2379a69a6261c439299cabbe4b77c4b3c.
Please be free to let know if still any issue.

Note: See TracTickets for help on using tickets.