Created
August 19, 2019 13:43
-
-
Save obeninteractive/9b7757150553b07c95b2e6c85b71db32 to your computer and use it in GitHub Desktop.
Convert mp4 into mp3 using command line
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
ffmpeg -i file.mp4 -vn \ | |
-acodec libmp3lame -ac 2 -ab 160k -ar 48000 \ | |
file.mp3 |
small script for converting mp4 to mp3
put this script inside mp4tomp3.sh
------------- mp4tomp3.sh : start ------------------
#!/bin/bash
for i in *.mp4; do
ffmpeg -i "$i" -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 ./audio/"basename "$i" .mp4
.mp3"
done
------------- mp4tomp3.sh : end ------------------
then, do :
chmod +x mp4tomp3.sh
sh mp4tomp3.sh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ffmpeg -i file.ts -vn
-acodec libmp3lame -ac 2 -ab 160k -ar 48000
file.mp3