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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
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.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
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:
Examples:
The following will take frames starting at 15.2 seconds for a total of 45.9 seconds:
mencoder -ss 15.2 -endpos 30.7 -oac copy -ovc copy mymovie.avi -o myeditedmovie.avi
Keep in mind -endpos is the total time, i.e. the output video in this is 3 minutes 3 seconds in length:
mencoder -ss 1 minute -endpos 2 minutes 3 seconds -oac copy -ovc copy mymovie.avi -o myeditedmovie.avi
cd /path/to/your/png_pics
mencoder "mf://*.png" -mf fps=2 -o output.avi -ovc lavc -lavcopts vcodec=mpeg4
then you can get a movie named output.avi.
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
Record audio to MP3 stream and video to MPEG-4 stream from webcam to AVI file using mencoder. Gives floating point exception in some mencoder versions.
This commands saves the output in the audio directory. The portion ${file/%avi/mp3} uses bash string replacement to replace the avi to mp3 within the ${file} variable.
Rip DVD to YouTube ready AVI file, using MPEG-4 video codec and MP3 audio codec. Resizes to 320x240 and deinterlaces as needed.
Using mplayer's mencoder, you can merge video files together.
'-oac' specifies the audio encoding (here copy, to just copy and not compress)
'-ovc' specifies the video encoding (same thing).
Reencodes to MPEG-4 DivX output video file from step 1. Audio stream is simply copied. Resizes to 320x240 and deinterlaces as needed. A heading subtitle file is applied as watermark. This heading subtitle file can be a URL.
Extracts an MP3 encoded audio stream from an input video file.
Substitute whatever track number you want into the "dvd://1" parameter. The "-aid 128" is to select the English language.
This set of commands will rip a dvd title using a 2 pass mencoder xvid encode. It will provide a great quality rip. It will rip as close to 700MB as possible. (note the bitrate of -700000)
Enjoy!
This set of commands will rip a dvd title using a 2 pass mencoder xvid encode. It will provide a great quality rip. It will rip as close to 700MB as possible. (note the bitrate of -700000)
Enjoy!
This uses mpg123 to convert the files to wav before burning, but you can use mplayer or mencoder or ffmpeg or lame with the --decode option, or whatever you like.
Takes two input video files and an external audio track and encodes them together to an MPEG-4 DivX output video file with the correct size ready for uploading.
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.