3
I'm running Debian for my home-server, which is a machine that lives under the telly in the living room and stores the family's photo's, videos, music, etc. I'm using all the usual services to serve these up to whoever deserves them, and it all works. So far so good.
Can't get my kids to use things like ftp or even email, to them "the internetz" means a web browser. Firefox usually. So i'm using apache2 to serve cgi pages generated from code compiled by me written in C. And that all works.
So I want to be able to stream the music, films, television recordings, etc. to web browsers, and despite the emergence of the media tag in html5, flash is still really the only practical solution that actually works.
I've been able to get a cgi program to convert mp3's, avi's and suchlike to flash as flv files using ffmpeg, on demand from the user, stored in a temporary file under DOCUMENT_ROOT and the browser will play them, and that works. e.g:
ffmpeg -i "/home/media/Audio/Music Videos/Kylie Minogue - Come Into My World.mpg" -sameq -ab 32k -ar 22050 -ac 2 -s 320x240 -f flv -y ../tmp/file9ltYxj.flv
Okay, so there's no accounting for taste - look i'm heavy metal but this vid is a work of genius! :-) But it's not ideal, for one thing it takes up space creating all these tmp files and for another calling ffmpeg to perform the conversion causes the page load to hang while it completes the task. Which is okay for a five minute music video, but i doubt firefox will wait for a two hour movie to convert using this method.
So i want to stream them instead using ffstream. I'm executing this line (as root):
ffserver -d -f /etc/ffserver.conf &
and the cgi executes this:
ffmpeg -i "/home/media/Audio/Music Videos/Kylie Minogue - Come Into My World.mpg" -sameq -ab 32k -ar 22050 -ac 2 -s 320x240 -f flv -y http://localhost:8090/feed1.flv
and this is where i'm running into trouble. The page loads, the flash embeds but fails to show anything. ffserver reports:
Mon Apr 15 09:29:38 2013 New connection: GET /feed1.flv
Mon Apr 15 09:29:38 2013 192.168.0.33 - - [GET] "/feed1.flv HTTP/1.1" 404 149
I'm getting 404's, but before I was getting 200's before, not sure why that's changed. But whether 404 or 200, the page is the same; Loaded, but no video stream.
I could really do with somebody to ask me further questions (not sure what to add) and hopefully get me up and running with this, because i've not much hair left and my wife wants me to paint the dining room.
Can anyone please advise where I might be going wrong?
Hi, Lee. Anything in a home setting is unfortunately off-topic for ServerFault but would be more suited to SuperUser. You could either edit out the references to "home", re-ask the question on SuperUser, or wait for it to be migrated. – tombull89 – 2013-04-15T09:02:18.450
Oh, sorry. I'm new and didn't know there was a distinction. When i was taught networking, a server is anything that serves a client. My machine, by that definition, falls into that category. But i'm not gonna argue - migrate me please :-) – None – 2013-04-15T09:09:41.537