使用mp4box对来自.mp4的音轨进行解复用

时间:2015-12-17 14:54:11

标签: audio mp4 codec extraction m4a

我有一个包含多个音轨的.mp4文件。使用ALAC编解码器对音轨进行编码。我想用mp4box提取那些。

到目前为止我尝试提取音轨的是:

mp4box -single 1 "inputfile.mp4" -out "outputfile.m4a"

发生的情况是,它的工作原理是outputfile.m4a已创建,但带有标题/编解码器/文件信息的内容似乎格式不正确。我可以在VLC中打开并播放该文件,但无法使用Windows Media Player / Windows Media Foundation(我需要)打开它。所以要么我在提取过程中做错了,要么mp4box将文件放在一个奇怪的格式中。

mp4box -info -v "outputfile.mp4"的输出如下所示:



[iso file] Current top box start before parsing 0
[iso file] Read Box type ftyp size 20 start 0
[iso file] Current top box start before parsing 20
[iso file] Read Box type mdat size 8555577 start 20
[iso file] Current top box start before parsing 8555597
[iso file] Read Box type free size 75 start 8555597
[iso file] Current top box start before parsing 8555672
[iso file] Read Box type moov size 4895 start 8555672
[iso file] Read Box type mvhd size 108 start 8555680
[iso file] Read Box type trak size 4779 start 8555788
[iso file] Read Box type tkhd size 92 start 8555796
[iso file] Read Box type mdia size 4679 start 8555888
[iso file] Read Box type mdhd size 32 start 8555896
[iso file] Read Box type hdlr size 55 start 8555928
[iso file] Read Box type minf size 4584 start 8555983
[iso file] Read Box type smhd size 16 start 8555991
[iso file] Read Box type dinf size 36 start 8556007
[iso file] Read Box type dref size 28 start 8556015
[iso file] Read Box type url  size 12 start 8556031
[iso file] Read Box type stbl size 4524 start 8556043
[iso file] Read Box type stsd size 108 start 8556051
[iso file] Read Box type alac size 92 start 8556067
[iso file] Read Box type stts size 24 start 8556159
[iso file] Read Box type stsc size 40 start 8556183
[iso file] Read Box type stsz size 3936 start 8556223
[iso file] Read Box type stco size 408 start 8560159
[iso file] Read Box type alac size 36 start 28
[iso file] Read Box type btrt size 20 start 64
* Movie Info *
        Timescale 600 - 1 track
        Computed Duration 00:01:30.928 - Indicated Duration 00:01:30.928
        Fragmented File: no
        File Brand isom - version 1
        Created: GMT Thu Dec 17 14:35:48 2015
        Modified: GMT Thu Dec 17 14:35:48 2015

File has no MPEG4 IOD/OD

Track # 1 Info - TrackID 1 - TimeScale 44100
Media Duration 00:01:30.929 - Indicated Duration 00:01:30.929
Media Info: Language "und (und)" - Type "soun:alac" - 979 samples
Audio Track - Sample Rate 44100 - 2 channel(s)
[ISOM Tools] codec parameters not known - setting codecs string to default value "alac"
        RFC6381 Codec Parameters: alac
        All samples are sync




我还尝试使用-raw标志提取音轨,如下所示:

mp4box -raw 1 "inputfile.mp4"

它会创建一个inputfile.mp4_track1.alac文件,我无法在任何播放器中打开(甚至不是VLC)。在HEX编辑器中查看它看起来像原始数据段(我猜是有道理的),但是我无法将mp4box放回到我可以播放的.m4a中。

所以我想问题是有任何人使用mp4box吗?我可能在提取时错过了一些标志?或者mp4box只是产生了错误的结果?我希望有人可以指出我正确的方向。提前谢谢!

1 个答案:

答案 0 :(得分:0)

mp4box已将原始音频流解压缩到文件inputfile.mp4_track1.alac。

我可以看到Windows Media Player无法播放的两个原因,而VLC可以: - WMP不支持原始流,并且只能将封装/多路复用的音频流播放到文件容器中(例如:.MP4,.MKV,.AVI); 和/或 - WMP不支持本机ALAC格式,并且您没有在您的计算机上安装此音频编解码器(尝试使用FFDShow)。