

hope it was helpful.Before getting into learning how to use all the amazing and powerful filters, let’s learn one more useful trick converting an entire directory. Thanks for checking our short tutorial on how to convert mp4/mkv/WebM media files to mp3 on Linux. If you do an ls in your ~/Music directory, you should see new folder added. You have learned how to easily convert mp4/mkv and WebM video files to mp3 on a Linux system using FFmpeg. 'Travis Greene - Intentional (Official Music Video).mp3' Conclusion 'No Longer Slaves (Official Lyric Video) - Jonathan David & Melissa Helser - W.mp3' 'Jonathan Nelson - I Believe (Island Medley) (LIVE)-vDLByAnQ93Q.mp3' 'Hosanna - From HOLY LAND in Jerusalem - Hillsong United-mqF1EhsBz0A.mp3' 'Hillsong United - '\''Oceans'\'' (Live show at Caesarea)-HVAR85rorvU.mp3' 'Broken Vessels (Amazing Grace) Hillsong UNITED from the Sea of Galilee-MlPuR-0XxiA.mp3' Press enter and wait for it to finish.Īfter a successful conversion, the resulting audio files will be saved under ~/Music directory with folder name being the name of the previous folder containing video files with the extension -mp3 at the end. Since I’m running the script inside the directory with Video files I’ll like to convert to mp3, I’ll go with option 1. Make the script executable: chmod +x mp3con.sh Step 3: Convert mp4/mkv/WebM media files to mp3 on Linux:Įxecute script, ( You can do it in the folder containing mp4 videos) # Create dir to store mp3 files if it doesn't existĮcho "$base_name" | xargs -d "\n" -I. You can as well copy below script snippet. Installation can also be done by manually compiling ffmpeg from source. Sudo yum install ffmpeg ffmpeg-devel lameĬentOS / RHEL 8: Install FFmpeg on CentOS / RHEL 8 Sudo dnf -y install ffmpeg ffmpeg-devel lameįor CentOS 7: sudo yum -y install epel-release Sudo dnf -y install $(rpm -E %fedora).noarch.rpm

For Arch Linux users, install Prerequisites ffmpeg and lame by:įor Ubuntu / Debian: sudo apt -y install ffmpeg lameįor Fedora: sudo dnf -y install $(rpm -E %fedora).noarch.rpm
