n00tz.net
so you think you're savvy? reviews.ramblings.references
  • Home
  • About
  • Lifestream
  • Wedding Stuff

Setting up a Streaming Media Server on Ubuntu 8.04LTS (Hardy Heron)

Software Add comments

I don’t fall asleep easily when I’m on-call so I decided I’d watch Dexter Season 2. I didn’t want to download 4.1GBs of xvid/avi’s from my parents house to my place because it’s entirely unnecessary to have the videos in two places. So, let me explain how I got a Streaming Media daemon working on my server.

I did some searching and there wasn’t anything super awesome out there that would keep me away from using the command line interface of VLC. So, the first step was to install vlc. I also use screen so I can log out of my SSH session and just use the web interface available on VLC, so I’ll include steps for using screen.

Code:
sudo apt-get install vlc screen

During or after installing vlc, you might as well set up the port forwarding on your router for access to the web interface. Log into your router and open up port 8080 to your server. If you are not trying to stream over the internet or don’t have a persistant dynamic or static IP address, you can skip this step. Check http://www.portforward.com/english/routers/port_forwarding/routerindex.htm for information on how to port forward on your router.

The next step was to get into screen and start the media daemon.

Code:
screen
 vlc -I http

You can then press ‘CTRL’+'A’ followed by pressing ‘D’ to detach from your screen instance and log out of your server (this is the glory of screen). You can reconnect to screen later by entering ’screen -r’ at the shell of your server. I use screen for all of my console-based server daemons or anything I want to have run while disconnected from the SSH session I’m in (HLDS, SRCDS, VLC, ‘apt-get upgrade’, ‘tail -f’).

Then browse to your server by going to http://your.server.ip:8080/ . You should be greeted with an html representation of the VLC interface you may be familiar with on your computer. It will look something like this:

vlc-http-interface

At this point you can toggle the Stream Output by clicking on the icon that has three staggered arrows pointing to the right (on the default theme). From here you want to check the ‘UDP’ box enter your external IP and a port (default is port 1234 on VLC UDP client) to use for streaming. This method makes it easiest for connecting the client side for streaming, which in most cases is ideal. If you’re going to set this up for less savvy users simplifying their end makes it easier on you as the admin, TRUST ME.

Next, open up UDP ports 1234 on the client router forwarding it to the viewing computer again this won’t be necessary over LAN and won’t be possible from a NAT’d server. Start VLC on the client computer and open Network Stream (CTRL+N) and click OK.

Back on the Web Interface, open the file and play it. If you don’t have any port forwarding or NAT issues, you’re done!

UNLESS-
The first 2 episodes I have are not encoded with anything special, so I was able to stream them without adding any extra codecs to my server. However, episode 3 needed xvid codecs.

Here’s the steps to add the “non-free” w32codecs:

Code:
sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
sudo apt-get install w32codecs

Restart the vlc daemon and you’ll be able to play xvid (and I assume divx as well).

Share and Enjoy:
  • Twitter
  • StumbleUpon
  • Facebook
  • Digg
  • del.icio.us
  • Reddit
  • Google Bookmarks
  • Print
  • email

Tags: linux, media server, port forwarding, screen, server, ssh, streaming, ubuntu hardy, video, vlc


July 10th, 2008 |

Tags: linux, media server, port forwarding, screen, server, ssh, streaming, ubuntu hardy, video, vlc


24 Responses to “Setting up a Streaming Media Server on Ubuntu 8.04LTS (Hardy Heron)”

  1. Kirk
    December 15th, 2008 at 10:08 am

    Followed Set up for Vid Streming. Works Perfect per yopur code, after struggling with all the “Other” media Players..Thank You !!! VLC is great also on my linux as well as Vista OS


  2. n00tz
    December 15th, 2008 at 11:26 am

    I had the same issue when I was trying to find other streaming media servers.. None of the other ones had good instructions so I sat down and figured out how to make it work with VLC and wrote an article on my blog to preserve it for the future. Based on the traffic this article has seen since I posted it, I have no doubts that others feel the same as you.

    Glad I could be of assistance!


  3. steffa
    December 30th, 2008 at 1:02 am

    call me stupid or just high but could i use this on my ubuntu server to stream video to a windows laptop with broswer?


  4. steffa
    December 30th, 2008 at 2:01 am

    shouldnt it play all the things vlc plays?


  5. n00tz
    December 30th, 2008 at 10:51 am

    If you read the instructions as I wrote them, it will play anything the server has codecs for. I added a bit at the bottom of the article to show how to install the w32 codecs, after those are installed it will play just about everything across to any platform with VLC media player installed.


  6. junky001
    December 30th, 2008 at 3:38 pm

    At what point and where do you add media to stream ?


  7. Eli
    January 21st, 2009 at 10:10 am

    hello, when i try to connect to my other pc i got a access forbidden, any idea,
    thanks


  8. n00tz
    January 21st, 2009 at 7:49 pm

    Make sure you’re trying to connect to the correct IP and Port of the other computer. What I’m betting you’re seeing is a default Apache page without permissions to view the directory, which means you’re connecting to port 80 or port 8080 that Apache is already configured for. You’ll have to specify a different port for vlc or change the apache configuration so it’s not listening on port 8080.

    Adding the options below will allow you to specify which host and port the interface will listen on.
    –http-host host:port


  9. trillex
    April 19th, 2009 at 9:31 pm

    Found this through google, but it’s a bit dated.

    I do however have an issue, I can’t find any help on. When doing your think, it stops at the creating httpd thing. This is obviously because of apache having stolen port 8080. So I use your –http-host 192.168.1.35:1337 (or some other port), if I do it with it’s actual host:port, it will say permission denied when listening on those sockets.

    But when doing that, it still pretty much clogs up when creating httpd. I can only assume that it’s apache that is hindering it but how can I work around this?


  10. trillex
    April 19th, 2009 at 9:37 pm

    Actually, after having read about a bit – it seems that the ports chosen (or all ports) are priveledged and cannot be opened unless I do it as root. VLC will not run as root so it tells me to use vlc-wrapper but I cannot find anything about this anywhere.


  11. fcukin.com » Blog Archive » 64 FCUKIN Things Every Geek Should Know
    April 21st, 2009 at 12:43 pm

    [...] http://www.n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/ [...]


  12. 64 Things Every Geek Should Know « Caintech.co.uk
    April 22nd, 2009 at 1:52 pm

    [...] http://www.n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/ [...]


  13. 64 cosas que todo geek deberia saber | Tecnologia y Sociedad
    April 22nd, 2009 at 3:16 pm

    [...] 52. Montar un servidor de Streaming [...]


  14. smadamr | 2^6 Things Every Geek Should Know
    April 30th, 2009 at 10:06 pm

    [...] http://www.n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/ [...]


  15. Mega-gia: 64 cosas que un Geek deveria saber « marcianos conectados
    May 18th, 2009 at 12:40 pm

    [...] http://www.n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/ [...]


  16. 64 cosas que todo geek deberia saber « Dark Andrew
    June 8th, 2009 at 11:43 pm

    [...] 52. Montar un servidor de Streaming [...]


  17. Arrow Webzine » 64 Things Every Geek Should Know.
    June 13th, 2009 at 3:12 pm

    [...] http://www.n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/ [...]


  18. 64 things a tech-savvy geek should know! - Digihackers – Tech 2.0!
    June 20th, 2009 at 5:11 pm

    [...] http://www.n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/ [...]


  19. 64 things a tech savvy geek should know! | DigiHackers
    June 29th, 2009 at 4:38 pm

    [...] http://www.n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/ [...]


  20. 64 Things Every Geek Should Know | Enginerve's Blog
    July 14th, 2009 at 2:57 pm

    [...] http://www.n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/ [...]


  21. The Geek “Must Do Before You Die” Checklist | Failure is the Key to Success
    September 21st, 2009 at 1:31 pm

    [...] http://www.n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/ [...]


  22. #Os Punks também amam!
    September 24th, 2009 at 1:53 pm

    [...] http://www.n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/ [...]


  23. How do I install the xvid Codec on Ubuntu? - QuestionBin::Answer
    January 17th, 2010 at 1:53 pm

    [...] This will install the Windows 32 codecs which include xvid for Ubuntu. You could also setup a streaming video server using Ubuntu. Patrick's Sig: A fan of Google [...]


  24. 64 Geek Things! « Just Some Random Thoughts…..
    February 1st, 2010 at 3:53 am

    [...] http://www.n00tz.net/2008/07/vlc-media-server-ubuntu-hardy/ [...]


Leave a Reply

  • Meet Your Blogger

    profile092008square When not spending time behind a computer screen bringing you his latest blog posts; you might catch him playing video games on his PC; eating/cooking something in the kitchen of his house in North Chattanooga; watching movies from his Netflix queue; volunteering for the Boy Scouts of America; fueling his wilderness interests by hiking, camping, backpacking, rafting, kayaking; sustaining his established hobbies in videography, photography, or music; running his DJ business with his brother as a partner; or hanging out with his friends doing any number of fun activities. Find out more...
  • Suggest Something

  • Lifestream

    • Listened to Stolen Days - Kipling.
      — 1h ago via Last.fm
    • Listened to Falling On My Knees - Signum A.D..
      — 1h ago via Last.fm
    • My (A-) Review of North Coast Brewery's "Pranqster" Belgian Strong Ale over @BeerAdvocate: http://bit.ly/cVtVo6 [n00tz]
      — 1h ago via Twitter
  • Paying the Bills

  • Blogroll

    • Garrett Bartley
    • Molly Locklear
    • Nathaniel Foster
    • Paul Stamatiou
    • Robert Sloan
  • Mint Investing and Personal Finance
Copyright © 2010 n00tz.net All Rights Reserved
RSS XHTML CSS Log in
Wp Theme by n Graphic Design
Powered by Wordpress