Click Technology

Linux, Windows, Mac it's all good

How do I downsize a Hi-Def movie?

August22

In Debian / Ubuntu, use avconv.

avconv -i input.mp4 -b 64k -s hd720 -strict experimental output.mp4

This command uses avconv, where..

-i input.mp4 = the input file name
-b 64k = down sample the audio channel to 64k – should be fine.
-s hd720 = reduce the video from hd1020 to the 720 format
-strict experimental = Allows mp4 output
output.mp4 = the output file.

If you haven’t got avconv installed, use

sudo apt-get install avconv

and follow instructions.

posted under Linux Tips | No Comments »

How do I quickly process photos for upload to the internet?

August21

In Linux, the easiest way to process images is using imagemagick. It is a command line program you can use to manipulate images very quickly. With it, you can scale images, adjust proportions, add watermarks and alot lot more.

These days, with photos from your camera tpyically of the order of 1.2 – 2.5MB in size, uploading them to the internet in bulk is the stuff of dreams, so better to scale them all down and then upload. Here’s how.

Step 1. Install imagemagick.

Open a terminal window using CTRL + ALT + T

Now, install imagemagik..

sudo apt-get install imagemagik

Now let’s try some examples…

First off, copy the photos you want to modify to a new folder, so you have the originals intact, otheriwse you will modify the originals. Bad idea.

We’ll call this folder /home/darth/pics in these examples.

Reduce the photo called hoth.jpg by 50%

mogrify -resize 50% /home/darth/pics/hoth.jpg

Scale the image to be 1024 pixels wide and whatever number of pixels high, scaled in proportion…

mogrify -resize 1024x /home/darth/pics/hoth.jpg

Scale the image to be 500 pixels high and whatever number of pixels wide, scaled in proportion…

mogrify -resize x500 /home/darth/pics/hoth.jpg

Strip the image of all exif data, so remove make and model of camera, GPS data, flash, shutter and aperture speed, etc. etc.

mogrify -strip /home/darth/pics/hoth.jpg

Do the whole freakin’ folder! (Rotate the photos as required, reize them to be 1024 pixels across the top and do that for all jpegs in the folders and subfolders in /home/darth/pics/deathstar

mogrify --auto-orient -strip -resize 1024x /home/darth/pics/deathstar/*/*.JPG

There are a bajillion more possibilities and commands and options in the suite. Check it out. http://www.imagemagick.org/script/command-line-tools.php

posted under Linux Tips | No Comments »

How do I change my MAC Address?

August13

In Ubuntu, just open a terminal window and install macchanger if needed..

sudo apt-get install macchanger

OK, now use macchanger..

sudo macchanger eth1 -r

This will change the wifi address, as your physical CAT 5 port is prolly eth0. The command above will change the MAC address to a random MAC address.

If you need to find out what the name of your ethernet ports are, including wireless, look no further…

sudo ifconfig

Sweet!

posted under Linux Tips | No Comments »

How do I renew my DHCP Address?

August13

In Ubuntu, just open a terminal window and type

sudo dhclient -r

That should drop (release) the address. To renew it…

sudo dhclient
Simples!
posted under Linux Tips | No Comments »

Display a .conf file without the comments

August8

Sometimes, when you get long .conf files wit long commentaries, it’s handy just to see the actual meat in the file. Here’S how, suing grep with a simple regular expression.

grep ^[^#] /etc/thefile.conf

You can also use…

cat /etc/thefile.conf | egrep -v "^\s*(#|$)") 
posted under Linux Tips | No Comments »

What CPU do I have?

June15

In Ubuntu, just open a terminal window and type

cat /proc/cpuinfo

Compare it here.

Simples!

posted under Linux Tips | No Comments »

This is my website for short blog posts and interesting materials that are noteworthy or have some handy-tip value.