nyanmisaka / ffmpeg-rockchip

FFmpeg with async and zero-copy Rockchip MPP & RGA support
Other
460 stars 62 forks source link

How to use scale_krga in C++ #93

Closed jinjie412 closed 2 months ago

jinjie412 commented 2 months ago

./ffmpeg -init_hw_device rkmpp=hw -filter_hw_device hw -f lavfi -i testsrc2=s=1920x1080,format=nv12 \ -vf hwupload,scale_rkrga=w=1280:h=720:format=nv12 -c:v h264_rkmpp -b:v 4M -maxrate 4M -vframes 1000 -y /tmp/tmp.mp4

How to implement this feature using C++,

nyanmisaka commented 2 months ago

This is not an easy task so I can't provide an example. You can refer to this and write your own.

https://github.com/search?q=avfilter_get_by_name%28%22scale_vaapi%22%29+avfilter_get_by_name%28%22scale_cuda%22%29&type=code