Last active
September 19, 2021 01:25
-
-
Save goliver79/8984731 to your computer and use it in GitHub Desktop.
[LINUX] Convert MP4 to MP3
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/bash | |
for f in *.mp4 | |
do | |
echo "Converting $f" | |
name=`echo "$f" | sed -e "s/.mp4$//g"` | |
ffmpeg -i "$f" -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 "$name.mp3" | |
done |
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
sudo apt-get install libavcodec-extra-53 | |
ffmpeg -i video.mp4 -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 audio.mp3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment