Opened 31 hours ago

#11298 new defect

AMD VAAPI HEVC encoding a 1080p video results in a 1920x1088 one

Reported by: lilydjwg Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

I'm trying to encode a 1080p video in hevc_vaapi with and AMD display card, but the resulting video has a 1920x1088 dimension (when played by mpv / ffplay).

How to reproduce:

I built ffmpeg from latest master (e35587250c3e036261ea9cfc266e74730b6f60ae) to reproduce the bug:

./configure --disable-debug --disable-static --enable-shared \
 --enable-gpl --disable-stripping --enable-libx265 --disable-x86asm

The command used is

LD_LIBRARY_PATH='libavcodec:libavdevice:libavfilter:libavformat:libavutil:libpostproc:libswresample:libswscale' \
  ./ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -i a.mkv \
  -acodec copy -vcodec hevc_vaapi -rc_mode CQP -qp 36 a.mp4

mpv outputs

● Video  --vid=1  (hevc 1920x1080 60 fps) [default]
● Audio  --aid=1  (aac 2ch 48000 Hz 160 kbps) [default]
Using hardware decoding (vaapi).
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu-next] 1920x1088 vaapi[nv12]
AV: 00:00:01 / 00:00:03 (43%) A-V:  0.000

Despite mpv / ffprobe / ffplay says the video stream is 1920x1080, it plays at 1920x1088.

Actually I was doing screen recording with obs-studio and got this bug since at least ffmpeg 7.0.1. There was a patch (https://patchwork.ffmpeg.org/project/ffmpeg/patch/20240321170219.1487-1-Primeadvice@gmail.com/) fixed this for 7.0.x but it no longer applies to 7.1.

I'm using an AMD Radeon RX 6650 XT display card and so my only options are HEVC and AVC.

This is not reproducible on Intel cards.

Attachments (1)

ffmpeg.log (313.1 KB ) - added by lilydjwg 31 hours ago.

Download all attachments as: .zip

Change History (1)

by lilydjwg, 31 hours ago

Attachment: ffmpeg.log added
Note: See TracTickets for help on using tickets.