Skip to content

Instantly share code, notes, and snippets.

@Enelar
Last active July 22, 2018 04:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Enelar/f5b76f32a230f03327dc65707a00cf0b to your computer and use it in GitHub Desktop.
Save Enelar/f5b76f32a230f03327dc65707a00cf0b to your computer and use it in GitHub Desktop.
ffmpeg compress crf20
ffmpeg -vaapi_device /dev/dri/renderD128 -i input.mp4 -vf 'format=nv12,hwupload' -c:v hevc_vaapi output.mkv
#make sure that hvec profile is listed in vaapi command output
ffmpeg -i * -c:v libx265 -crf 20 -c:a libopus -af "channelmap=channel_layout=5.1" -vbr on -b:a 256k *.1080p60.x265crf20.opus256vbr.mkv
ffmpeg -y -vaapi_device /dev/dri/renderD128 -i 1080.mp4 -filter_complex '[0:0] format=nv12,hwupload,scale_vaapi=w=1280:h=720:format=yuv420p,hwdownload [yuv]; [yuv] rotate=1 [rotated]; [rotated] format=yuv420p,format=nv12|vaapi,hwupload [out]' -map [out] -c:v h264_vaapi 1080.rotated.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment