Created
January 28, 2022 16:40
-
-
Save ThomasDalla/5f9d941534bbeb614c16473c989f11ba to your computer and use it in GitHub Desktop.
Convert the audio of a single video into AAC, retaining original audio as well
This file contains hidden or 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 | |
# Example: ~/tvshow.sh file-without-extention mkv mp4 | |
input="$1.$2" | |
output="$1.$3" | |
echo "$input --> $output" | |
if [ -f "$input" ]; | |
then | |
ffmpeg -hide_banner -i "$input" -map 0:v -c:v copy -map 0:a -c:a copy -map 0:a:0 -c:a:0 aac -map 0:s -c:s mov_text -map_metadata 0 -movflags +faststart "$output" && \ | |
rm "$input" | |
else | |
echo "$input does not exist" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment