Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # RESIZE / SCALE 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)
- # need this installed first
- apt-get install intel-media-va-driver-non-free
- # if you keep getting the following error - that means you need to execute that command above:
- # Failed to create processing pipeline config: 12 (the requested VAProfile is not supported)
- # let's go
- time ffmpeg -init_hw_device vaapi=foo:/dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device foo -i INPUT-720p.mp4 -filter_hw_device foo -vf 'format=nv12|vaapi,hwupload,scale_vaapi=iw/2:ih/2:mode=hq,fps=fps=25' -c:v h264_vaapi -compression_level 1 -y -c:a copy OUTPUT-360p.mp4
- # to find your vaapi device, type : ls /dev/dri/*
- # see list of standard resolutions here : https://levvvel.com/169-resolutions/
- # remove ",fps=fps=25" bit if you're not changing the fps rate
Add Comment
Please, Sign In to add comment