您的位置:首页 > 其它

extract audio track/stream from mp4

2014-05-03 18:56 246 查看
If we have known that the audio track in the mp4 file is .mp3, we can use the following commands to extract the .mp3 without any transcoding:

a) using ffmpeg:

ffmpeg -i input.mp4 -acodec copy output.mp3

b) using gpac/mp4box

mp4box -raw 2 input.mp4

(here, -raw 2 means the audio is the 2nd track in mp4, this parameter may vary in different cases, you should try to change this number if it doesn't work)

If you do not mind the audio to be transcoded, you can just use:

ffmpeg -i input.mp4 output.[formart]

here, [format] can be .mp3, .aac, .mp2, etc, any audio format that ffmpeg supports.

for more information about ffmpeg and gpac, visit [1][2].

[1] ffmpeg org, www.ffmpeg.org/

[2] gpac org, http://gpac.wp.mines-telecom.fr/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  GPAC ffmpeg