Skip to content

Instantly share code, notes, and snippets.

@yondonfu
Last active April 6, 2021 02:07
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 yondonfu/475b8cc039e009fd59c61fa97cff748e to your computer and use it in GitHub Desktop.
Save yondonfu/475b8cc039e009fd59c61fa97cff748e to your computer and use it in GitHub Desktop.
#!/bin/bash
cards=('/dev/dri/renderD128' '/dev/dri/renderD128')
profs=('720' '480' '360' '240' '144')
# Example
card ='/dev/dri/renderD128'
prof='720'
ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device $card -i input.mp4 -filter:v "scale_vaapi=w=-2:h=${prof}:format=nv12" -c:v h264_vaapi -c:a copy -profile:v high output${i}_${prof}.mp4 &> out${i}_${prof}.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment