Replies: 1 comment 1 reply
-
This would not be possible with MP4v2 as of now. However, provided that the files are not in DASH format, which is not yet supported by MP4v2, it may be doable with some minor changes. Of course, the metadata must be stored at the beginning of the file for this to work, but that's probably the case for any file intended for streaming. You can then download the beginning of the file, containing the necessary metadata, and open that segment with Then you would have to read the file offsets and sizes of the samples you are interested in and download the corresponding section of the MP4 file. MP4v2's public API has the To create a file containing just the movie section of interest, you should create a new file using |
Beta Was this translation helpful? Give feedback.
-
When playing back mp4 videos served with progressive http in a browser, it is possible to seek to specific segments and only download that section of the video without getting the rest of the file.
My goal is to prefetch such segments so I can play them back instantly at a later time.
Due to the constraints of my project, they would need to be in the form of playable mp4 files. Eg. 30s segment starting at 15min of a 2h video.
The source videos are encoded with fast start and byte ranges can be fetched from a remote server.
Would it be possible to use mp4v2 to achieve that?
My assumption is that I would read a segment that contains the header. Find the byte range that corresponds to the timestamps. Fetch that segment of the file. Append that to the header. And modify the header to account for these changes.
Is mp4v2 the appropriate tool for the job?
If not, are there any alternatives?
Beta Was this translation helpful? Give feedback.
All reactions