-
Notifications
You must be signed in to change notification settings - Fork 84
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
cmd/mp4ff-info: invalid moof size reported #307
Comments
Yes, mp4ff has some problem in parsing the The parsing of the |
I found a bug for this particular case of senc box encoding in the second phase of parsing it. The size issue should be fixed in PR #309. This looks like a file that tries to be compatible both with common encryption as used in DASH and with PIFF-encryption as used in SmoothStreaming (there is a PIFF "senc"-box embedded in the uuid-box coming after the senc box). I have some work ongoing on adding PIFF decryption support. I hadn't thought before that there was a case like this, where one can either decrypt using common-encryption information or PIFF information. For my curiosity, what tool was used to generate it? |
it comes from https://www.amcplus.com. I can provide an MPD if its helpful, but I think the media URLs have an https://github.com/Eyevinn/mp4ff/files/13778007/init.zip I did notice it says Bento4 Sound Handler in the |
I've fixed this now, but here is some more background. mp4ff-info is not a simple parser, but it creates an internal representation of the the mp4 file so that one can manipulate all internal boxes or add boxes. The size of the boxes are not stored, but instead always calculated from the the content of the box and child boxes. In this case, the media segment itself does not have a value for "perSampleIVSize", but is dependent on the init segment to get that. If you concatenate the init segment with the media segment (or run mp4ff-decrypt with the init segment), the library gets the information about the perSampleIVSize from the init segment so that it can build a proper representation of all the data in the senc box. To fix this in the general case, I am now deferring the perSampleIVSize from the information I've got in the media segment if no value is provided from the outside. I included the "moof" part of your asset in a test. |
confirmed fixed - thanks |
using this file (97 KB):
http://0x0.st/HgmH.m4f
I get this:
with another tool:
https://github.com/abema/go-mp4/tree/master/cmd/mp4tool
I get this:
what made me notice is that typically
trun.DataOffset
will bemoof.Size + 8
.The text was updated successfully, but these errors were encountered: