Wowza Community

Matroska MKV Support

I’m actually surprised that I didn’t find a topic about this when I did a search on the forums.

The Matroska MKV format is gaining in popularity because it supports multiple video, audio, subtitle and even chapter tracks. Playing an MKV file on the web is less than unheard of, but recently the DivX development team added support for it (and through their DivX web player plugin):

http://www.divx.com/en/software/divx-plus/codec-pack/mkv

This is all well and good for people that don’t mind asking their users to download a new plugin, and for users that don’t mind caching the entire video to scrub the playback (which can get up to 2+GB in size)… But it is not okay for me.

Is there any chance that Wowza could add support for MKV? I believe (not sure) that Wowza has an “encode on-the-fly” feature to convert WMVs to MP4s and vice versa to support the Flash/Silverlight differences… I think all it would take is to expand on this re-encoding feature to convert the MKV to a more standard format file, that way arguments or parameters can be passed through the stream URL to specify which video/audio/subtitle track should be used for the re-encode. Since the MKV format contains multiple video tracks, these tracks could be at various bitrates/sizes/fps. A bandwidth checking utility can be used to select which of the video tracks should be put in the re-encoded stream. The end user selects which audio/subtitle they wish to display, and all of these arguments/parameters could then be inserted into the stream url for Wowza to interpret.

If Wowza won’t officially support it, where might I find information on how to use the Wowza IDE to add the functionality myself?

I don’t know much about this format. I will take a look.

Charlie

Thanks for the info.

Charlie

Started to look at it but no timeline. File format is very nice.

There is still more to learn on how to properly support HTML5. Seems like a moving target.

Charlie

We did show an early, early, early preview of WebM support at IBC and Streaming Media West. We are still working out how and when.

Charlie

It was spam.

Richard

If it contains h.264 video and AAC or MP3 audio you should be able to playback through Wowza using mp4: prefix: mp4:sample.mkv

You should be able to check in VLC. Playback the file or live stream and open Tools > Codec Info to inspect the video and audio codecs.

Richard

I’m not certain that .mkv container will work, it is not included in the specifications, but you can try it. This is how you select specific audio tracks

Richard

Thanks for the reply! :slight_smile:

Matroska MKV is merely a container format which holds formats Wowza is already compatible with. Technical specifications can be found here:

http://www.matroska.org/technical/specs/index.html

I’m not all that well versed with muxing and demuxing, but it seems like it wouldn’t take too much to add MKV support, just demux the necessary streams from the MKV and then mux them into an MP4 or WMV format depending on the streaming protocol. I would think the hardest part would be to overlay the subtitles on the video stream.

Any update on this? Or is it still under consideration?

Hello!!!

Try to update soon…I am seriously waiting for the update!!!

Uh, was that post spam? If it was a serious post with some spam added to it, then I think there might be some light at the end of the tunnel. I’ve been looking over a way to hack together a solution for this.

http://www.javacodegeeks.com/2010/05/rtmp-to-rtsp-re-stream-using-wowza-and.html

That article suggests how to use Xuggler to re-encode something on the fly, which should be able to take an MKV and re-encode to MP4.

Awesome. WebM is a step in the right direction since it’s based on Matroska. However, it looks like the WebM standard is only matroska-like in the xbml container nature. In its current form it restricts the internal stream codecs to VP8 for video and Vorbis for audio. Doesn’t look like it supports subtitles.

But from what I understand, WebM won’t require the server to demux the codecs unless you translate it to a different format for a specific player plugin (Flash, Silverlight, etc). But the whole point of WebM is to deliver just the video free from dependence on “plugins”. No point to demux it on the server side.

I think I’ll try hacking together a solution for my question using the xuggler method mentioned in my previous post. When I get ready for that, I guess I’ll apply for a developer’s license.

If it contains h.264 video and AAC or MP3 audio you should be able to playback through Wowza using mp4: prefix: mp4:sample.mkv

Woah, wait - what? When did this happen? Wowza supports MKV containers now? This changes everything.

What if I’ve got SAP audio on a different audio track? How does Wowza know which audio stream to select?

Then all I need is a way to load the SRT subtitle files from the container… I think I can figure that one out pretty easily though.

How to config mkv can stream or VOD in wowza server ?