Quantcast
Channel: Is it possible to create new mp4 file from a single streaming byte range chunk? - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Is it possible to create new mp4 file from a single streaming byte range chunk?

$
0
0

If I have a remote mp4 file on a server that supports Byte Ranges, is it possible to retrieve a single byte range and create a new/self-contained mp4 from that range data?

If I try and write a returned byte range data directly to an mp4 file using fs.createWriteStream(remoteFilename) it doesn't get the video meta data (duration, dimensions, etc) that it needs to be playable.

When I get a byte range that starts with 0 and ends with XX the output mp4 is playable, but will have the duration meta-data of the entire video length and will freeze the screen when the byte range is done for the remainder of the duration time.

How else can I take a byte range and create a stand-alone .mp4 file from that stream object?

The whole point of this is to avoid downloading the entire 10 minute file before I can make a 5 second clip using ffmpeg. If I can calculate and download the byte range, there should be a way to write it to a standalone mp4 file.

Thanks in advance for any help you can provide.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles



Latest Images