Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # BEST FILE SIZE + BEST QUALITY ffmpeg encoding with VAAPI / hardware acceleration
- # I got about 7x speed up + very low CPU usage
- # (so I'm able do other stuff while ffmpeg is busy doing the decoding/encoding)
- time ffmpeg -init_hw_device vaapi=foo:/dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device foo -i input.mp4 -filter_hw_device foo -vf 'format=nv12|vaapi,hwupload,fps=fps=25' -c:v h264_vaapi -compression_level 1 -c:a copy output.mp4
- # to find your vaapi device, type : ls /dev/dri/*
- # remove ",fps=fps=25" bit if you're not changing the fps rate
Add Comment
Please, Sign In to add comment