Skip to content

Instantly share code, notes, and snippets.

@juzam
Created August 19, 2020 10:38
Show Gist options
  • Save juzam/acd8d0a0f17ad534ccbdb0b1cbbcae30 to your computer and use it in GitHub Desktop.
Save juzam/acd8d0a0f17ad534ccbdb0b1cbbcae30 to your computer and use it in GitHub Desktop.
ffmpeg wrapper to transcode audio to aac format (copying video track)
#!/bin/bash
set -x
FULLFILE=$@
EXTENSION=${FULLFILE##*.}
EXTENSIONLESS_FILE=$(basename -s .$EXTENSION $FULLFILE )
ffmpeg -i "$FULLFILE" -f matroska -vcodec copy -acodec aac -ac 2 -strict -2 -map 0 -map -0:s "$EXTENSIONLESS_FILE-converted.mkv"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment