0
我遇到了將M4A原子插入文件的問題。由於原始文件沒有udta結構,因此我使用現有的M4A文件添加它作爲指南。M4A標記問題
這裏就是我所做的添加原子:
- 內建內存
- 更新MOOV原子大小的UDTA原子包括對UDTA原子
- 將文件複製起來的大小到第一個trak原子的末端
- 插入我的udta原子
- 照常複製剩下的部分。
原始文件和標記文件之間唯一真正的區別是mdat原子已經向下移動一點以適應標記。這使我相信在其他原子中有一些提及這個位置的信息,但我找不到一個。
下面是AtomicParsley輸出:
原始文件:
Atom ftyp @ 0 of size: 36, ends @ 36
Atom moov @ 36 of size: 30156, ends @ 30192
Atom mvhd @ 44 of size: 108, ends @ 152
Atom iods @ 152 of size: 33, ends @ 185
Atom trak @ 185 of size: 30007, ends @ 30192
Atom tkhd @ 193 of size: 92, ends @ 285
Atom mdia @ 285 of size: 29907, ends @ 30192
Atom mdhd @ 293 of size: 32, ends @ 325
Atom hdlr @ 325 of size: 37, ends @ 362
Atom minf @ 362 of size: 29830, ends @ 30192
Atom smhd @ 370 of size: 16, ends @ 386
Atom dinf @ 386 of size: 36, ends @ 422
Atom dref @ 394 of size: 28, ends @ 422
Atom stbl @ 422 of size: 29770, ends @ 30192
Atom stts @ 430 of size: 24, ends @ 454
Atom stsd @ 454 of size: 106, ends @ 560
Atom mp4a @ 470 of size: 90, ends @ 560
Atom esds @ 506 of size: 54, ends @ 560
Atom stsz @ 560 of size: 26888, ends @ 27448
Atom stsc @ 27448 of size: 40, ends @ 27488
Atom stco @ 27488 of size: 2704, ends @ 30192
Atom mdat @ 30192 of size: 2495503, ends @ 2525695
修改文件:
Atom ftyp @ 0 of size: 36, ends @ 36
Atom moov @ 36 of size: 30323, ends @ 30359
Atom mvhd @ 44 of size: 108, ends @ 152
Atom iods @ 152 of size: 33, ends @ 185
Atom trak @ 185 of size: 30007, ends @ 30192
Atom tkhd @ 193 of size: 92, ends @ 285
Atom mdia @ 285 of size: 29907, ends @ 30192
Atom mdhd @ 293 of size: 32, ends @ 325
Atom hdlr @ 325 of size: 37, ends @ 362
Atom minf @ 362 of size: 29830, ends @ 30192
Atom smhd @ 370 of size: 16, ends @ 386
Atom dinf @ 386 of size: 36, ends @ 422
Atom dref @ 394 of size: 28, ends @ 422
Atom stbl @ 422 of size: 29770, ends @ 30192
Atom stts @ 430 of size: 24, ends @ 454
Atom stsd @ 454 of size: 106, ends @ 560
Atom mp4a @ 470 of size: 90, ends @ 560
Atom esds @ 506 of size: 54, ends @ 560
Atom stsz @ 560 of size: 26888, ends @ 27448
Atom stsc @ 27448 of size: 40, ends @ 27488
Atom stco @ 27488 of size: 2704, ends @ 30192
Atom udta @ 30192 of size: 167, ends @ 30359
Atom meta @ 30200 of size: 159, ends @ 30359
Atom ilst @ 30212 of size: 147, ends @ 30359
Atom ©ART @ 30220 of size: 35, ends @ 30255
Atom data @ 30228 of size: 27, ends @ 30255
Atom ©nam @ 30255 of size: 63, ends @ 30318
Atom data @ 30263 of size: 55, ends @ 30318
Atom ©alb @ 30318 of size: 41, ends @ 30359
Atom data @ 30326 of size: 33, ends @ 30359
Atom mdat @ 30359 of size: 2495503, ends @ 2525862
另一個值得注意的事情是,標記的文件我用作爲參考在udta-> meta下有一個hdlr原子,但添加該標籤的副本也沒有幫助。如果我手動刪除udta原子和moov的大小數據,該文件再次工作。
當我嘗試打標記的文件,我在不同的程序得到這些錯誤:
mplayer:
[aac @ 0x204d720] channel element 0.0 is not allocated
[aac @ 0x204d720] channel element 0.0 is not allocated
[aac @ 0x204d720] channel element 3.13 is not allocated
[aac @ 0x204d720] channel element 2.14 is not allocated
[aac @ 0x204d720] channel element 2.9 is not allocated
[aac @ 0x204d720] Prediction is not allowed in AAC-LC.
[aac @ 0x204d720] channel element 3.1 is not allocated
[aac @ 0x204d720] channel element 0.3 is not allocated
....
totem:
** Message: Error: Could not decode stream.
gstfaad.c(1319): gst_faad_chain(): /GstPlayBin2:play/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstFaad:faad0:
decoding error: Bitstream value not allowed by specification
banshee:
[Error 08:26:27.610] GStreamer stream error: Decode
[Error 08:26:27.960] GStreamer stream error: Decode
[Error 08:26:28.252] GStreamer resource error: NotFound
哦,我多麼希望的認可上比MP3的其他文件的ID3標籤計劃其他99%...
是的,這就像一個魅力工作! – 2012-03-13 03:38:58