ffmpeg hevc_vaapi adds black bar on the right of the video

Just have a drink and chat
postcd
Blank Cone
Blank Cone
Posts: 21
Joined: 18 Feb 2016 16:09

ffmpeg hevc_vaapi adds black bar on the right of the video

Postby postcd » 03 Apr 2021 16:45

Detail of the issue is here.

Here i tried to cure it by recoding using video filter defining video dimensions:

First, i have tried to discover the right wideo dimensions to be used in the ffmpeg video filter:
ffmpeg -ss 5 -i "$fileinput" -vframes 10 -vf cropdetect -f null - 2>&1 | awk '/crop/ {print $NF}' | awk -F= '{print $2}' | tail -1
Good, it discovered filter:v crop=704:400:8:0

and tried use these + vaapi (video hw acceleration api):
fileinput=abc.mp4;cropparams="704:400:8:0";ffmpeg -vaapi_device /dev/dri/renderD128 -i "$fileinput" -vf 'format=nv12,hwupload,crop="$cropparams"' -c:a copy "${fileinput%.*}".new."${fileinput#*.}"
but apparently it can not accept the filter or is unsupported:
Impossible to convert between the formats supported by the filter 'Parsed_crop_2' and the filter 'auto_scaler_1'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
Conversion failed!
ffmpeg n4.3.2

When i use only -vf 'format=nv12,hwupload' it works and produce the video with black bar on the right :-S (as seen under link in my first sentence)

Please do you have idea how to use HW acceleration on my AMD CPU/GPU and at same time produce hevc output without excessive black bar? H264 output is ok (no bars), as shown under the mentioned link.

If you need more detail, please kindly let me know which command to run. Thank you in advance.

postcd
Blank Cone
Blank Cone
Posts: 21
Joined: 18 Feb 2016 16:09

Re: ffmpeg hevc_vaapi adds black bar on the right of the video

Postby postcd » 15 Apr 2021 16:47

Maybe this issue will be fixed in mesa by this commit.

postcd
Blank Cone
Blank Cone
Posts: 21
Joined: 18 Feb 2016 16:09

Re: ffmpeg hevc_vaapi adds black bar on the right of the video

Postby postcd » 24 Oct 2021 19:37

This issue may be caused by VLC during playback, other players may play it without issue.


Return to “Coffee Corner”

Who is online

Users browsing this forum: No registered users and 56 guests