[FFmpeg-devel] Specifying crop parameters while encoding using vaapi

Satyajit Sahu sjsahu at gmail.com
Mon Jul 27 02:55:16 EEST 2020


Hi,



I am facing issue with cropping parameters while transcoding. The cropping
parameters are ignored if both the way vaapi hw acceleration is used (for
decoding and encoding). But if sw decoding is used the cropping parameters
are working fine.



For below command cropping parameters are ignored.

ffmpeg -y -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device
/dev/dri/renderD128 -i 480p.mkv -vf "fps=23.976,crop=640:400:0:139" -bf 0
-c:v h264_vaapi -b:v 6706k -pass 1 -an -f mp4 test.mp4



Warning message : “[h264_vaapi @ 0x5617a44844c0] Cropping information on
input frames ignored due to lack of API support."



But when sw decoding is used cropping works properly

ffmpeg -vaapi_device /dev/dri/renderD128 -i 480p.mkv -vf
'format=nv12,fps=23.97,crop=640:400:0:139,hwupload' -c:v h264_vaapi test.mp4



Also able to encode with cropping parameters from raw yuv file using vaapi
hw encode.

Is this some limitation from ffmpeg or the command is not proper?



Regards,

Satyajit


More information about the ffmpeg-devel mailing list