Are you sick of having to download many players? Many sites like youtube utilize FLASH. I wanted to figure this out for my own site. I have gone the Semi-Free way, which always takes some time… Here are the steps.
You will need three pieces of software, that are open source. Start downloading them from the various sites:
i. Grab the one with the most recent Date
I moved the FFMPEG.exe to a know location, like
c:\program files\VideoCompression
I then move the video file to that directory, like input.avi.
Then I run this from the command line:
Ffmpeg.exe -i input.mov -ar 22050 -ab 32000 -aspect 4:3 -b 2000 -r 12 -f flv -s 320x240 -ac 2 output2.flv
Parameter
Example
Description
-i
Input File Path
-ar
22050
Audio Sample Rate in Hz
-ab
32000 for Talk
64000 for Music
Audio Bit Rate in Bits / Sec. Use 32000 for Speaking and 64000 if there is music. But play around with the right setting for the file, as you can go down and not lose quality. Going up makes the files bigger
-aspect
4:3
Aspect ration of the video width : height
-b
500-2000
Video Bit Rate. Use 500-2000
-r
12
Frame Rate: 12 seems to work well, for action you may want to go higher.
-f
Flv
The format switch. Many formats are built in. But for ease of your users, use flv.
-s
320x240
640x480
Size: For web use 320x240. You could always do an optional bigger version for the patient people
-ac
1
2
Audio Channels – use 1 for web stuff, use 2 if you really need it, but 1 works.
Output file name
Output.flv
At the end, type in the file name of the result: output.flv
After you generate your file, output.flv, you can then edit your html page and include the JW FLV Player. Look at the readme.html example that comes with it, when you unzip it.
<div id="container">
<a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject("mediaplayer.swf","mediaplayer","300","185","8");
s1.addParam("allowfullscreen","true");
s1.addVariable("width","300");
s1.addVariable("height","185");
s1.addVariable("file","output.flv");
s1.write("container");
</script>
Good Luck!
Video Compression Tutorial
Embedding Flash Tutorial
Powered by: newtelligence dasBlog 2.0.7226.0
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2010, Geoffrey Smalling
E-mail