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/
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/
相关文章推荐
- HARK学习(五)--AudioStreamFromMic
- Extract audio from video file.
- HARK学习(六)--AudioStreamFromWave
- could not create audio stream from input stream JAVA添加背景音乐
- Android Audio代码分析13 - AudioTrack::getPosition函数
- Android音频系统之AudioTrack(二)
- java.io.IOException: Attempted read from closed stream
- Find Median from Data Stream 295
- vs2012打包部署时“cannot extract icon with index 0 from file xxx.exe”的解决方案
- A Fast Method to Stream Data from Big Data Sources
- Android Audio System 之一:AudioTrack如何与AudioFlinger交换音频数据
- Android音频系统之AudioTrack(一)
- Android AudioRecord和AudioTrack介绍
- Android Audio System之一:AudioTrack如何与AudioFlinger交换音频数据
- Using DirectSound to Play Audio Stream Data
- NDK Suerface AudioTrack
- The Easy Way to Extract Useful Text from Arbitrary HTML
- 295. Find Median from Data Stream
- 深入剖析Android音频之AudioTrack
- Android Audio System 之一:AudioTrack如何与AudioFlinger交换音频数据