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

[MP4Box] Feature request: support for Motion JPEG 2000 specific boxes #2919

Closed
boxerab opened this issue Jul 20, 2024 · 8 comments · Fixed by #2948
Closed

[MP4Box] Feature request: support for Motion JPEG 2000 specific boxes #2919

boxerab opened this issue Jul 20, 2024 · 8 comments · Fixed by #2948

Comments

@boxerab
Copy link

boxerab commented Jul 20, 2024

Thank you for this excellent MP4 toolkit. I am interested in dumping boxes for motion jpeg 2000 files.
MP4Box can parse almost all boxes, except for a handful :

[iso file] Unknown top-level box type jP  
[iso file] Unknown box type jp2p in parent mjp2
[iso file] Unknown box type jsub in parent mjp2
[iso file] Unknown box type orfo in parent mjp2

The boxes do appear in the xml, but the contents are not interpreted correctly.

<UnknownBox Size="20" Type="jp2p" Specification="unknown" Container="unknown" data="0x000000006A7032204A325030" >
</UnknownBox>
<UnknownBox Size="12" Type="jsub" Specification="unknown" Container="unknown" data="0x02020000" >
</UnknownBox>
<UnknownBox Size="10" Type="orfo" Specification="unknown" Container="unknown" data="0x0100" >

jP is the signature box
jp2p is the profile box
jsub is the subsampling box
orfo is the original format box

Adding link to final draft of MJ2 spec

@boxerab boxerab changed the title Feature request: support Motion JPEG 2000 specific boxes Feature request: MP4Box support Motion JPEG 2000 specific boxes Jul 20, 2024
@boxerab boxerab changed the title Feature request: MP4Box support Motion JPEG 2000 specific boxes Feature request: MP4Box support for Motion JPEG 2000 specific boxes Jul 20, 2024
@rbouqueau
Copy link
Member

Thank you! By any chance would you have some sample files to share with us?

@boxerab
Copy link
Author

boxerab commented Jul 21, 2024

My pleasure! Here is a sample file

Speedway.zip

@boxerab boxerab changed the title Feature request: MP4Box support for Motion JPEG 2000 specific boxes [MP4Box] Feature request: support for Motion JPEG 2000 specific boxes Jul 21, 2024
@boxerab
Copy link
Author

boxerab commented Jul 21, 2024

I notice that orfo box is not mentioned in the final draft. This box contains two bytes -

  • first byte stores field count i.e. progressive (1) or interlaced (2)
  • second byte stores field order: TFF (1) or BFF (6), and only relevant for interlaced

@DenizUgur
Copy link
Contributor

DenizUgur commented Sep 3, 2024

I see conflicting information on orfo. It's not clear if the files are signed or not. Do we have access to the latest specification? It shouldn't matter if values are that small but just for completeness sake.

@boxerab
Copy link
Author

boxerab commented Sep 3, 2024

Thanks, @DenizUgur . Unfortunately I don't have enough Swiss francs to purchase the latest spec. Let me do some more digging on that issue.

@DenizUgur
Copy link
Contributor

DenizUgur commented Sep 3, 2024

While you are at it, I see that signature box should be jP2 and don't see anything about jP . Is that an alternative?

@boxerab
Copy link
Author

boxerab commented Sep 4, 2024

@DenizUgur, I have looked at MJ2 implementations, and this is what I found for orfo box.

  uint8_t or_fieldcount_;
  uint8_t or_fieldorder_;

Also, jp is the signature box, while jp2 is the "brand" of the file

@boxerab
Copy link
Author

boxerab commented Sep 4, 2024

Thanks @rbouqueau @DenizUgur @jeanlf !! Looking forward to trying this with nightly build.

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.

3 participants