我有一个包含多个音轨的.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)中打开它。在十六进制编辑器中观察它,它看起来像原始数据段(我想这是有意义的),但是我不能让mp4box把它放回我可以播放的.m4a中。
所以我想问题是谁有使用mp4box的经验?我可能在解压的时候遗漏了一些标志?或者mp4box只是产生了错误的结果?我希望有人能给我指出正确的方向。提前感谢!
发布于 2017-06-07 23:40:44
mp4box已将原始音频流提取到文件inputfile.mp4_track1.alac。
我可以看到两个原因为什么Windows Media Player不能播放它,而VLC可以:- WMP不支持原始流,并且只能播放封装/复用到文件容器中的音频流(例如:.MP4,.MKV,.AVI);和/或- WMP不支持本地的ALAC格式,并且你的机器上没有安装这个音频编解码器(试试FFDShow)。
https://stackoverflow.com/questions/34337545
复制相似问题