Reputation: 597
I have an .mp4 file that contains multiple audio tracks. The audio tracks are encoded using the ALAC codec. I want to extract those using mp4box.
What I've tryed so far for extracting a track is this:
mp4box -single 1 "inputfile.mp4" -out "outputfile.m4a"
What happens is, it works as that a outputfile.m4a
is created, but something with the header/codec/file info seems to be malformated. I can open and play the file in VLC, but it fails to open with Windows Media Player/Windows Media Foundation (which I need). So either I am doing something wrong during the extraction or mp4box puts the file in a weird format.
The output of mp4box -info -v "outputfile.mp4"
looks like this:
[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
I also tryed extracting the audio tracks using the -raw
flag like this:
mp4box -raw 1 "inputfile.mp4"
It creates a inputfile.mp4_track1.alac
file, which I can't open in any player (not even VLC). Looking at it in a HEX editor it looks like the raw data segment (which makes sense I guess), but I can't get mp4box to put it back into a .m4a which I can play.
So I guess the question is has anybody experience with mp4box? Am I maybe missing some flag while extracting? Or is mp4box simply producing wrong results? I hope somebody can point me in the right direction. Thanks in advance!
Upvotes: 1
Views: 3723
Reputation: 1
mp4box has extracted the raw audio stream to the file inputfile.mp4_track1.alac.
I can see two reasons why Windows Media Player cannot play it whereas VLC does : - WMP does not support raw stream and and can only play audio stream encapsulated/muxed into a file container (e.g. : .MP4, .MKV, .AVI) ; and/or - WMP does not support natively ALAC format and you don't have this audio codec installed on your machine (try FFDShow).
Upvotes: 0