![]() ![]() ![]() REM Adjust FFMPEG_PATH variable value to match the path to your FFMPEG binary REM Usage: scriptname.cmd "full-quoted-path-to-input-file" The mp3 output file is created in the same folder as the input file. This approach was hinted at by the original questioner. Here is a batch-file solution which captures the input file bitrate and uses that as a parameter for the encoding command line. This should do the trick: sudo apt-get ffmpeg libavcodec-extra-53Īs LordNeckbeard states, using the same bitrate to encode in different formats isn't necessarily wise. ![]() you must install ffmpeg and the extra libav codec package or you're gonna have a bad time. Make sure you install the additional codec package or else it won't work, i.e. Hack it to make it do exactly as you wish or process multiple filetypes to your heart's content.ĮDIT: Just a quick note for anyone on Ubuntu/debian/etc. Just run it in the directory where you have the files like so: $bash script.sh flv # finally, convert to mp3 using proper bitrate # next line gets bitrate of audio from video using ffmpegīit=`ffmpeg -i "$' | cut -d' ' -f1` I can't claim the credit of the key piece of the code, as that goes to the gentleman that writes this blog. Here is a bash script that will take a file extension and extract audio from any file with that extension, and of course maintain the bitrate. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |