Convert OBS *.mkv files to *.mp4 for Canvas #!/usr/bin/env bash # 1. Save script as mkv2mp4.sh # 2. chown +x mkv2mp4.sh # 3. Use to convert default OBS *.mkv files to *.mp4 files that work with Canvas LMS usage() { cat <<EOF PURPOSE: Convert mkv files from obs into mp4 for Canvas. USAGE: $0 <arguments> ARGUMENTS: [-i] Name of input *.mkv file EXAMPLE: ./mkv2mp4.sh -i intro.mkv EOF } while getopts "hi:" opt; do case $opt in h) usage exit 1 ;; i) i=$OPTARG ;; \?) usage exit 1 ;; esac done # set output file name o="${i%%.*}".mp4 # code ffmpeg -nostats -loglevel 0 -i $i -c copy -map 0 $o