Last active
January 20, 2023 08:26
Star
You must be signed in to star a gist
POSIX shell script to convert MKV file to MP4 using ffmpeg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eu | |
if [ $# = 0 ]; then | |
printf "usage: %s file [opts]\n" "$(basename "$0")" >&2 | |
exit 2 | |
fi | |
f=$1 | |
shift | |
if gpac -i "$f" inspect | grep -q DolbyVision; then | |
set -- -ab dby1 "$@" | |
fi | |
set -x | |
MP4Box -new -brand mp42 "$@" -add "$f" "${f%.*}.mp4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment