Skip to content

Instantly share code, notes, and snippets.

@danimo
Created September 30, 2018 13:21
Show Gist options
  • Select an option

  • Save danimo/b7c817876ae613500eabbe16486aa354 to your computer and use it in GitHub Desktop.

Select an option

Save danimo/b7c817876ae613500eabbe16486aa354 to your computer and use it in GitHub Desktop.
test -d web || mkdir web
infile="00000.ts"
outfile="web/00000.ts"
#outfile="web/00000.mp4"
/usr/bin/ffmpeg -y \
-init_hw_device vaapi=hw1:/dev/dri/renderD129 -hwaccel vaapi -hwaccel_output_format vaapi \
-hwaccel_device hw1 -i $infile -filter_hw_device hw1 \
-vf 'format=nv12|vaapi,hwupload,scale_vaapi=w=576:h=480:format=nv12' \
-map v:0 \
-c:v h264_vaapi -filter_complex "[0:1:a][0:2:a]amerge=inputs=2[aout]" \
-c:a aac -map "[aout]" $outfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment