Evren Bingøl
Evren Bingøl

Reputation: 1725

Html5 MP4 file size unknown streaming. Best approach?

Is it possible to create mp4 file/container with out the size.

I am using media foundation to convert some file into h264/acc and wrap it around mp4. What happen is that as file finishes up the encoder adds the size of the file.

I need to start streaming as soon as the encoder starts encoding the data.

And client is going to do a progressive download.

Is this feasible. Of course I am using html5 So rtp/rtsp is out the question.

Or is Ogg/Theora a better way to do this ? Do we need to know the file size or can we just stream it ? I know each browser has different decoders.

Upvotes: 0

Views: 806

Answers (3)

mp4ie
mp4ie

Reputation: 21

Would it be possible to lie about the size in the mp4's headers?

Upvotes: 2

Rob
Rob

Reputation: 15158

I don't think I understand what you are doing but I stream mp4 and it works fine in modern browsers. Only IE9 struggles with it and won't play as you would expect. Ogg files work fine, too.

I've found that mp4 encoded with any converter works fine in any modern browser, too, but I needed to use handbrake to get them to work in IE9. Still haven't figured out why and no one at Microsoft knows either cause I've asked this question just about everywhere without response.

Upvotes: 0

av501
av501

Reputation: 6729

The issue here is that you will not be able to get a playable mp4 without the atom being completely written. [Exact size and location of all the chunks]. So the answer to your first question is no. You cannot do it with mp4. A transport stream is the best way to do it. I have not tried Ogg/theora so don't know about that but a ts can be streamed right away.

If you need a solution that works across all browsers it is a bit of a pain.

Upvotes: 1

Related Questions