Convert WMV to FLV Using ffmpeg and a Dash of Cloud Computing!
Tuesday, August 25, 2009 at 02:44PM At LegalCloud we use GoToWebinar to produce our webinar series on LegalCloud and Cloud Computing for law firms. I needed to convert our WMV files that GoToMeeting provides to FLV so that I could integrate them with my tools of choice for our website. I chose Flowplayer; which is excellent by the way. Hopefully this information might help someone else who ends up needing to do this similar task.
You can see the results of my efforts here:
http://www.legalcloud.net/buzz.php
As for how I did this, it wasn't terribly difficult and I'm quite happy with the results. I decided to use a Rackspace Ubuntu 9.04 cloud server of the 1G size. You could use any server you want, this was just what I chose to use. Using your manage.rackspacecloud.com account you need to do the following:
- Start an Ubuntu 9.04 server
- Log in to server as root
- apt-get Update
- apt-get install ffmpeg
Transfer your WMV file from where ever you put it to your new server. I uploaded mine to Cloud Files then just downloaded them from there to encode.
The following command can be used to convert a GoToMeeting Webinar (not the proprietary format) to an FLV.
ffmpeg -i "tdp.wmv" -sameq -ar 22050 -ab 96000 -deinterlace -nr 500 -s 720x576 -aspect 4:3 -r 20 -g 500 -me_range 20 -b 270k -deinterlace -f flv -y "tdp.flv" 2>tdp.txt
This command converted the 26MB file in 2-3 minutes for me which I was happy with. I tried this with local desktop tools on a mac and it took well over 1 hour (and wasn't mostly free).
The whole process takes under an hour so you can do this for approximately $0.06 which seems good to me since it's only something I do occassionally.
Note: You cannot use this command to convert the GoToMeeting proprietary format. I haven't found anything that would yet but I hope to. So, make sure you don't choose the compressed proprietary format for recording your meeting!
Once the conversions were done I uploaded the resulting FLV files to Rackspace Cloud Files and enabled the CDN feature for them. Then, I integrated them with our Flowplayer installation on my web site. I'm quite happy with the result and the Flowplayer team deserves massive amounts of credit for their very cool and usable software that building upon jquery.
I'm not an ffmpeg expert but this did produce nice results for me and it's what I came up with after some trial an error. If anyone has any suggestions to make it even better then please let me know.
This same process would work just fine with any cloud provider of your choice really so if you use GoGrid or AWS the same steps should apply. I can't speak for other Linux distros at the moment but I'm sure you'd have good luck there too.
Cheers,
Kent
Reader Comments (12)
Nice result there and thanks for the tip
Regards
Kb
Very cool!
I ran into this same need a few weeks back with the need to have all of our video's in flv format. How would you rate the quality of the converted video?
-Rudi
@rudi the quality is excellent. It took me a number of tries to find the right mix for my input files. But, once I did it was quite nice. You can see them on their target site (link in post). Just click one of the "watch this video" links and it'll pop up as an overlay and center at the top.
Nice quality indeed. Very clever!
You rock! I have been struggling with the proper ffmpeg command line for doing the exact same thing you are doing for a couple of days now. I was either having poor quality or it flat out would not work with flowplayer (usually it was missing audio problems). Your command line worked well, however I did have to bump up the quality a bit for my purposes. After wreaking havoc on my poor little Dell laptop's burning CPU for hours on end, I am very excited to try the cloud method! I have already begun using Amazon S3 for hosting my video files, being pumped securely into flowplayer which is hosted on a Liferay website. Its a beautiful thing! But now that I see another similarly-priced competitor, I am sure to have a look at it to see if it will work for us!
FYI I'm getting an .flv download at present, not an inline video. FF3.0 on Ubuntu ...
Did the conversion to FLV reduce or increase the output size? I am using AVS Video convertor and it ends up blowing up the file size.
Don
This was really helpful, thanks alot!
Thanks mate ive been doing this quite alot these days. Youtube says it accepts flv but everytime i try it fails.
hi i am new to php i have doubt in video file it is not working proparly help me..
@Minivannan that isn't really enough info for me to be of any help to you. I'm not really sure what you are asking. Can you be more specific? I'll help if I can. -Kent