Hacker News new | past | comments | ask | show | jobs | submit login

You can absolutely do that with the MP4 container format - I have. For the most part, browsers ignore the header information.

MP4 was used for streaming long before WebM existed, and before HLS was established.




Not really. The browser need to read the header to know where the video frames are in the file.

The table with pointers to all the frames cannot be made before all the frames are encoded and their size is known. Then you can shuffle the file and move the table to the start (known as faststarting), and in that case you can start viewing the video before it is completely downloaded.

This can't be used for live content, since the encoded frames does not exist at the time you start viewing in that case.


Does it have to know the information for all frames, or just the key frames? If it’s the later, then you could encode so the initial table, has X key frames spread out over a few hours, then force a frame to exist in those locations when encoding the live stream.


You cannot use MP4 for live streaming. The file cannot be demuxed properly if the moov soon is incomplete. Frames cannot be located, it is impossible to decode it in the end. With live streaming, you don't ever have the full file until the end of the event, which is why you cannot stream it. Video streaming with a complete file is possible of course, but that is nothing special nor related to this discussion.


You only need:

    moov [moof mdat]+
This allows you to build a never-ending fragmented mp4. This isn't a new technique. It's been around and used for livestreaming for years.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: