Ffmpeg
Содержание
FFMPEG
Заметки
Работа с amdgpu
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i input.mp4 -c:v hevc_vaapi -b:v 0.589M output.mp4
Перекодировать mpeg в mkv
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -f mpeg -i video.mpeg -c:v hevc_vaapi -c:a aac video.mkv
Транскодинг в несколько файлов разного качества
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i video.mkv -c:v hevc_vaapi -c:a aac -b:v 256k -b:a 64k -zerolatency 1 -f mpegts low.ts -c:v hevc_vaapi -c:a aac -b:v 768k -b:a 128k -zerolatency 1 -f mid.ts -c:v hevc_vaapi -c:a aac -b:v 1024k -b:a 128k -zerolatency 1 -f mpegts high.ts -c:v hevc_vaapi -c:a aac -b:v 1920k -b:a 128k -zerolatency 1 -f mpegts hd720.ts -c copy -f mpegts src.ts
Транскодинг на cuda + nvenc
ffmpeg -async 1 -vsync -1 -hwaccel_output_format cuda -hwaccel cuvid -c:v h264_cuvid -i input_file.mp4 -c:v h264_nvenc -c:a aac -b:v 256k -b:a 64k -zerolatency 1 -f mpegts low.ts -c:v h264_nvenc -c:a aac -b:v 768k -b:a 128k -zerolatency 1 -f mpegts mid.ts -c:v h264_nvenc -c:a aac -b:v 1024k -b:a 128k -zerolatency 1 -f mpegts high.ts -c:v h264_nvenc -c:a aac -b:v 1920k -b:a 128k -zerolatency 1 -f mpegts hd720.ts -c copy -f mpegts src.ts;