-
-
Save yxy/b1fd18f84a925c6afc94577dcce9c70d to your computer and use it in GitHub Desktop.
extract AAC audio from flv, and convert aac to mp3 using ffmpeg
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
# using libfaac on Mac OS X 10.6.8 | |
# -vn : not copying video | |
# -acodec : specify codec used in flv file | |
# -ac : channels. 1 is for mono, 2 is for stereo | |
# -ab : specify bitrate for output file (note that rate is not kbps but bps) | |
# -ar : sampling frequency (Hz) | |
# -threads: number of threads for encoding | |
# "-strict experimental" is necessary to use libfaac | |
ffmpeg -y -i xxxxxxxxxxx.flv -vn -acodec aac -ac 2 -ab 128000 -ar 44100 -threads 4 -strict experimental xxxxx.m4a | |
# note that codec is 'libmp3lame' | |
ffmpeg -i xxxxxxxxxx.m4a -vn -acodec libmp3lame -ac 2 -ab 128 -ar 44100 -threads 4 -f mp3 zzzzzzzzzzz.mp3 | |
# or you can directly convert audio track | |
ffmpeg -i xxxxxxxxxxx.flv -vn -acodec libmp3lame -ac 2 -ab 128000 -ar 44100 -threads 4 -f mp3 xxxxx.mp3 | |
# for wav -acodec option is not necessary | |
ffmpeg -i xxxxxxxxxx.flv -vn -threads 4 -ac 1 -ar 44100 xxxxxx.wav | |
# for ogg | |
ffmpeg -i xxxxxxxxxx.flv -vn -threads 4 -acodec libvorbis -ac 2 -ar 44100 xxxxxxx.ogg | |
# simply extract audio without transcoding it. | |
ffmpeg -i xxxxxxxxxx -vn -threads 4 -acodec copy output.filename | |
# chop mp4 with/without transcoding | |
ffmpeg -ss <start.second> -i xxxxxx -t <duration.second> output.filename | |
ffmpeg -ss <start.second> -i xxxxxx -t <duration.second> -acodec copy -vcodec copy output.filename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment