Skip to content

Instantly share code, notes, and snippets.

@borisisok
Last active June 1, 2022 19:22
Show Gist options
  • Save borisisok/f9cd2ff36c755ca93eb0a01d121a08d7 to your computer and use it in GitHub Desktop.
Save borisisok/f9cd2ff36c755ca93eb0a01d121a08d7 to your computer and use it in GitHub Desktop.
Bash functions for movie processing
function ffmpeg_c112 { # create content for acer c112 pico beamer
m=$(dirname "$1")
n=$(basename "$1" | sed 's/mp4$//')
dir=/run/media/bgom/FCA7-F289/avi.c112
ffmpeg -i "${m}/${n}mp4" -c:v libx264 -profile:v baseline -c:a libmp3lame -b:a 128k -vf scale=720:406 -r 30 -pix_fmt yuv420p -ar 44100 "${dir}/${n}avi"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment