
FFmpeg is the Swiss Army Knife of command line tools for video and audio. It does many things you already want; for example, FFmpeg makes it easy to convert between almost any video or audio format you can think of. It also does some cool things you may not have considered trying before, like facilitating the usage of YouTube as a gigantic downloadable mp3 library. Also, considering that Flash video is the more or less the de facto official video format of the web (and thereby appears to be the future of video the web), FLV is a very important format to be able to convert from and to. FFmpeg makes this work incredibly easy.
Let's start this tutorial/guide with the mp3 stuff, then move on to more basic/intended usage, and then go on to something cool.
Extracting mp3 from YouTube videos (2 steps):
Let's say you like a song you heard on YouTube, but cannot find the mp3 anywhere online and there's nothing available at the record store. Back in the 1980s you would have been screwed -- you might have been upset enough to try a new drug called "crack" cocaine. But now with The Internet and FFmpeg, you can avoid becoming addicted to crack by downloading a DRM-free mp3 file that will play anywhere, directly from the YouTube video itself! Here's how:ffmpeg -i video.mp4 -ab 192k audio.mp3
This will give you an mp3 with a fairly standard quality of 192kbps. You can make that value higher or lower if it pleases you, but remember your source: audio from a YouTube video. The saying, "You can't polish a turd," is true.
Extracting a clip from a longer video (1 step):
Let's say you really like a segment of a movie, and want to share it with the world. Here's how you can post it to YouTube using free software, make sure the audio syncs up with the video (often times it doesn't, if a certain option is not included in the command) and upload it faster than the dopes uploading video in mpeg or avi format:ffmpeg -ss 00:06:09 -t 00:00:15 -i mmm.avi -async 1 -qscale 3.5 -vcodec flv seriously.flv
The first part of the command -ss 00:06:09 -t 00:00:15 means to start at 00:06:09 into the movie, and to play for 15 seconds. -i mmm.avi is where you tell FFmpeg to use mmm.avi as the input file. Yes, that's right -- you define the segment before you define the input file.
-async 1 is optional, but it is very helpful for a situation where the audio in your new cropped clip does not sync up with the video.
-qscale 3.5 is a variable command that changes the quality of your cropped clip. 3.5 is a good value here for YouTube -- it seems about equal to the quality of YouTube videos. A lower value means a higher quality. -sameq is a different option that serves the same function. It means to convert the video losslessly -- no loss in quality. Use sameq if you cannot tolerate any loss in quality from source to destination. When you're happy (or frustrated to the point of not being able to work any more) with the results, simply upload to YouTube.
If you want to convert a file from one format to another (losslessly), use this command:ffmpeg -i input.mp4 -sameq output.mpg
Remember, the -sameq option means to use the same quality (lossless).
If you want to do something cool, like make a mux (or music video, if you prefer that term) a la Pink Floyd + The Wizard of Oz, try this:ffmpeg -ss 00:04:25 -t 00:05:15 -i superman.avi -i grandma.mp3 -map 0:0 -map 1:0 -qscale 3.5 -vcodec flv killer.flv
When you want to make a simple video like what we're describing, this is a good way to do it. There are a couple of examples here.
The only option we haven't gone over yet here is -map. This is used in conjunction with the two input files to tell FFmpeg where to put them in the output. Here we have the first input file going to stream position 0 on output file 0 and the second input file is going to position 1. -map options correspond to the position in the command of input files -- so the first -map tells FFmpeg where to map the first input file specified in the command, the second tells where to map the second input file, and so on. It will make more sense if you try it. Use the format above if you get lost.
If you want to do something cooler, like this, where multiple video files are combined (see intro and outro), you will need to use another command line tool called cat. This tool concatenates files (it joins them together). It doesn't work with all video formats -- for instance, it will not work with .flv, but it will work with .avi. It also doesn't play nicely with certain differences between files, such as differences in video dimensions or bitrate. To really use this tool well you may need to consult the man page for ffmpeg or some mailing lists to see how other people solved their problems...but if you just need to join two files, here's how you do it:cat mick.avi killar.avi > killar-milk.avi
And after this, you should run the resulting file killar-milk.avi through FFmpeg to rebuild the part of the file that tell video players their duration. If you don't, you probably won't be able to see the entire new video.
Hope this helps. Leave questions and comments in the comments area. Try combining these commands in new and novel ways to achieve interesting results. Really freak it. At the very least, post something online that has never been posted before; it's easy.
When you use the right tools, the Internet is your oyster.
FFmpeg is available for Linux, Mac, and Windows. Officially it's only available to be compiled from source, but you can use Google to easily find a build for your operating system. If you use Linux, check your favorite repository for your chosen distro -- it will be very surprising if FFmpeg isn't included.
Updated Often.
Tuesday, August 12 gave rise to...
Tuesday, August 5 gave rise to...
The Internet: Officially Crueler Than Middle School.
--
Posted at
12:59 PM.
0
comments.
Reactions:
Links to this post
READ MORE: internet, video, youtube
Thursday, July 31 gave rise to...
Into The Ground

This blog is on hold for a few days. I'm trying not to run it (or myself) into the ground.
Tuesday, July 29 gave rise to...
Guide Planned For Later This Week. Tentative Title: 'FFmpeg: The Silent Killer'. Also: Batman Comments Are Out Of Control.
My intent with this upcoming guide is to expose a techniques I use to easily do movie/music multiplexing on the command line. It will be similar to the popular animated gif guide.
In the meantime, read the 240 (and counting) comments on this post I made right after Heath Ledger died early this year. Also, note that for a variety of queries related to Heath Ledger's death and whether or not it was faked, that post is the top link on Google. Funny how much difference the release of a popular movie can make.
Remember the 'long tail'.
--
Posted at
4:36 PM.
0
comments.
Reactions:
Links to this post
READ MORE: about, google, howto, internet, linux, movies
Thursday, June 26 gave rise to...
Oh Shit
PARIS (AFP) — Web regulators Thursday voted to allow the creation of thousands of new domain names, from .paris to .Pepsi, in one of the biggest shake-ups in Internet history, a French web official said.
The overhaul is expected to radically change the way users navigate the Internet and has major implications for businesses and consumers worldwide.
Full Story

Thursday, June 5 gave rise to...
The Internet

Google Image Search shows me things I never knew I needed to see.
Here is the image in some context: Agillian: Illustrated Guide to Bootstrapping
Monday, April 14 gave rise to...
Gmail Redesigned w/ Stylish for Firefox
--
Posted at
11:33 AM.
2
comments.
Reactions:
Links to this post
READ MORE: art+design, google, howto, internet
Wednesday, April 9 gave rise to...
Danse Avec Les Chats

More here,
passive thanks to m.
--
Posted at
12:36 PM.
0
comments.
Reactions:
Links to this post
READ MORE: fighting evil, internet, what
Tuesday, April 8 gave rise to...
All Blood and Dust

You are bidding on a 19th century Vampire Killing Kit. No reserve auction !
The box weights 20.1 lbs., length 16.8 inches, width 17 inches, height 7.9 inches;made of linden tree with maroon velvet inside, six compartments. The items enclosed in the box are as followed: one wooden hammer (6.5 inches long), four stakes 6 inches-each) --- the wooden hammer has applied a small holy cross, same as the stakes; the lower side containing: prayer book, crucifix, knife and eight bottles with Pamant (holy soil), Agheazma (holy water), Mir (anointing oil), Tamaie (holy incense), Usturoi (garlic), red serum, blue serum and secret potion. We believe a romanian monk from Transylvania has created this box during the period of 1870-1890 .
The origins of the box are in the Carpathian in the Mountains of Transylvania, Romania. It was acquired from an old priest. This Vampire Killing Kit is genuine and all the text used on it its in Latin and old Romanian. All the genuine kits are not in English language.
This Vampires Killing Kit is UNIQUE.

†††
†
--
Posted at
8:54 PM.
0
comments.
Reactions:
Links to this post
READ MORE: fighting evil, internet, monsters, real talk, tools, what
Increase Max Results in Firefox 3 Location Bar

David Lanham: Somatic Icons
Firefox 3 will be out soon (the final beta is available now), and it has some cool new features. One of these is that you can search through previously visited pages (via page title or URL segment) from the URL bar just by typing. Another is that the drop-down URL bar is now sorted by how frequently you visit a specific page. The part of it that still sucks is that by default, it only gives you 12 results. That's too few. Hopefully in a later release they'll increase the default for this...
Until then, you can do it yourself.
Step 1:
Typeabout:configinto the URL bar.
Step 2:
Typebrowser.urlbar.maxRichresultsinto the about:config filter (just below the URL bar).
Step 3:
Double click the result and change the value to 30.
Step 4:
Restart Firefox.Read Full Post »
--
Posted at
5:33 PM.
1 comments.
Reactions:
Links to this post
READ MORE: browsing, howto, internet
Word Life
Features Include:
* Velour beach towel
Price (CAD): $18.99 (Excluding: PST at 8% and GST at 5%)
*** ITEMS in STOCK: 0 ***
OUT OF STOCK
CHECK out our NEW products!
--
Posted at
9:21 AM.
0
comments.
Reactions:
Links to this post
READ MORE: internet, real talk, what
Monday, April 7 gave rise to...
Saturday, April 5 gave rise to...
Thursday, April 3 gave rise to...
Newsgroup Binaries with HellaNZB and LottaNZB faster than you can say "Cloverfield"
a howto article.
From nothing to downloading in about 5 minutes and that's with juice breaks. The file finished downloading in the amount of time it took me to put together this article. As an added bonus, HellaNZB will repair and extract your files for you, so you don't have to do any of that work -- your computer does it all for you, automatically.
LottaNZB is a clever and attractive frontend to HellaNZB.
"Why should I care about Usenet Binaries anyway?"
- Because torrents can take forever to download and you often don't know what you're really downloading, or who is watching you download (these all apply pretty much specifically to non-private trackers). Usenet is the underbelly of the net (I have heard that the FBI uses fake child porn groups on Usenet routinely to set up sting operations on would be child predators) and it has been around forever.
- A lot of stuff hits Usenet first -- many of the torrents you see contain files that originated on Usenet.
- There's stuff on Usenet that you can't find on torrent sites
You will need:
- Linux (pretty much any distro will do but Ubuntu or Debian will make it easy because of awesome/fairly simple package management)
- An NNTP service provider -- check your ISP first; many ISPs have free NNTP service but with crappy redundancy (sometimes a week or less). I'm using Verizon with their crappy redundancy, but it is free. Paid newsgroup services are generally very reliable with very high rate of redundancy and speed for very low cost. If you don't have a paid newsgroup service you're severely limiting your chances of finding anything useful to download that is older than one week.
- A little patience, the desire to get binaries for free.
How you do it:
Ok, tired of writing instructions. Hope this helps.
- sudo apt-get install hellanzb
- sudo apt-get install python-elementtree python-glade2 python-gtk2
- goto lottanzb website and follow build instructions
- goto nzb search site such as binsearch and look for your file
If using LottaNZB as a frontend, config file can be found at $HOME$/.lottanzb/hellanzb.conf
If just using hellanzb, config file can be found at $HOME$/.hellanzb/hellanzb.conf or /etc/hellanzb.conf.
*If you want this setup to automagically extract your rar files for you, go to the hellanzb.conf file -- open terminal, run command:Read Full Post »gedit .lottanzb/hellanzb.confand changeHellanzb.SKIP_UNRAR = TruetoHellanzb.SKIP_UNRAR = Falsealso changeHellanzb.UNRAR_CMD = FalsetoHellanzb.UNRAR_CMD = "/usr/bin/unrar"
--
Posted at
9:25 PM.
4
comments.
Reactions:
Links to this post
READ MORE: howto, internet, linux, the scene
Monday, March 24 gave rise to...
80 Million Tiny Images: A Visual Dictionary
Each of the tiles in the mosaic is an arithmetic average of images relating to one of 53,464 nouns. The images for each word were obtained using Google's Image Search and other engines. A total of 7,527,697 images were used, each tile being the average of 140 images. The average reveals the dominant visual characteristics of each word. For some, the average turns out to be a recognizable image; for others the average is a colored blob. The list of nouns was obtained from Wordnet, a database compiled by lexicographers which records the semantic relationship between words. Using this database, we extract a tree-structured semantic hierarchy which we use to arrange tiles within the poster. We tessellate the poster using the hierarchy so that the proximity of two tiles is given by their semantic distance. Thus the poster explores the relationship between visual and semantic similarity. For a large part of our language the two are closely correlated as shown by the extent of visual clustering within the poster. The large-scale groupings correspond to broad categories such as plants or people. Within the plant cluster, for example, tighter semantic groupings are visible such as flowers or trees. In turn each of these clusters contains further groupings all the way down to individual, highly specific nouns.
Link Read Full Post »
--
Posted at
7:52 AM.
0
comments.
Reactions:
Links to this post
READ MORE: art+design, internet, the future
Saturday, March 22 gave rise to...
The Internet is the new Xerox
This is kind of old now (in Internet time -- it is less than two months old in actual time) but some of the concepts it introduced me to popped into my head today. I think the author discusses some powerful concepts in it; concepts that, should the Internet retain its current level of popularity or see continued growth, will be important for anyone who honestly wants to share things of value using it.
The internet is a copy machine. At its most foundational level, it copies every action, every character, every thought we make while we ride upon it. In order to send a message from one corner of the internet to another, the protocols of communication demand that the whole message be copied along the way several times. IT companies make a lot of money selling equipment that facilitates this ceaseless copying. Every bit of data ever produced on any computer is copied somewhere. The digital economy is thus run on a river of copies. Unlike the mass-produced reproductions of the machine age, these copies are not just cheap, they are free.

Read more here: Better Than Free, by Kevin Kelly
(Great summary and synthesis of the 8 main points by Seth Godin here) Read Full Post »





