Commands by dittaeva (1)

  • Streaming HTML5 compatible video (Ogg Theora video with Vorbis sound) to an Icecast server using dvgrab, ffmpeg2theora and oggfwd. In this example I'm merging stereo sound to mono (-c 1), saving the original dv for later higher quality on-demand video (tee dvstream.dv), saving the theora stream for immediate on-demand video, and publishing the stream in Xiph's stream directory (-p and the name and description). The URL of the video will be (depending on your server) which will play in newer Firefox, Chrome and Opera web browsers. Cortado (a Java player) can easily be used for IE. Note also that I'm using port 80, which is not the default port for Icecast, this is to avoid restrictive firewalls. Also note that ffmpeg2theora 0.25 and will heed the bitrates much better than former versions because of using libtheora 1.1 or newer.

    dvgrab --format raw - | tee dvstream.dv | ffmpeg2theora -A 45 -V 400 -c 1 -f dv -x 360 -y 288 -o /dev/stdout - | tee savelivestream.ogv | oggfwd -p -d "Stream description" -n "Streamname" 80 icecastpassword /stream.ogv
    dittaeva · 2010-05-25 11:23:46 3

What's this? is the place to record those command-line gems that you return to again and again. 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.

Share Your Commands

Check These Out

Rapidly invoke an editor to write a long, complex, or tricky command
Allows you to edit your command using your chosen editor. Works in bash with "set -o vi".

Print a random 8 digit number
Don't need to pipe the output into rs if you just tell jot to use a null separator character.

Open (in vim) all modified files in a git repository
For editing files added to the index: $ vim `git diff --name-only --cached` To edit all changed files: $ vim `git diff --name-only HEAD` To edit changed files matching glob: $ vim `git diff --name-only -- '*.html'` If the commands needs to support filenames with whitespace, it gets a bit hacky (see for the reason): $ git diff --name-only -z | xargs -0 bash -c '

Run a command for blocks of output of another command
The given example collects output of the tail command: Whenever a line is emitted, further lines are collected, until no more output comes for one second. This group of lines is then sent as notification to the user. You can test the example with $ logger "First group"; sleep 1; logger "Second"; logger "group"

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

A bash timer
Starts and shows a timer. banner command is a part of the sysvbanner package. Instead of the banner an echo or figlet commands could be used. Stop the timer with Ctrl-C and elapsed time will be shown as the result.

Find the package that installed a command

command to change the exif date time of a image

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Recursivly search current directory for files larger than 100MB

Stay in the loop…

Follow the Tweets.

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.


Subscribe to the feeds.

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: