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.
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:
If it's Hebrew [most probably all RTL languages. Comments?], add -flip-hebrew and -noflip-hebrew-commas to the mplayer switches:
transcode -i myvideo.avi -x mplayer="-utf8 -flip-hebrew -noflip-hebrew-commas -sub myvideo.srt" -o myvideo_subtitled.avi -y xvid
This simple command will copy a DVD losslessly to your drive and remove the encryption.
Useful for when you download movies split into < 700mb parts.
mencoder is generally included with mplayer.
sudo port install mplayer
Most of the commands require the jpegs a certain format, not this, it just follows alphabetical order. The same order you follow if you do "ls -lisah" from top to bottom, top frame is first, bottom is last...
This goes perfectly with a webcam timelapse... I have just the script for it:
Use avconv linux package to record input from camera, mic, and desktop for creating instructional videos. The generated video and audio files will required further processing to put in to a single useable video.
We take the first 50 frames of a.mp4 for track a, and 24 blank frames followed by b.mp4 for track b. We then create a transition from track a to track b starting from frame 25 and ending at frame 49.
The output is stored in out.mp4
To view the results without saving remove "-consumer avformat:out.mp4" from the end.
Documentation of the mlt framework and the melt command can be found here: http://www.mltframework.org/bin/view/MLT/Documentation
Replace vid.mp4 with the path to your original video file, and out.mp4 to the path where you want to save the new file.
To view the output first before saving, remove "-consumer avformat:out.mp4" from the end.
Documentation for mlt framework and melt command can be found here:
-i sets the source file
-r sets the output frame rate, set it to the same frame rate as the input to output each frame
-f sets the output format, trough it might be guessed by the extension
Errors in output don't matter. Stop recording: ctrl-c. Result playable with Flash too.
IMPORTANT: Find a Pulse Audio device to capture from: pactl list | grep -A2 'Source #' | grep 'Name: ' | cut -d" " -f2
Improvement on Coderjoe's Solution. Gets rid of grep and cut (and implements them in awk) and specifies some different mplayer options that speed things up a bit.
A simple command to extract audio from flv/mp4 video file.
Just change extentions...
Better awk example, using only mplayer, grep, cut, and awk.
thumbnail gallery of video using totem
Faster thumbnail creation than '-itsoffset'
ffmpeg -itsoffset -4 -i test.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test.jpg
Videos are found using their MIME type. Thus no need to for an extension for the video file.
This is a efficent version of "jnash" cmd (4086). Thanks for jnash. This cmd will only show video files while his cmd show files having "video" anywhere in path.
Gets all videos in your boxee queue with a URL associated with them and attempts to download each using get_flash_videos
Do you have a large library of flv's you have picked up over the years using FlashGot Firefox plugin?
Do you want to be able to convert them to Ogg Theora (video) at once?
Try out this script...
Is a simple script for video streaming a movie
Creates a 5 minute flv file, with the given sequence of images and audio with 0.5 fps.
The images were created using the following command:
for x in `seq 0 300`; do cp ../head.PNG head-`printf '%03d' $x`.png; done
You can also inject metadata to seek easier using yamdi as follows:
yamdi -i muxed.flv -o video.flv
i have a large video file, 500+ MB, so i cant upload it to flickr, so to reduce the size i split it into 2 files. the command shows the splitting for the first file, from 0-4 minutes. ss is start time and t is duration (how long you want the output file to be).
credit goes to philc: http://ubuntuforums.org/showthread.php?t=480343
NOTE: when i made the second half of the video, i got a *lot* of lines like this:
frame= 0 fps= 0 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbit
just be patient, it is working =)