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

decode box \"s://\", size 1752462448 too big (max 345) #353

Closed
magicbic opened this issue May 21, 2024 · 5 comments
Closed

decode box \"s://\", size 1752462448 too big (max 345) #353

magicbic opened this issue May 21, 2024 · 5 comments

Comments

@magicbic
Copy link

magicbic commented May 21, 2024

I am facing a similar problem that is fixed on this issue #332

Parsed file with mp4dump from bento4

[ftyp] size=8+24
  major_brand = isom
  minor_version = 0
  compatible_brand = isom
  compatible_brand = M4A 
  compatible_brand = mp42
  compatible_brand = dash
[moov] size=8+1445
  [mvhd] size=12+96
    timescale = 90000
    duration = 0
    duration(ms) = 0
  [pssh] size=12+652
    system_id = [9a 04 f0 79 98 40 42 86 ab 92 e6 5b e0 88 5f 95]
    data_size = 632
  [pssh] size=12+77
    system_id = [ed ef 8b a9 79 d6 4a ce a3 c8 27 dc d5 1d 21 ed]
    data_size = 57
  [iods] size=12+9
    [InitialObjectDescriptor] size=2+7
      id = 1
      include inline profile level flag = 0
      OD profile level = ff
      scene profile level = ff
      audio profile level = ff
      visual profile level = fe
      graphics profile level = ff
  [mvex] size=8+48
    [mehd] size=12+4
      duration = 0
    [trex] size=12+20
      track id = 1
      default sample description index = 1
      default sample duration = 1
      default sample size = 1
      default sample flags = 0
  [trak] size=8+499
    [tkhd] size=12+80, flags=f
      enabled = 1
      id = 1
      duration = 0
      width = 0.000000
      height = 0.000000
    [mdia] size=8+399
      [mdhd] size=12+32, version=1
        timescale = 48000
        duration = 0
        duration(ms) = 0
        language = rum
      [hdlr] size=12+33
        handler_type = soun
        handler_name = SoundHandler
      [minf] size=8+302
        [smhd] size=12+4
          balance = 0
        [dinf] size=8+28
          [dref] size=12+16
            [url ] size=12+0, flags=1
              location = [local to file]
        [stbl] size=8+242
          [stsd] size=12+162
            entry_count = 1
            [enca] size=8+150
              data_reference_index = 1
              channel_count = 2
              sample_size = 16
              sample_rate = 48000
              [esds] size=12+30
                [ESDescriptor] size=2+28
                  es_id = 2
                  stream_priority = 0
                  [DecoderConfig] size=2+20
                    stream_type = 5
                    object_type = 64
                    up_stream = 0
                    buffer_size = 0
                    max_bitrate = 126035
                    avg_bitrate = 0
                    DecoderSpecificInfo = 11 90 56 e5 00 
                  [Descriptor:06] size=2+1
              [sinf] size=8+72
                [frma] size=8+4
                  original_format = mp4a
                [schm] size=12+8
                  scheme_type = cenc
                  scheme_version = 65536
                [schi] size=8+32
                  [tenc] size=12+20
                    default_isProtected = 1
                    default_Per_Sample_IV_Size = 8
                    default_KID = [7f 2c 16 b6 e5 71 41 d8 b9 06 1c 5d 7a 9b 4c b3]
          [stsc] size=12+4
            entry_count = 0
          [stco] size=12+4
            entry_count = 0
          [stts] size=12+4
            entry_count = 0
          [stsz] size=12+8
            sample_size = 0
            sample_count = 0

The complete error message is this:

decode moov: decode box trak: decode box mdia: decode box minf: decode box dinf: decode box dref: decode box \"s://\", size 1752462448 too big (max 345)

I am using the version 0.44.0

@magicbic
Copy link
Author

The full report with verbosity set to 3:

[ftyp] size=8+24
  major_brand = isom
  minor_version = 0
  compatible_brand = isom
  compatible_brand = M4A 
  compatible_brand = mp42
  compatible_brand = dash
[moov] size=8+1445
  [mvhd] size=12+96
    timescale = 90000
    duration = 0
    duration(ms) = 0
  [pssh] size=12+652
    system_id = [9a 04 f0 79 98 40 42 86 ab 92 e6 5b e0 88 5f 95]
    data_size = 632
    data = [78 02 00 00 01 00 01 00 6e 02 3c 00 57 00 52 00 4d 00 48 00 45 00 41 00 44 00 45 00 52 00 20 00 78 00 6d 00 6c 00 6e 00 73 00 3d 00 22 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 73 00 63 00 68 00 65 00 6d 00 61 00 73 00 2e 00 6d 00 69 00 63 00 72 00 6f 00 73 00 6f 00 66 00 74 00 2e 00 63 00 6f 00 6d 00 2f 00 44 00 52 00 4d 00 2f 00 32 00 30 00 30 00 37 00 2f 00 30 00 33 00 2f 00 50 00 6c 00 61 00 79 00 52 00 65 00 61 00 64 00 79 00 48 00 65 00 61 00 64 00 65 00 72 00 22 00 20 00 76 00 65 00 72 00 73 00 69 00 6f 00 6e 00 3d 00 22 00 34 00 2e 00 30 00 2e 00 30 00 2e 00 30 00 22 00 3e 00 3c 00 44 00 41 00 54 00 41 00 3e 00 3c 00 50 00 52 00 4f 00 54 00 45 00 43 00 54 00 49 00 4e 00 46 00 4f 00 3e 00 3c 00 4b 00 45 00 59 00 4c 00 45 00 4e 00 3e 00 31 00 36 00 3c 00 2f 00 4b 00 45 00 59 00 4c 00 45 00 4e 00 3e 00 3c 00 41 00 4c 00 47 00 49 00 44 00 3e 00 41 00 45 00 53 00 43 00 54 00 52 00 3c 00 2f 00 41 00 4c 00 47 00 49 00 44 00 3e 00 3c 00 2f 00 50 00 52 00 4f 00 54 00 45 00 43 00 54 00 49 00 4e 00 46 00 4f 00 3e 00 3c 00 4b 00 49 00 44 00 3e 00 74 00 68 00 59 00 73 00 66 00 33 00 48 00 6c 00 32 00 45 00 47 00 35 00 42 00 68 00 78 00 64 00 65 00 70 00 74 00 4d 00 73 00 77 00 3d 00 3d 00 3c 00 2f 00 4b 00 49 00 44 00 3e 00 3c 00 4c 00 41 00 5f 00 55 00 52 00 4c 00 3e 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00 69 00 64 00 78 00 2e 00 73 00 6f 00 6c 00 6f 00 63 00 6f 00 6f 00 2e 00 74 00 76 00 2f 00 69 00 64 00 78 00 2f 00 64 00 72 00 6d 00 2e 00 61 00 73 00 70 00 78 00 2f 00 70 00 72 00 2f 00 73 00 67 00 3c 00 2f 00 4c 00 41 00 5f 00 55 00 52 00 4c 00 3e 00 3c 00 43 00 48 00 45 00 43 00 4b 00 53 00 55 00 4d 00 3e 00 6f 00 30 00 72 00 4f 00 6e 00 47 00 57 00 79 00 63 00 63 00 51 00 3d 00 3c 00 2f 00 43 00 48 00 45 00 43 00 4b 00 53 00 55 00 4d 00 3e 00 3c 00 2f 00 44 00 41 00 54 00 41 00 3e 00 3c 00 2f 00 57 00 52 00 4d 00 48 00 45 00 41 00 44 00 45 00 52 00 3e 00]
  [pssh] size=12+77
    system_id = [ed ef 8b a9 79 d6 4a ce a3 c8 27 dc d5 1d 21 ed]
    data_size = 57
    data = [08 01 12 10 7f 2c 16 b6 e5 71 41 d8 b9 06 1c 5d 7a 9b 4c b3 1a 0b 73 74 72 65 61 6d 67 72 6f 75 70 22 10 b6 16 2c 7f 71 e5 d8 41 b9 06 1c 5d 7a 9b 4c b3 2a 02 53 44 32 00]
  [iods] size=12+9
    [InitialObjectDescriptor] size=2+7
      id = 1
      include inline profile level flag = 0
      OD profile level = ff
      scene profile level = ff
      audio profile level = ff
      visual profile level = fe
      graphics profile level = ff
  [mvex] size=8+48
    [mehd] size=12+4
      duration = 0
    [trex] size=12+20
      track id = 1
      default sample description index = 1
      default sample duration = 1
      default sample size = 1
      default sample flags = 0
  [trak] size=8+499
    [tkhd] size=12+80, flags=f
      enabled = 1
      id = 1
      duration = 0
      volume = 256
      layer = 0
      alternate_group = 0
      matrix_0 = 1.000000
      matrix_1 = 0.000000
      matrix_2 = 0.000000
      matrix_3 = 0.000000
      matrix_4 = 1.000000
      matrix_5 = 0.000000
      matrix_6 = 0.000000
      matrix_7 = 0.000000
      matrix_8 = 16384.000000
      width = 0.000000
      height = 0.000000
    [mdia] size=8+399
      [mdhd] size=12+32, version=1
        timescale = 48000
        duration = 0
        duration(ms) = 0
        language = rum
      [hdlr] size=12+33
        handler_type = soun
        handler_name = SoundHandler
      [minf] size=8+302
        [smhd] size=12+4
          balance = 0
        [dinf] size=8+28
          [dref] size=12+16
            [url ] size=12+0, flags=1
              location = [local to file]
        [stbl] size=8+242
          [stsd] size=12+162
            entry_count = 1
            [enca] size=8+150
              data_reference_index = 1
              channel_count = 2
              sample_size = 16
              sample_rate = 48000
              [esds] size=12+30
                [ESDescriptor] size=2+28
                  es_id = 2
                  stream_priority = 0
                  [DecoderConfig] size=2+20
                    stream_type = 5
                    object_type = 64
                    up_stream = 0
                    buffer_size = 0
                    max_bitrate = 126035
                    avg_bitrate = 0
                    DecoderSpecificInfo = 11 90 56 e5 00 
                  [Descriptor:06] size=2+1
              [sinf] size=8+72
                [frma] size=8+4
                  original_format = mp4a
                [schm] size=12+8
                  scheme_type = cenc
                  scheme_version = 65536
                [schi] size=8+32
                  [tenc] size=12+20
                    default_isProtected = 1
                    default_Per_Sample_IV_Size = 8
                    default_KID = [7f 2c 16 b6 e5 71 41 d8 b9 06 1c 5d 7a 9b 4c b3]
          [stsc] size=12+4
            entry_count = 0
            entries:
          [stco] size=12+4
            entry_count = 0
            entries:
          [stts] size=12+4
            entry_count = 0
            entries:
          [stsz] size=12+8
            sample_size = 0
            sample_count = 0
            entries:

@tobbee
Copy link
Collaborator

tobbee commented May 21, 2024

@magicbic It is impossible to see from the printout what the core issue is since it does not contain the raw bytes, but the error message decode box dref: decode box \"s://\", size 1752462448 too big (max 345) indicates some issue when decoding the dref box. According to your printout, there is a [url ] box inside. There may be something unusual about it.

Anyway, if you can provide the full file, I can have a look at what goes wrong.

@magicbic
Copy link
Author

magicbic commented May 21, 2024

@tobbee

I forgot to upload the file.

Here it is:

init.txt

@tobbee
Copy link
Collaborator

tobbee commented May 24, 2024

Thanks for the init segment. It is malformed in that the location string in the url box in the dref box does not end with a zero byte. It is also a bit strange in that it signals that it is self-contained, but still have a location. Anyway, I made the code more general so that it can handle such bad data, see PR #355

@magicbic
Copy link
Author

magicbic commented May 24, 2024

Amazing! Thank you for you quick reply and fixing the problem so fast.

I was playing around with the file and even tried to delete that child box inside dref but with no success. I reach the point where the decoded would report it read the file too far.

I will test this locally and let you know the results.

[EDIT]

Just tested it and it works wonders with plenty of different init.mp4 files.

@tobbee tobbee closed this as completed May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants