If then help "Error: '$1.mp4' not found" fi If then help "Error: no media file name specified" fi Here is a bash script I wrote to do that: #!/bin/bashĮcho "$(basename $0) - Extract audio stream from an mp4 file and save as 32-bit wav The accepted answer creates an mp4 file, I wanted a 32-bit wav file, so I could work on it further in Pro Tools. One could get more options for both input and output by trying from the list obtained from command line on the terminal $ ffmpeg -help Wav and flac files are larger than the mp4 fileĪc3 conversion works with -acodec 3F2R/LFE -ac 6 but creats 4 dummy tracks, as checked in Audacity.įor mp3 conversion, simply use ffmpeg -i input.mp4 -vn -acodec mp3 -ab 320k -ar 44100 -ac 2 output.mp3 For 16 bit sampling it should be ffmpeg -i input.mp4 -acodec flac -bits_per_raw_sample 16 -ar 44100 output.flac ffmpeg -i input.mp4 -vn -acodec pcm_s16le -ar 44100 -ac 2 output.wav To remove the video ( -vn) and take audio out uncompressed ( output.wav) at a sample rate of 44100 Hz ( -ar 44100) in pulse code modulated with signed, 16 bit, little endian ( -acodec pcm_s16le) samples and 2 channels (stereo) ( -ac 2) use the following command. > Stream 1 (Audio/ Codec/ Channel/ Sample rate)Ĭonsider an input file ( -i), such as, input.mp4 or other files- flv, avi. > Stream 0 (Video/ Codec/ Resolution/ Frame rate) Extracting Lossless/ Lossy Audio from Videos ( flv / mp4 to wav / flac / mp3) Using ffmpegversion 2.3.1 in Ubuntu 14.04įirst of all find the basic data from the source.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |