Posts: 121
Joined: Sun Sep 25, 2011 5:51 pm

Streaming media over LAN from RasPi?

Mon Jul 02, 2012 12:16 pm

Given a RasPi Model B with a hard drive connected by USB, would the device be powerful enough to host a website with streaming content? There would be a maximum of two clients streaming at the same time in case of music, one in case of film. What software would be needed and what quality of movies could be sustained?

Background, for those interested:
My wife and I want to make room in our flat. Ideas we have include:
- Cracking all DVDs and putting them in network storage, moving the physical discs to other storage (trash can if I get my way, actual storage if wife wins argument).
- Get rid of the TV and gigantic TV bench, instead buying an iPad and a new laptop.
- Get rid of the DVD-player (no need for that without a TV).
- Replace the stationary computer with a NAS, preferably made from a RasPi and the two drives now in the stationary. (Cheap and most of all quiet).

I have the added idea to host a webserver on the Pi, from which we could stream music and movies over the LAN. The advantages I can see with this is that 1) you wouldn't need to download a movie from the NAS to watch it and 2) no special software is required; you should be able to watch or listen through a browser. Then I also have a fun project to make a website that allows me to build playlists etc.

I need to know if it's feasible, or if I have to settle with it being a NAS and nothing more.

Posts: 9
Joined: Mon Jul 02, 2012 2:23 am

Re: Streaming media over LAN from RasPi?

Mon Jul 02, 2012 1:49 pm


Here is your problem.
The movie playback from NASs is deffinitely possible. XBMC has distro compiled to run on the Pi, however the issue is the website.

From what you are telling me, you want a site that's like YouTube, however this is nigh on impossible.
Youtube does not stream "AVI" or "MKV" files, it has them stored as transcoded "FLV" files.
The Pi would have a verry hard time transcoding files from LAN.

Furthermore, if you are going to have a media server website, you have to completely scratch the XBMC idea, and video playback on the XBMC is far more optimized than the playback on, say the, Debian Squeeze.

At this current time, I say that the webserver site media player is impossible due to hardware limitations, your best bet is to use XBMC to play movies:

I have provided a link:


Posts: 1
Joined: Mon Jul 02, 2012 1:57 pm

Re: Streaming media over LAN from RasPi?

Mon Jul 02, 2012 1:59 pm

picostreamer maybe? or VLC (

As for the storage bit, I've done that with my RPi and it's terrific.
I followed this guide:

Posts: 1407
Joined: Tue Aug 09, 2011 10:53 pm

Re: Streaming media over LAN from RasPi?

Mon Jul 02, 2012 2:40 pm

Typically, you don't set up a web server to stream media over a LAN, you set up a DLNA server (, they're having fun creating words, but basically it's like a network, with (a) server(s) and (a) client(s), with an added optional "remote" that act like, well, a remote). Apple's flavor is called AirPlay, is incompatible with DLNA, but there are DLNA clients for Apple devices.

A DLNA server confirmed to run on the Pi is miniDLNA (, but there are others mentioned here and there in the forum (xbmc). I have no clue if there is an AirPlay server that runs on the Pi, but I think I saw something about it on the forum too. A DLNA client for the PC is xbmc (it does both client and server), or the latest version of vlc.

You can even set it up so that your media is accessible over the Internet, but that's heavy on your mobile data contract and bandwidth, if you're streaming to your phone.

2 mistakes to avoid:
1- don't use a straight network share (what windows calls a shared folder), that requires the Pi to translate its filesystem to one understand by your client, and is a bit heavy on the CPU.
2- you need your media files to be in a format (wrapper and codec) understandable by your client. Again, no clue what Apple devices support.

EDIT: DLNA does require a DLNA client to be installed on all your devices, but it's very widespread, lots of high-end TVs even have one built in, and there's one available for any platform you might encounter.

Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Streaming media over LAN from RasPi?

Mon Jul 02, 2012 2:44 pm

With the HTML5 video tag , h264 would be a good bet ?


Transcoding on-the-fly would be impossible IMHO.
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere

Posts: 121
Joined: Sun Sep 25, 2011 5:51 pm

Re: Streaming media over LAN from RasPi?

Mon Jul 02, 2012 8:03 pm

For the NAS part of it I was just thinking I'll use scp/WinScp. As ghans said I was actually contemplating the video-tag in html5. If I remember correctly that allows me to specify several different media formats, and the browser will pick whichever it can play. If it's that simple the streaming quality of the content would simply depend on how much data a webserver on the Pi can push over the network (or in my case how little data the router can push through 3 concrete walls - which is about 1-2 mbit/s).

Has anyone tried something similar?

Posts: 12
Joined: Tue Jun 26, 2012 3:26 pm

Re: Streaming media over LAN from RasPi?

Wed Jul 18, 2012 3:33 am

In working with a growing video database for a number of years, owning an ipad, iphone, laptop, and now RasPi, as well as sharing media to a bunch of different devices (low power computers, game consoles, etc), I can speak with confidence when I propose a shift in thinking:

What you want is a beefed up NAS-style server, and the Raspberry is not going to give this to you.
First off; you would have to plug in an external USB enclosure (multi-drive enclosure if you want semi-serious storage space), and the USB bus is going to sap CPU every time a file is accessed.
Secondly, setting up a DLNA server or any kind of media server with the raspberry at it's core is going to be a great exercise in learning how to make it work, but it's not going to be a workable solution unless all your media is pre-ecoded for the specific device you want to use it on.

If you want to have a small and reasonably priced all-in-one unit, you're better off going one of three directions:
  • 1) Build your own small server and run it as a linux or windows server (cheaper, more bang. Manual setup, and potential noise issues)

    2) Buy a NAS that can do video sharing, or even better; something that supports Plex Media Server natively. There are more than a few people using Diskstations ( ... im&lang=us ) and ReadyNAS devices with success.

    3) Buy a small server that's already made, like a mac mini (the most expensive option, and in most cases also requires using external storage, but it does mean you can store 1080p versions of your favourite movies without worrying)
In terms of software, my personal suggestion after years of doing this is Plex Media Server ( ): you install it in windows, linux, or osx very easily, tell it where your files are, and it pulls all the metadata.
Not only does it work like XBMC in this regard, but there are apps for all sorts of devices, including the iPad; it transcodes, and has sharing options, as well as MyPlex, which allows you to watch the same media anywhere you go.

Picture this:

You're at home, and the new episode of a show you watch just downloaded. You fire up Plex on the ipad, tap the photo for that show, and it plays immediately.
You start to fall asleep half way through and press stop, going to bed.
The next day, you're stuck in a line somewhere and decide to finish the show; you pull your phone out, tap Plex, tap the show, and it asks if you want to resume, then plays immediately.

Or, another scenario:

You guys are visiting long-time friends, and during a conversation, you find out that someone in the group has not seen a life-changing movie: everyone vows to rent it or download it some day so you can watch it together. "Too bad we don't have the DVD; we could watch it right now"
You brought your ipad (or even iphone), and they have an apple TV hooked up to a large screen.
Tap Plex, tap to the movie, press Play, and tap another button, and within a few seconds your computer at home transcodes the file, sends the data over the internet to your hand, and the ipad sends it over wireless to the TV.
Everyone settles in to enjoy the show; easy, light, and without any fiddling.

Return to “Networking and servers”