-
Notifications
You must be signed in to change notification settings - Fork 79
Video Transcode
Nyanmisaka edited this page Dec 28, 2023
·
6 revisions
MPP supports most common video decoders, so it can be used with RGA filter and MPP encoder to form a zero-copy transcoding pipeline. This can maximize transcoding efficiency, and if the hardware supports it, AFBC can be automatically enabled to increase speed.
./ffmpeg -hwaccel rkmpp -hwaccel_output_format drm_prime -afbc rga -i /path/to/any_4k_10bit_hevc.mkv -c:a copy -strict -2 \
-vf scale_rkrga=w=1920:h=1080:format=nv12:afbc=1 -c:v h264_rkmpp -rc_mode VBR -b:v 6M -maxrate 6M \
-bufsize 12M -profile:v high -g:v 120 -y /path/to/1080p_h264_6M.mkv
This requires the --enable-libx264
configure option.
./ffmpeg -hwaccel rkmpp -hwaccel_output_format drm_prime -afbc rga -i /path/to/any_4k_10bit_hevc.mkv -c:a copy -strict -2 \
-vf scale_rkrga=w=1920:h=1080:format=nv12,hwmap=mode=read,format=nv12 -c:v libx264 -preset superfast -b:v 6M -maxrate 6M \
-bufsize 12M -profile:v high -g:v 120 -y /path/to/1080p_h264_6M.mkv
./ffmpeg -i /path/to/any_4k_10bit_hevc.mkv -c:a copy -strict -2 -vf scale=s=1920x1080:flags=fast_bilinear,format=yuv420p \
-c:v h264_rkmpp -rc_mode VBR -b:v 6M -maxrate 6M -profile:v high -g:v 120 -y /path/to/1080p_h264_6M.mkv