Skip to content

Question: onSegment and decryption of frames #444

Open
@menego

Description

@menego

Dear all, it is the first time that I have to deal with mp4 videos and demuxers. I am using as a starting point your test/index.html example that is proving very useful albeit quite complex for a newbie.
Specifically, I am doing a POC where I need to decrypt an MP4 file on the browser. The file that I am using is an encrypted MP4 downloaded from AWS KVS and it is non fragmented, so with ftyp, moov and mdat main boxes where each sample from the mdat box is encrypted.

I noticed though that using the segmentation capabilities of mp4box.js (onSegment) the file I am reading is transformed as if it was fragmented, is that true?
If so, should I worry that this may alter the data of the boxes (hence the decryption) or, since it is (most likely) using the original sample size as specified in the 'stsz' box and the chunk offset as specified in the 'stco' of the original file, it will have no problems?

Once again, sorry for my crude language but I am a total noob on the topic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions