Discover and share the best of the web!
Learn more about Digg by taking the tour.
Build Your Own YouTube With Lighttpd And FlowPlayer (Debian Etch)
howtoforge.com — This article shows how you can build your own video community using lighttpd with its mod_flv_streaming module (for streaming .flv videos, the format used by video communities like YouTube) and its mod_secdownload module. I will use FlowPlayer as the video player, a free Flash video player. I will also show how you can encode videos to FLV format.
- 1020 diggs
- digg it
- abhinavg90, on 10/10/2007, -2/+9awesome lets get youtube out of business..
ok just kidding..thanks though :D- blup3ace, on 10/10/2007, -1/+8it'll definitely be a youtube-killer!
- Salgat, on 10/10/2007, -7/+3I have a feeling this is going to create a lot of wannabe websites that use up all their bandwidth instantly. On the other hand, I have a server setup on my laptop, so I might do this just for personal use.
- spikeb, on 10/10/2007, -0/+16be cooler to make something that used a free-er format though
- fkr3, on 10/10/2007, -3/+6It's better to be compatible.
- Krhis, on 10/10/2007, -0/+0Really? 'Cause I'm still waiting for a 64bit build of Flash.
- secleinteer, on 10/10/2007, -3/+3Yeah, grabbing the Flash* file from /tmp and converting it to .ogg isn't exactly that much fun to do, but I like being able to watch the video in full screen, which would be a lot easier to implement if we could just download the goddamn file instead of making us view it in the proprietary Flash plugin.
- secleinteer, on 10/10/2007, -6/+1Yeah, grabbing the Flash* file from /tmp and converting it to .ogg isn't exactly that much fun to do, but I like being able to watch the video in full screen, which would be a lot easier to implement if we could just download the goddamn file instead of making us view it in the proprietary Flash plugin.
- tehmoth, on 10/10/2007, -4/+0what do you expect, its for ubuntu
- rabidmonkey1, on 10/10/2007, -1/+2http://www.gnu.org/software/gnash/
I think you could probably use this instead of the proprietary flash software.- rustyangel, on 10/10/2007, -0/+1test
- fkr3, on 10/10/2007, -3/+6It's better to be compatible.
- completerobot, on 10/10/2007, -2/+16More YouTube-analogues are not really what the world needs.
- tech42er, on 10/10/2007, -3/+1It is if media companies win their suit against Youtube.
- ufia, on 10/10/2007, -0/+4Well, you could have said the same thing for search engines before Google started, look where they are now. Winners don't sit on their ass in defeat because it's already been done.
- vamos, on 10/10/2007, -5/+3The YouTube secret sauce has been leaked!
- KloroFormd, on 10/10/2007, -1/+1It was never a secret...
- skidooer, on 10/10/2007, -0/+2Not really. YouTube uses Google's fancy clustering technology these days.
- diggomaniac, on 10/10/2007, -0/+1fail
- shiftt, on 10/10/2007, -0/+14howtoforge.com's new layout sucks.
- manitoba98xp, on 10/10/2007, -2/+3Yeah. Annoying, and _way_ too glossy, especially for a tech content site.....I liked the SpreadFirefox theme better...
- h0zae, on 10/10/2007, -0/+2anyone else notice the random "remove ads" buttons floating all over the page?
- ivanvanderbyl, on 10/10/2007, -0/+12YouTube's been done, how bout writing "Build your own original web 2.0 community..."
- jman8888, on 10/10/2007, -4/+1ok i gotta do this now.
- fuckingusername, on 10/10/2007, -1/+4this and myspace and I will be god LOL
- stevob2007, on 10/10/2007, -1/+0www.phpizabi.com
- supa, on 10/10/2007, -2/+3check out the ANTI-LINUX ad smack in the middle of a Linux article!
- DrSpud, on 10/10/2007, -0/+11*disables adblock*
/me laughs at ad touting the 'cost efficiency' Win 2k3.
*re-enables adblock* - tech42er, on 10/10/2007, -2/+2Now that is FUD.
- HonoredMule, on 10/10/2007, -3/+3Ad? What's an ad?
- zwaldowski, on 10/10/2007, -0/+0It's an add.
- DrSpud, on 10/10/2007, -0/+11*disables adblock*
- bart3r, on 10/10/2007, -2/+0Need a way to automate the encoding of the video.
- wattersm, on 10/10/2007, -0/+2It's called a shell script.
- justinf951, on 10/10/2007, -0/+4This would be great for the Mythweb interface to MythTV.
- kingkilr, on 10/10/2007, -0/+1I believe they built their own flash player because they needed one with the right license.
EDIT: The flash thing is going to be in the next release I believe.
- kingkilr, on 10/10/2007, -0/+1I believe they built their own flash player because they needed one with the right license.
- Jo9100, on 10/10/2007, -3/+1no thanks, there are enough clones like that
- Chieffancypants, on 10/10/2007, -1/+0Isn't this essentially just encoding into the horrid sorenson codec? Last I checked, the good one, VP6, hasn't been reverse engineered yet, and can't be encoded using ffmpeg.
- Atomic1fire, on 10/10/2007, -1/+2any one want to make a .ogg plugin
that solves player problems - kaffein, on 10/10/2007, -2/+51. Lighttpd
2. FlowPlayer
3. Copious amounts of bandwidth.
4. ???
5. Profit! - vniow, on 10/10/2007, -1/+7Anyone else find it ironic that this ad showed up in the middle of the page?
http://img525.imageshack.us/img525/1774/picture5rg2.png- WhereAmI, on 10/10/2007, -0/+2Ads?
Adblock Plus.
Funny nonetheless, Illinois dude said nothing about linux in that quote. - obinine, on 10/10/2007, -0/+3That's a pretty ironic combination with the other ad: "Has your career blue screened?" - haha.
Another way to do this is with Drupal and the Flashvideo module.
http://drupal.org/project/flashvideo - sirhomer, on 10/10/2007, -0/+1 Microsoft specifically targets theses kind of websites for their ad campaigns, no joke.
- WhereAmI, on 10/10/2007, -0/+2Ads?
- antdude, on 10/10/2007, -3/+4Mirror: http://dotcache.com/http://www.howtoforge.com/video_streaming_lighttpd_flowplayer
Copied and pasted since the site is slow:
Submitted by falko on Sun, 2007-08-19 18:43. :: Debian
Build Your Own Video Community With Lighttpd And FlowPlayer (Debian Etch)
Version 1.0
Author: Falko Timme
Last edited 08/14/2007
This article shows how you can build your own video community using lighttpd with its mod_flv_streaming module (for streaming .flv videos, the format used by most major video communities such as YouTube) and its mod_secdownload module (for preventing hotlinking of the videos). I will use FlowPlayer as the video player, a free Flash video player with support for lighttpd's mod_flv_streaming module. I will also show how you can encode videos (.mp4 .mov .mpg .3gp .mpeg .wmv .avi) to the FLV format supported by Adobe Flash.
Remove ads
This document comes without warranty of any kind! I want to say that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!
1 Preliminary Note
In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.
We need a lighttpd installation with PHP support, as shown in this tutorial: Installing Lighttpd With PHP5 And MySQL Support On Debian Etch. I won't cover this here, so please refer to this tutorial if you haven't already set up lighttpd with PHP support.
2 Installing LAME
LAME is an MPEG Audio Layer III (MP3) encoder. We need this so that our videos don't lose their sound while they are being converted to FLV. Unfortunately, LAME isn't available as an official Debian Etch package, so we must compile it manually. First, we install the tools we need for the compilation:
apt-get install build-essential
Then we go to the /tmp directory and download the latest LAME version from SourceForge, e.g. like this:
cd /tmp
wget http://mesh.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
Then we unpack and compile LAME:
tar xvfz lame-3.97.tar.gz
cd lame-3.97
./configure --enable-shared --prefix=/usr
make
make install
3 Installing ffmpeg
We will use ffmpeg to convert our video files to the FLV format. First, we install ffmpeg and a few plugins like this:
apt-get install ffmpeg libavcodec0d libavformat0d libavifile-0.7c2 libpostproc0d libasound2-plugins avifile-player avifile-utils avifile-mad-plugin avifile-mjpeg-plugin avifile-vorbis-plugin
The problem with Debian's ffmpeg package is that is doesn't come with MP3 encoding support, which means that our FLV videos will lose their sound after the conversion. Therefore we will recompile Debian's ffmpeg source package with mp3lame support (which is why we had to install LAME in the previous chapter).
First we download the ffmpeg source package to /usr/src:
cd /usr/src/
apt-get source ffmpeg
Then we change to the ffmpeg source directory:
cd ffmpeg-0.cvs20060823
and edit the file debian/rules. Towards the beginning of that file, you will find two confflags lines. Add the configuration switch --enable-mp3lame to one of them and save the file:
vi debian/rules
[...]
confflags += --enable-gpl --enable-pp --enable-pthreads --enable-mp3lame
confflags += --enable-vorbis --enable-libogg --enable-a52 --enable-dts --enable-libgsm
[...]
Now we can build our new ffmpeg package:
dpkg-buildpackage
dpkg-buildpackage will most likely complain about missing packages that it needs to build the new ffmpeg .deb package:
server1:/usr/src/ffmpeg-0.cvs20060823# dpkg-buildpackage
dpkg-buildpackage: source package is ffmpeg
dpkg-buildpackage: source version is 0.cvs20060823-8
dpkg-buildpackage: source changed by Sam Hocevar (Debian packages)
dpkg-buildpackage: host architecture i386
dpkg-buildpackage: source version without epoch 0.cvs20060823-8
dpkg-checkbuilddeps: Unmet build dependencies: debhelper (>= 4.0) quilt libogg-dev libvorbis-dev liba52-dev libdts-dev zlib1g-dev libsdl1.2-dev libfreetype6-dev libimlib2-dev texi2html libraw1394-dev libdc1394-13-dev libtheora-dev (>> 0.0.0.alpha4) libgsm1-dev
dpkg-buildpackage: Build dependencies/conflicts unsatisfied; aborting.
dpkg-buildpackage: (Use -d flag to override.)
server1:/usr/src/ffmpeg-0.cvs20060823#
If you see an error like this, install the missing packages, e.g. like this:
apt-get install debhelper quilt libogg-dev libvorbis-dev liba52-dev libdts-dev zlib1g-dev libsdl1.2-dev libfreetype6-dev libimlib2-dev texi2html libraw1394-dev libdc1394-13-dev libtheora-dev libgsm1-dev
Afterwards, run dpkg-buildpackage again:
dpkg-buildpackage
The dpkg-buildpackage command should now compile ffmpeg again and create new .deb packages (ffmpeg plus some plugins) in the /usr/src directory. This can take some time, so please be patient. It's possible that you get some warnings about signatures at the end - you can ignore them.
Afterwards, we go to the /usr/src directory and install our new .deb packages:
cd ..
dpkg -i *.deb
That's it for ffmpeg.
4 Installing flvtool2
When we convert videos to the FLV format, we need to add some metadata such as the duration of the video to the FLV file so that FlowPlayer can properly display the length of the video. We can add this metadata with flvtool2. flvtool2 is written in Ruby, so we must install Ruby first:
apt-get install ruby
Then we download the latest version of flvtool2 to the /tmp directory, e.g. like this:
cd /tmp
wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz
Afterwards, we install it:
tar xvfz flvtool2-1.0.6.tgz
cd flvtool2-1.0.6
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install - trog, on 10/10/2007, -0/+3No mention of the licensing you might need to pay for the MPEG software that you're using! Check out ffmpeg's legal page before you start doing this commercially :)
- bharbhar, on 10/10/2007, -0/+1newporn
- BoonEx, on 10/10/2007, -2/+1There's an already integrated of-the-shelf solution to do this, which includes both website CMS with pre-integrated flash player and encoder. Plus music player and a lot more, all free - all called Dolphin 6 + Ray 3 - check them out here - http://www.boonex.com/
- cr3ative, on 10/10/2007, -0/+4Mmhm, for $279. Nice one.
- BoonEx, on 10/10/2007, -2/+0$279 Ad-free. $0 with Ads.
- cr3ative, on 10/10/2007, -0/+4Mmhm, for $279. Nice one.
- joxer, on 10/10/2007, -0/+0of course the whole set up sites to make profit thing is great until the bandwidth bill comes in. Get me gigs of free hosting and I'll call that a breakthrough.
- wattersm, on 10/10/2007, -0/+2You can get a server with a few thousand gigs of bandwidth from almost any hosting provider, sprinkle in some ads and you should be able to make a profit.
- lassegs, on 10/10/2007, -0/+1This will be nice for using playstation 3 as a media centre.
- neko, on 10/10/2007, -0/+1Check out Marillat's wonderful debian-multimedia.org repository if you don't want to compile the less-free lame and ffmpeg from source.
But as someone pointed out above, a lot of this patent and legal garbage kicks in once you start using these codecs commercially. - kahrn, on 10/10/2007, -0/+2Why would you copy youtube and use FLV? FLV is a terrible format. I never understood why sites restricted people from just downloading the original format it was submitted as.
- alpinweiss88, on 10/10/2007, -0/+3I use FLV and original format as an option but my site is just for videos of my kids so my parents, friends, and family can see them. FLV was a great addition, because prior to that I kept getting family members who would email me and say "I only get sound" or "It doesn't work on my computer". I was encoding them as wmv, and eventually switched to mpeg1. What a pain. Especially when the videos were longer than a minute. The size was pretty big, and it would take them a while to download them. In short, FLV is great because they can watch it in their browser with a click, it doesn't take much bandwidth, and they don't have to worry about codecs and file formats.
- jlebrech, on 10/10/2007, -0/+1Can probably setup a pretty good localtube for playing movies on the wii, in a similar way to wiicr.
- JohnnyXmas, on 10/10/2007, -0/+2FINALLY!! I've been looking EVERYWHERE for a way to make myself the target of a multi-billion dollar lawsuit!! This P2P BS just wasn't cutting it.
- myownvideosite, on 03/06/2008, -0/+0hi there
I found this on the web
http://startyourtube.com
it looks easy to me
best
jp - videoconverter, on 03/30/2008, -1/+0flv converter(), flv video converter()
http://www.videoconverterdownload.com/flv-converte ...
http://www.flvto3gpconverter.com/
http://www.flvtowmv.net/ - videoconverter, on 04/11/2008, -1/+0Provides video converter download, video editor, iPod/3GP/PSP/MP4/Zune/DVD video converter software free download. flv converter,
flv to wmv,
flv to 3gp converter,
ipod to pc,
ipod to pc transfer,
ipod to itunes transfer,
flv video converter,
divx converter,
mac dvd ripper,
transfer ipod to computer,
divx to dvd converter,
dvd to divx converter,
mac video converter,
iPod video converter Mac,
convert avi to ipod,
Youtube to 3gp,
m4v converter,
video converter - videoconverter, on 05/19/2008, -1/+0Free Online FLV Converter
http://www.videoconverterdownload.com/online-free- ...
FLV to Video: http://www.flvto3gpconverter.com/
Video to FLV: http://www.3gptoflvconverter.com/ - robinsonalexa, on 09/19/2008, -0/+1I always use Sothink Video Encoder for Adobe Flash, Flash converter gives you full control over the converting process, free to customize different video, audio settings and output files; provides advanced video editing functions, like video cropping and trimming; generates thumbnail image; offers various playback skins; and automatically creates an adapted Flash Video player (SWF) and HTML page to play the outputting Flash Video files progressively, sharing business over the Internet like youtube,
http://www.flash-video-soft.com/video-to-flash/
Browsing Digg on your phone just got easier with our enhancements to the