[Libav-user] FW: Hardware scaling with libavfilter

icy_flurry Icy_Flurry at protonmail.com
Mon Feb 14 04:23:19 EET 2022


Hi,

The input format is the VA-API format (ie AV_PIX_FMT_VAAPI), as I'm passing a hardware frame to the filter, though it is NV12 before I pass the frame to the decoder, if that's relevant.

Thanks
------- Original Message -------
On Sunday, February 13th, 2022 at 9:10 PM, Wang, Fei W <fei.w.wang-at-intel.com at ffmpeg.org> wrote:

> Hi,
>
> What's your input format? Maybe you can use ffmpeg cmdline to confirm it first, like:
>
> ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -v verbose -f rawvideo -pix_fmt nv12 -s:v 1280x720 -i input_NV12.yuv -vf 'hwupload,scale_vaapi=format=bgra,hwdownload,format=bgra' -f rawvideo -vsync passthrough -an -vframes 10 -y output_NV12_to_BGRA.yuv
>
> And more vaapi use case you can reference ffmpeg-vaapi wiki:
>
> https://trac.ffmpeg.org/wiki/Hardware/VAAPI
>
> Thanks
> Fei
>
>> From: Libav-user <libav-user-bounces at ffmpeg.org> On Behalf Of andr box
>> Sent: Monday, February 14, 2022 6:05 AM
>> To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. <libav-user at ffmpeg.org>
>> Subject: Re: [Libav-user] Hardware scaling with libavfilter
>>
>> ne 13. 2. 2022 v 22:55 odesílatel icy_flurry via Libav-user <libav-user at ffmpeg.org> napsal:
>>
>>> Hi,
>>>
>>> I'm trying to scale an image in hardware using VA-API with libavfilter. I also want to change the colorspace of the image to BGRA. However, the output frame I get is just a black image with a white line on top. How do I fix this? Let me know if more information is required.
>>>
>>> Code: https://pastecord.com/eqagejavum.cpp
>>>
>>> Thanks in advance
>>>
>>> _______________________________________________
>>> Libav-user mailing list
>>> Libav-user at ffmpeg.org
>>> https://ffmpeg.org/mailman/listinfo/libav-user
>>>
>>> To unsubscribe, visit link above, or email
>>> libav-user-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220214/2ffcf134/attachment.htm>


More information about the Libav-user mailing list