Reading time: 6 – 10 minutes
Another title for this post could be: “Getting audio from video clips”. Because you could do it with MP4 (Mpeg4), WebM, Mov, FLV, etc. We are going to use ffmpeg to that:
ffmpeg -i input_file.webm -ab 128k -ar 44100 out_file.mp3
The meaning of the parameters:
- ab: the audio bitrate in bps
- ar: the audio sample rate in hz
And if you have a directory with a lot of files to convert you could use:
find . -name "*.webm" -print0 |while read -d
Pay attention to “find” and “while read” commands combinations because we want to support files with spaces.
I hope this is as useful for you as for me.
\0' file; do ffmpeg -i "$file" -ab 128k -ar 44100 -y "${file%.webm}.mp3";done
Pay attention to “find” and “while read” commands combinations because we want to support files with spaces.
I hope this is as useful for you as for me.
6 thoughts on “How to get MP3 file from a WebM video”
Nice tutorial
Wow, incredibly simple, yet so powerful. Thank you very much! This is amazing.
When I copy and paste a command-line sample, a trailer is added: “- See more at: http://oriolrius.cat/blog/2013/09/20/converting-webm-files-to-mp3/“. That’s very inconvenient, can you turn that off somehow?
Solved, try now.
Incredible, man. Thanks a lot.
May you need a YouTube to MP3 converter, as like AnyMusic.
Comments are closed.