[FFmpeg-user] Encoding with vaapi: The same frame is outputted
Xiang, Haihao
haihao.xiang at intel.com
Thu Jul 27 03:54:27 EEST 2023
> I am attempting to encode video using VAAPI's hardware acceleration. I have
> managed to obtain NV12 format data and used the hwupload filter or
> av_hwframe_transfer_data API to upload them to the GPU. Finally, I obtained
> an H.264 format .mp4 file. However, the video appears to only have the
> first 3-4 frames from my input data, with the following frames being
> identical.
>
> My hardware setup consists of a Linux PC with an AMD Radeon graphics card,
> and vainfo reports no issues (I have tested ffmpeg command line output
> using VAAPI, and it works perfectly).
>
> My ffmpeg is configured with the following command line:
> ./configure --enable-shared --enable-libvpx --enable-libvorbis
> --enable-vaapi --enable-debug
>
> I have attached my source file and Makefile. Could you please help me
> identify what I am doing wrong?
You may refer to FFmpeg example below, it works fine in my side.
https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/vaapi_encode.c
Thanks
Haihao
More information about the ffmpeg-user
mailing list