Skip to content

Extracting specific sample range without reading whole mp4 file #410

Open
@hcglitte

Description

@hcglitte

Hi,

I am using FileReader() to read an mp4 file in chunks.
Initially I read enough of the start of the file to load the metadata in order for onReady(info) to be called.

After this I would like to only read a specific byte range of this mp4 source file which corresponds to a given set of samples.
I know the offsets and sizes for the samples, so I can read at the correct location with FileReader().

The problem seems to be that appendBuffer(arrayBuffer) needs to process the whole mp4 file from the start of the file to the end of the file. I am not sure if this assumption is correct?

Preferably I would like to read appendBuffer(arrayBuffer) with arrayBuffer.fileStart = offset at the starting point corresponding to my set of sampels. Then I would imagine that onSamples is called with the samples I have "requested".

Is there any way to achieve this? In this case, how can I do it?

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