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

Definition of tenc box seems invalid or too leniant #29

Closed
rlaphoenix opened this issue Apr 23, 2023 · 0 comments · Fixed by #30
Closed

Definition of tenc box seems invalid or too leniant #29

rlaphoenix opened this issue Apr 23, 2023 · 0 comments · Fixed by #30

Comments

@rlaphoenix
Copy link
Collaborator

rlaphoenix commented Apr 23, 2023

I've attached a sample tenc box from https://sho.com, specifically the show Yellowjackets S02E05 on the 2160p track.

image

It fails to parse with the following error:

Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python310\Scripts\mp4dump.exe\__main__.py", line 7, in <module>
  File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\pymp4\cli.py", line 26, in dump
    box = Box.parse_stream(fd)
  File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\construct\core.py", line 186, in parse_stream
    return self._parse(stream, context, "parsing")
  File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\pymp4\parser.py", line 46, in _parse
    obj = self.subcon._parse(stream2, context, path)
  File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\construct\core.py", line 855, in _parse
    subobj = list(sc._parse(stream, context, path).items())
  File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\construct\core.py", line 297, in _parse
    return self.subcon._parse(stream, context, path)
  File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\construct\core.py", line 1544, in _parse
    obj = self.cases.get(key, self.default)._parse(stream, context, path)
  File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\construct\core.py", line 859, in _parse
    subobj = sc._parse(stream, context, path)
  File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\construct\core.py", line 2700, in _parse
    raise e.__class__("%s\n    %s" % (e, path))
construct.core.ConstError: expected 0 but parsed 25
    parsing -> _reserved1

It's failing at the byte 0xD with the value 0x19 (25 decimal). This offset would be the _reserved1 definition.

tenc_box_from_showtime_exact.zip

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

Successfully merging a pull request may close this issue.

1 participant