Email: misterbethel@gmail.com
nameofcommand -o --long-option whatgetsthecommand
For example, if you wanted to use a very famous command line program called WGET to download a file you would type:
wget misterbethel.com/custom_content/turkey_pardon.mp4
Now the video will download to the computer in the directory you started out at. It will be in your home folder. We'll use this video that you just downloaded. The linux CLI (command line interface) program most often used to convert videos is called ffmpeg. You use it by calling (aka typing) ffmpeg into BASh along with where the video is you want to convert where you want the new one to wind up and all the options you want to add to the new video. The options can get to be very long and complex, fortunately there are a bunch of variations already built that will do the job we need in a much more sane manner. As a quick summary of a very very long topic, here is what you generally need to make sure a video works on every computer and device out there.
For starters:
--a version in .mp4, this works in most browsers, but NOT Firefox.
--For Firefox, you need a .ogv.
--You should also have a version in .webm which is a new (as of 11/11) format that is optimized especially for the web, unfortunately older browsers (i’m talking to you Internet Explorer) don’t support it.
--Lastly, you SHOULD have a version that uses a Flash plugin as well. I don’t. I think that we’re past this point and if one of the above doesn’t work, it is deserving that you get a warning that you’re browser is missing out on some new features that are now standard. I’ll get to this later. So we’re gonna skip anything Flash.
Onward! I need to give credit where credit is due. This next section is borrowed heavily from the fantastic tutorial by Mark Pilgrim. We’re going to use the CLI version of ffmpeg called ffmpeg2theora. You can get it from their site, or download it via Software Center on Ubuntu. Anyway, since we’re starting with an .mp4 let’s start with .ogv.
Open Terminal and type:
ffmpeg2theora turkey_pardon.mp4
You should now have a file called turkey_pardon.ogv in your home folder. Next, lets make a .webm.
You should now have two videos in your home folder. Let’s add them to a webpage using only html5. Code:
<video controls>
<source src=”turkey_pardon.mp4”></source>
<source src=”turkey_pardon.ogv”></source>
</video>
There you have it...a working web video without too much hassle. Just kidding that was a pain in the ass.