views:

195

answers:

2

So I want to broadcast .mkv file. I'm going to broadcast live video. So I need to know is it possible (anyhow) to read unfinished .mkv files? Because i know that Matroska is xml and you simply will not be able to read unfinished xml.

Update: now I know - it is possible to read unfinished XML. But it does not solve the question if it is possible to read Matroska one (because its structure can stop us from doing this...)

Is it possible to stream Matroska (.MKV) files ?

A: 

You can read unfinished XML - its how parsers work.

A SAX or Pull parser, for example.

The bigger question is what are you going to use to play the video?

Will
yes- now I know - it is possible to read unfinished XML. But it does not solve the question if it is possible to read Matroska one (because its structure can stop us from doing this...)
Blender
VLC will play streaming MKV files and also supports seamless repositioning if the server supports it. But most other players do not stream AVI/MKV, so most likely it's not an easy problem to solve.
Morten Mertner
+2  A: 

MOV is made up of blocks, only some of which are necessary to start playing. Their order in the file is up to the muxer, so some files will work with only the beginning, others won't.

MKV is similar, but I'm not sure how fixed the order is. Usually you will be able to start watching incomplete files, but not able to seek. Subtitles should work, attachments like fonts probably not.

(you can try this by truncating a file using bin/dd, or giving it to mplayer via http)

Live broadcasting, however, means that viewers can tune in at any time. I've never heard of a server that can generate MKV headers on the fly to support that.

Tobias