Videos! You’ve been Served!

Let’s talk about streaming!

With the proliferation of digital media files, the media server is becoming more and more of a reality. For families that have small children, they are a boon due to the protection of the physical media. For others, they simply hold the promise of instant recovery and playing of a particular movie.

Currently we have uShare, Jinzora and Ampache in Amahi as one-click apps.

stream

However, we went on a search to find a video media server that would meet the following criteria:

  1. Efficiently serve to multiple computers or devices
  2. Supports open formats like Matroska (mkv)
  3. Cross-platform using Open Source players like MPlayer and VLC, enabling a consistent interface.
  4. Open Source
  5. Supported streaming protocols such as RTSP, to allow for seeking within the stream

The search ultimately ended in partial failure. While there are solutions that meet criteria 1, 3, 4 and 5, relatively few meet criteria 2, and of those that do, there are problems; more on that in a minute.

First we looked at FFServer, a the little known server that comes with the FFMpeg transcoding package. While it met criteria 1,2,3 and 4, it was not completely stable and used http for the streaming protocol.

VLC followed. RTSP? Check! Matroska? Check! Mplayer and VLC? Check! FOSS? Check! Stable? No! VLC supports streaming in a server fashion, and it does support Matroska, however, the files that it streams suffer from audio synchronization problems. The advice from the VLC irc forum? Use a web server. It is faster and more efficient. Unfortunately, a web server was more than I wanted. Plus it doesn’t support RTSP. VLC’s server counterpart, VLS, is no longer supported and only supports older technologies like MPEG, and AVI, so it wouldn’t work either.

Jinzora? Great, however it is too picky about how the media has to be installed. Ampache? Again, it is web based. Coherence? Nope. Coherence, uShare and the PS3 Streaming Server, Mediatomb and the newcomer MiniDLNA show great potential, and they use DLNA/UPnP. DLNA and UPnP are technologies that show great promise for media servers in the home, and support for the protocol comes from devices like the PS3, Xbox 360 and other hardware solutions. At this point in time, Totem comes the closest to supporting DLNA/UPnP with a plugin from Coherence, but that eliminates a cross platform solution as VLC doesn’t look like it support DLNA/UPnP until well after the 1.0 release, and MPlayer doesn’t support it at all.

speedAnd the winner is Darwin Streaming Server (DSS), from Apple. While it doesn’t support Matroska, it does meet all of the other criteria, and doesn’t suffer from audio synchronization problems. In addition, the media can simply be stored in a single directory or be organized into subdirectories. Its native format is MP4, easily available from Handbrake, and the only preparation that the files need is something called hinting. Hinting, and an accompanying preparation that simply add synchronization information, adds additional streams to the MP4 container that tell DSS how to stream and seek within the stream. The result is nearly flawless streaming from my Amahi HDA to  an XP client. MP4Box, part of GPAC, handles the hinting and synchronization details with a single command. Even with multiple streams going, my HDA machine idles at a throttled 800MHz.

Additionally, DSS offers a modular approach to development, so plugging in additional support for technologies like Matroska may be forthcoming.

DSS suffers from one problem that some might find annoying, the lack of text based subtitles. MP4Box can add the stream and hint it, but DSS doesn’t send that portion of the stream. If the subtitle is burned into the H.264 stream, then there is no problem, but for multilingual or hard-of-hearing households, this may be a deal-breaker. For all others, if you are already using MP4s the sky is the limit. If you are looking at Matroska, well, the conversion process from Matroska to MP4 isn’t difficult.

Right now, for Amahi users, there isn’t a one click solution for DSS but we hope to . This should be soon fixed. For now, installing isn’t difficult as the dependencies are few. Simply download the source code from Apple, apply the patches for the 64bit version, if needed, and compile. Detailed instructions are available from CodeProject.

While there are possibly countless other possible solutions, this is the one that I found that did the job with the least overhead, while conforming to most of the criteria. Enjoy!

[Photos courtesy of ishrona]

[Facebook] [Slashdot] [Twitter]

10 comments

  1. cpg Nov 19

    Another option, which may not be as efficient as streaming, is simply file sharing. A lot of programs and devices simply see the shares and manage the reading of the file carefully to the point that they can forward and rewind the “stream” in a fairly straightforward fashion. Notably, VLC does that, for many many formats including even things like iso images of video DVDs!

  2. david Nov 21

    The only problem with file sharing can be lag problems. It’s not necessarily from network speed, but from de-tuned Samba problems. Amahi doesn’t suffer from those problems from what I have seen, but it can be a problem for users that setup their own Samba system..

    For HD content, given that an 1080p movie can be 30-40GB, users will want a minimum of 100mb ethernet, and 1000mb would be better, especially if streaming to more than one machine is likely.

  3. andrew Nov 24

    I’ve been using Mediatomb for a few weeks now on my Amahi server. I installed to using yum and had no problems getting it up and running.

    I had some problems with my mkv files playing on the PS3 as the PS3 doesn’t support them. Mediatomb has the ability to transcode the movie to an MPEG2 to be played on the PS3. I am using a Pentium 4 3Ghz machine and the transcoded video played perfect for about 30 seconds until it caught up to the buffer and started skipping. I spent about a week trying to fix it, but in the end I just converted all of my mkv files to m2ts using tsmuxer.

    I do like Mediatomb for the simple fact that I can script how my files are layed out. I can pull ID3 info from my mp3s and group them in folders via artist, genre, etc. It has come in very handy to find my music.

    I’ve thought about writing an Amahi plugin for Mediatomb, but just don’t have the time right now. I just thought I’d put in my two cents and say that Mediatomb runs flawlessly with Amahi.

  4. carlos Nov 29

    Good data point! We have not focused on customizing mediatomb.

    Do you have any tips that you can share for us to package it?

    We like to pre-configure the programs so that they are true “one click” in as much as it’s possible. Like – they pick up the media from the right place, etc.

  5. Shu Nov 30

    I currently use xbmc. I know this is not a solution to want you want but it works. It support muliple formats and streams great off my hda. I have the solution installed on a windows htpc that is conncted to my tv.

  6. Philippe Dec 7

    Red5 is an Open Source Flash Server written in Java that supports:

    Streaming Audio/Video (FLV, h264, AAC, and MP3)
    Recording Client Streams (FLV only)
    Shared Objects
    Live Stream Publishing
    Remoting (AMF)

    http://osflash.org/red5

  7. cpg Dec 9

    [Translation to Spanish of this blog post]

    Videos? Usted ha sido servido!

    http://alpha.bloglation.com/posts/84?version=1

  8. Katherin Demetree Sep 10

    Hi, sorry fo enquiring this enquiry here, but I am not ableto find a contact form or something so I thought I leave my question here. I run a blogengine blog but I am receiving large amounts of spam. I see u use wordpress, is it straightforward to regulate spam with wordpress or doesn’t it make any difference? I hope you will respond to my comment or maybe send me an email with your answer if you don’t want to approve the comment. Best regards

  9. tom May 21

    hi i have my server all set up and running just having a few problems with streaming my movies via vpn it buffs evey 30 seconds or so making it unwatchable im trying to watch this with vlc my server has a 30 mb internet access but my home network has a 10 mb does this affect anything? only thing that is confusing me is the fact i can stream music without a hitch

    sorry for sending this twice just realized my email address was misspelled

  10. cpg May 24

    @tom – It does sounds like perhaps your upstream bandwith is ok for music but perhaps not OK for movies. Can you try some movies that are compressed more (less to go through the wire) or smaller in screen size (also less data). That will tell you if that is the issue.

    Leave a reply


    5 × = 20