You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an MP4 file that I'd like to attach C2PA metadata to. I'm trying to use Builder.sign_file to sign the video file (and importantly calculate the hash so I don't end up with a claim.hardBindings.missing error).
When I run Builder.sign_file on the mp4, I get the following error:
Error: asset could not be parsed: Bad BMFF
After some debugging, I see that this specific line is triggering the error:
If I log the unmapped error it is a Error: Bad file descriptor (os error 9). I've tried this on mp4s from many different sources and it's the same error.
Reproduction
I created a minimal test case that replicates the issue: schnerd@ebb0698
Note that the mp4 I added there is a test mp4 with no c2pa metadata (the existing mp4s in the fixtures directory already contain c2pa metadata, so didn't want to test with those)
Other notes
I initially tried Manifest.embed_from_memory, but that doesn't seem to generate hashes for mp4s, I think because get_object_locations_from_stream is not implemented for BmffIO. I'm now using Manifest.embed instead, which seems to work in the meantime. But it looks like Builder.sign_file is the direction that things are headed in the future so figured it's still worth opening an issue (but feel free to close if it's expected because it's an unstable api as of 0.32.0)
The text was updated successfully, but these errors were encountered:
Context
I have an MP4 file that I'd like to attach C2PA metadata to. I'm trying to use Builder.sign_file to sign the video file (and importantly calculate the hash so I don't end up with a
claim.hardBindings.missing
error).When I run Builder.sign_file on the mp4, I get the following error:
After some debugging, I see that this specific line is triggering the error:
c2pa-rs/sdk/src/asset_handlers/bmff_io.rs
Lines 945 to 946 in ca3df05
If I log the unmapped error it is a
Error: Bad file descriptor (os error 9)
. I've tried this on mp4s from many different sources and it's the same error.Reproduction
I created a minimal test case that replicates the issue: schnerd@ebb0698
Note that the mp4 I added there is a test mp4 with no c2pa metadata (the existing mp4s in the fixtures directory already contain c2pa metadata, so didn't want to test with those)
Other notes
I initially tried
Manifest.embed_from_memory
, but that doesn't seem to generate hashes for mp4s, I think because get_object_locations_from_stream is not implemented for BmffIO. I'm now usingManifest.embed
instead, which seems to work in the meantime. But it looks like Builder.sign_file is the direction that things are headed in the future so figured it's still worth opening an issue (but feel free to close if it's expected because it's an unstable api as of 0.32.0)The text was updated successfully, but these errors were encountered: