Created
January 15, 2023 19:05
-
-
Save dnutiu/3d9bfaddb9dd5eb47e16e198aed3570f to your computer and use it in GitHub Desktop.
Separate Audio from Video (with 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
filename=`echo "$1" | awk '{gsub(/.*[/]|[.].*/, "", $0)} 1'` | |
ffmpeg -i "./${filename}Temp.mp4" -i "./${filename}Temp.wav" -c:v copy -c:a aac "./${filename}Final.mp4" | |
rm "./${filename}Temp.m4a" | |
rm "./${filename}Temp.mp4" |
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
filename=`echo "$1" | awk '{gsub(/.*[/]|[.].*/, "", $0)} 1'` | |
ffmpeg -i "$1" -vn -c:a copy "${filename}Temp.m4a" | |
ffmpeg -i "$1" -an -c:v copy "${filename}Temp.mp4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment