Hide

What's this?

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/

Get involved!

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.

Hide

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.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

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:

Hide

News

2011-03-12 - Confoo 2011 presentation
Slides are available from the commandlinefu presentation at Confoo 2011: http://presentations.codeinthehole.com/confoo2011/
2011-01-04 - Moderation now required for new commands
To try and put and end to the spamming, new commands require moderation before they will appear on the site.
2010-12-27 - Apologies for not banning the trolls sooner
Have been away from the interwebs over Christmas. Will be more vigilant henceforth.
2010-09-24 - OAuth and pagination problems fixed
Apologies for the delay in getting Twitter's OAuth supported. Annoying pagination gremlin also fixed.
Hide

Tags

Hide

Functions

watch porn on older mobile phones

Terminal - watch porn on older mobile phones
function encode4phone() { ffmpeg -acodec libamr_nb -vcodec h263 -i "$1" -s qcif -b 200k -ac 1 -ab 7.4k -ar 8000 "$1.3gp" }
2009-02-21 20:39:35
User: TheBunman
-3
watch porn on older mobile phones

works like a charm for the K610i

Alternatives

There are 5 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

Hmm, it no workie for me...

ski@ganiodayo:/media/common/movies$ ffmpeg -acodec libamr_nb -vcodec h263 -i monk.716.hdtv-0tv.avi -s qcif -b 200k -ac 1 -ab 7.4k -ar 8000 monk.716.hdtv-0tv.3gp

FFmpeg version r11872+debian_3:0.svn20080206-12ubuntu3, Copyright (c) 2000-2008 Fabrice Bellard, et al.

configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --enable-shared --disable-static

libavutil version: 49.6.0

libavcodec version: 51.50.0

libavformat version: 52.7.0

libavdevice version: 52.0.0

built on Oct 3 2008 22:41:23, gcc: 4.3.2

Unknown decoder 'libamr_nb'

Changing the audio to mp3 results in a different error:

ski@ganiodayo:/media/common/movies$ rm -f *.3gp ; ffmpeg -f 3gp -acodec mp3 -vcodec h263 -i monk.716.hdtv-0tv.avi -s qcif -b 200k -ac 1 -ab 7.4k -ar 8000 monk.716.hdtv-0tv.3gp

FFmpeg version r11872+debian_3:0.svn20080206-12ubuntu3, Copyright (c) 2000-2008 Fabrice Bellard, et al.

configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --enable-shared --disable-static

libavutil version: 49.6.0

libavcodec version: 51.50.0

libavformat version: 52.7.0

libavdevice version: 52.0.0

built on Oct 3 2008 22:41:23, gcc: 4.3.2

Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (23976024/1000000)

Input #0, avi, from 'monk.716.hdtv-0tv.avi':

Duration: 00:41:53.1, start: 0.000000, bitrate: 1167 kb/s

Stream #0.0: Video: h263, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 23.98 tb(r)

Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s

Output #0, 3gp, to 'monk.716.hdtv-0tv.3gp':

Stream #0.0: Video: 0x0000, yuv420p, 176x144 [PAR 190:131 DAR 2090:1179], q=2-31, 200 kb/s, 23.98 tb(c)

Stream #0.1: Audio: 0x0000, 8000 Hz, mono, 7 kb/s

Stream mapping:

Stream #0.0 -> #0.0

Stream #0.1 -> #0.1

Unsupported codec for output stream #0.0

stream #0.0 is video, so let's try a different video codec:

ski@ganiodayo:/media/common/movies$ rm -f *.3gp ; ffmpeg -f 3gp -acodec mp3 -vcodec mpeg2video -i monk.716.hdtv-0tv.avi -s qcif -b 200k -ac 1 -ab 7.4k -ar 8000 monk.716.hdtv-0tv.3gp

FFmpeg version r11872+debian_3:0.svn20080206-12ubuntu3, Copyright (c) 2000-2008 Fabrice Bellard, et al.

configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --enable-shared --disable-static

libavutil version: 49.6.0

libavcodec version: 51.50.0

libavformat version: 52.7.0

libavdevice version: 52.0.0

built on Oct 3 2008 22:41:23, gcc: 4.3.2

Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (24000/1001)

Input #0, avi, from 'monk.716.hdtv-0tv.avi':

Duration: 00:41:53.1, start: 0.000000, bitrate: 1167 kb/s

Stream #0.0: Video: mpeg2video, 624x352 [PAR 1:1 DAR 39:22], 23.98 tb(r)

Stream #0.1: Audio: mp3, 48000 Hz, stereo, 160 kb/s

Cannot allocate temp picture, check pix fmt

And it's not just that one file.... Any ideas?

Comment by skibrianski 296 weeks and 4 days ago
ffmpeg -formats 2>&1 | grep 3gp

E 3gp 3GP format

D mov,mp4,m4a,3gp,3g2,mj2 QuickTime/MPEG-4/Motion JPEG 2000 format

E stands for encode D for decode

is this supported on your system?

Comment by TheBunman 295 weeks and 5 days ago

Your point of view

You must be signed in to comment.

Related sites and podcasts