Before I set out on this project, I'm wondering if it's possible. Say I come across a site with a .flv I can't watch.
I'd like to create a script that...
a) Grabs the source code of a URL I enter and parses the information for the .flv file. b) Downloads that file c) Converts the file format to .mp4 d) Displays new page with .mp4 in html5 format.
I'm sure I can do all this, I was just wondering if it would work and if anyone sees any possible hurdles with it. Basically I'm fed up with not being able to watch .flv files and want to resolve the problem.
You should work on an iPhone modification for this. ;)
In any case, it is possible. There are services out there that do very similar things (e.g. convert youtube videos to mp3).
As far as hurdles are concerned your bandwidth is going to be pretty high if you are constantly downloading and streaming videos. Because of this, I would take extra care in trying out different caching techniques to reduce the bandwidth. If two different people request the same movie within a reasonable amount of time between each other, the server should not have to download the flv more than once.
Play around with it and let us know how it turns out.
Just wondering ... is this legal to do with content you don't own the copyright for? I guess it could fall under "fair use" if it was just you doing it for you, but if you want to start a service to do this for others, you should definitely contact an attorney who handles intellectual property issues and have a chat about it. In one sense it is like taking a vinyl album and recording it to CD: As long as you only make the one copy for your personal use you should be okay, but if you start selling the CD copies to other people who don't have turntables (other iPhone users), then you're a pirate ... or something like that. IANAL.
On a side note, I've been working on various methods for merging audio and video files on-the-fly online, and that kind of media processing tends to be very CPU-intensive ... basically bogging down the server completely until the merge is complete (using ffmpeg, for example). So I'm thinking that a service for ripping .flv's online (if that is where you are headed) could be a real cycle pig. I am very interested to learn more about your project.