commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:
The option -an disables audio recording, -f forces the use of video4linux for the input, -s sets the video to the size 320x240, -b sets the recording bitrate, -r sets the frame rate to 15fps, -i gives the input device, -vcodec sets the output format.
Press Q to stop recording or you can specify the recording time with the -t option like -t 00:1:30
Encode video.avi into newvideo.avi using the libav codec to produce an MPEG4 file with a bitrate of 800
video.avi is the resulting file. Press Ctrl+c to stop the recording. You can change the OVC option to another to record into a different format.
Grab X11 input and create an MPEG at 25 fps with the resolution 800x600
rips the audio and video stream of a movie. The two streams are stored separately.
This assumes that there is a 10.2 sec delay between the video and the audio (delayed).
To extract the original video into a audio and video composites look at the command on extracting audio and video from a movie
Takes an mpeg video and coverts it to a youtube compatible flv file.
The -r 25 sets the frame rate for PAL, for NTSC use 29.97
-vn removes tha video content, the copy option tells ffmpeg to use the same codec for generating the output
Displays only the VGA adapter/chipset being used for the graphics. In this case, it gave me the "M22" and "Mobility Radeon x300" that I needed to research a graphics issue I was having.
Certain codecs in high res don't play so well on my Dell Mini 9. Using this command, I can play just about anything and it keeps the sound in sync to boot!
Download YouTube videos as .flv and convert them to .3gp for your mobile phone.
When playback of AVI files (containing a video format like XviD or DivX) is stuttering, it in 90% of the files is caused by a poorly or wrongly interleaved file. The issue can be permanently resolved by RE-MUXING the AVI video-files that have this problem
-vcodec, you choose what video codec the new file should be encoded with. Run ffmpeg -formats E to list all available video and audio encoders and file formats.
copy, you choose the video encoder that just copies the file.
-acodec, you choose what audio codec the new file should be encoded with.
copy, you choose the audio encoder that just copies the file.
-i originalfile, you provide the filename of the original file to ffmpeg
-ss 00:01:30, you choose the starting time on the original file in this case 1 min and 30 seconds into the film
-t 0:0:20, you choose the length of the new film
newfile, you choose the name of the file created.
Here is more information of how to use ffmpeg:
I use this command to save RTSP video streams over night from one of our national TV stations, so I won't have to squeeze the data through my slow internet connection when I want to watch it the next day.
For ease of use, you might want to put this in a file:
mplayer -dumpstream -dumpfile "$FILE" -playlist "$1"
works like a charm for the K610i