Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mp4tool-dump crashes by specific files #50

Closed
2 tasks done
Tracked by #7
sunfish-shogi opened this issue Nov 8, 2020 · 1 comment
Closed
2 tasks done
Tracked by #7

mp4tool-dump crashes by specific files #50

sunfish-shogi opened this issue Nov 8, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@sunfish-shogi
Copy link
Contributor

sunfish-shogi commented Nov 8, 2020

$ mp4tool dump bunny.mp4 
[ftyp] Size=20 MajorBrand="qt  " MinorVersion=512 CompatibleBrands=[{CompatibleBrand="qt  "}]
[free] Size=42 Data=[...] (use "-full free" to show all)
[moov] Size=340232 
  [udta] Size=31 
    [(c)enc] (unsupported box type) Size=23 Data=[...] (use "-full (c)enc" to show all)
  [mvhd] Size=108 ... (use "-full mvhd" to show all)
  [trak] Size=115889 
    [tkhd] Size=92 ... (use "-full tkhd" to show all)
    [mdia] Size=115789 
      [mdhd] Size=32 Version=0 Flags=0x000000 CreationTimeV0=2082844800 ModificationTimeV0=2082844800 Timescale=24 DurationV0=14315 Pad=false Language="```" PreDefined=0
      [hdlr] Size=45 Version=0 Flags=0x000000 PreDefined=1835560050 HandlerType="vide" Name="VideoHandler"
      [minf] Size=115704 
        [hdlr] Size=44 Version=0 Flags=0x000000 PreDefined=1684565106 HandlerType="url " Name="DataHandler"
        [vmhd] Size=20 Version=0 Flags=0x000001 Graphicsmode=0 Opcolor=[0, 0, 0]
        [dinf] Size=36 
          [dref] Size=28 Version=0 Flags=0x000000 EntryCount=1
            [url ] Size=12 Version=0 Flags=0x000001
        [stbl] Size=115596 
          [stsd] Size=148 Version=0 Flags=0x000000 EntryCount=1
            [avc1] Size=132 ... (use "-full avc1" to show all)
              [avcC] Size=46 ... (use "-full avcC" to show all)
          [stts] Size=24 Version=0 Flags=0x000000 EntryCount=1 Entries=[{SampleCount=14315 SampleDelta=1}]
          [stss] Size=832 ... (use "-full stss" to show all)
          [stsc] Size=28 Version=0 Flags=0x000000 EntryCount=1 Entries=[{FirstChunk=1 SamplesPerChunk=1 SampleDescriptionIndex=1}]
          [stsz] Size=57280 ... (use "-full stsz" to show all)
          [stco] Size=57276 ... (use "-full stco" to show all)
  [trak] Size=224196 
    [tkhd] Size=92 ... (use "-full tkhd" to show all)
    [mdia] Size=224096 
      [mdhd] Size=32 Version=0 Flags=0x000000 CreationTimeV0=2082844800 ModificationTimeV0=2082844800 Timescale=48000 DurationV0=28628992 Pad=false Language="```" PreDefined=0
      [hdlr] Size=45 Version=0 Flags=0x000000 PreDefined=1835560050 HandlerType="soun" Name="SoundHandler"
      [minf] Size=224011 
        [hdlr] Size=44 Version=0 Flags=0x000000 PreDefined=1684565106 HandlerType="url " Name="DataHandler"
        [smhd] Size=16 Version=0 Flags=0x000000 Balance=0
        [dinf] Size=36 
          [dref] Size=28 Version=0 Flags=0x000000 EntryCount=1
            [url ] Size=12 Version=0 Flags=0x000001
        [stbl] Size=223907 
          [stsd] Size=147 Version=0 Flags=0x000000 EntryCount=1
            [mp4a] Size=131 DataReferenceIndex=1 EntryVersion=1 ChannelCount=2 SampleSize=16 PreDefined=65534 SampleRate=3145728000
Error: too large box size: type=0x00000000, size=1024, actualBufSize=95
$ mp4tool dump small.mp4 
[ftyp] Size=28 MajorBrand="mp42" MinorVersion=0 CompatibleBrands=[{CompatibleBrand="mp42"}, {CompatibleBrand="isom"}, {CompatibleBrand="avc1"}]
[free] Size=132 Data=[...] (use "-full free" to show all)
[mdat] Size=379880 Data=[...] (use "-full mdat" to show all)
[moov] Size=3459 
  [mvhd] Size=108 ... (use "-full mvhd" to show all)
  [iods] (unsupported box type) Size=24 Data=[...] (use "-full iods" to show all)
  [trak] Size=1546 
    [tkhd] Size=92 ... (use "-full tkhd" to show all)
    [mdia] Size=1446 
      [mdhd] Size=32 Version=0 Flags=0x000000 CreationTimeV0=3351965351 ModificationTimeV0=3351965352 Timescale=90000 DurationV0=498000 Pad=false Language="und" PreDefined=0
      [hdlr] Size=33 Version=0 Flags=0x000000 PreDefined=0 HandlerType="vide" Name=""
      [minf] Size=1373 
        [vmhd] Size=20 Version=0 Flags=0x000001 Graphicsmode=0 Opcolor=[0, 0, 0]
        [dinf] Size=36 
          [dref] Size=28 Version=0 Flags=0x000000 EntryCount=1
            [url ] Size=12 Version=0 Flags=0x000001
        [stbl] Size=1309 
          [stsd] Size=171 Version=0 Flags=0x000000 EntryCount=1
            [avc1] Size=155 ... (use "-full avc1" to show all)
              [avcC] Size=51 ... (use "-full avcC" to show all)
              [colr] Size=18 ColourType="nclc"
Error: too large box size: type=0x00010000, size=65537, actualBufSize=6
@sunfish-shogi sunfish-shogi added the bug Something isn't working label Nov 8, 2020
@sunfish-shogi sunfish-shogi self-assigned this Nov 8, 2020
@sunfish-shogi
Copy link
Contributor Author

sunfish-shogi commented Nov 8, 2020

http://docs.evostream.com/sample_content/assets/bunny.mp4

Offset

            [mp4a] Offset=116411 Size=131 DataReferenceIndex=1 EntryVersion=1 ChannelCount=2 SampleSize=16 PreDefined=65534 SampleRate=3145728000
Error: too large box size: type=0x00000000, size=1024, actualBufSize=95

116411 = 0x1c6bb
116411 + 131 = 116542 = 0x1c73e

Hexdump

Screen Shot 2020-11-08 at 18 00 18

What does the 16 bytes "00 00 04 00 ... 02" after the SampleRate mean???

Bento4

Screen Shot 2020-11-08 at 22 42 30

https://github.com/axiomatic-systems/Bento4/blob/v1.6.0-637/Source/C++/Core/Ap4SampleEntry.cpp#L487-L490

Probably, that 16 bytes data is old QuickTime format.
I think when the version of stsd is 0 and the entry_version of AudioSampleEntry is 1, the format would be used.

http://techslides.com/demos/sample-videos/small.mp4

Offset

              [colr] Offset=380578 Size=18 ColourType="nclc"
Error: too large box size: type=0x00010000, size=65537, actualBufSize=6

380578 = 0x5cea2
380578 + 18 = 380596 = 0x5ceb4

Hexdump

Screen Shot 2020-11-08 at 18 02 04

The ColourType of this colr box is "nclc".
But go-mp4 supports only "nclx", "rICC" and "prof".
So I think that go-mp4 should accept any ColourType using byte array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant