Tuesday, September 16, 2008

Audio Boost using MPlayer

I often felt pissed off when my friends used VLC and others programs for software level volume amplification, so I searched for a similar kind in mplayer and guess what! It was already there in mplayer since ages. You just need to RTFM.

Syntax :

mplayer -af volume=20:0 mediafile
Would amplify the sound by 20dB and hard-clip if the sound level is too high

Reference ( man pages of mplayer ) :

AUDIO FILTERS
Audio filters allow you to modify the audio stream and its properties. The syntax is:

-af <filter1[=parameter1:parameter2:...],filter2,...>
Setup a chain of audio filters.

NOTE: To get a full list of available audio filters, see -af help.

volume[=v[:sc]]
Implements software volume control. Use this filter with cau‐
tion since it can reduce the signal to noise ratio of the sound.
In most cases it is best to set the level for the PCM sound to
max, leave this filter out and control the output level to your
speakers with the master volume control of the mixer. In case
your sound card has a digital PCM mixer instead of an analog
one, and you hear distortion, use the MASTER mixer instead. If
there is an external amplifier connected to the computer (this
is almost always the case), the noise level can be minimized by
adjusting the master level and the volume knob on the amplifier
until the hissing noise in the background is gone.
This filter has a second feature: It measures the overall maxi‐
mum sound level and prints out that level when MPlayer exits.
This volume estimate can be used for setting the sound level in
MEncoder such that the maximum dynamic range is utilized.
NOTE: This filter is not reentrant and can therefore only be en‐
abled once for every audio stream.
<v>
Sets the desired gain in dB for all channels in the
stream from -200dB to +60dB, where -200dB mutes the
sound completely and +60dB equals a gain of 1000 (de‐
fault: 0).
<sc>
Turns soft clipping on (1) or off (0). Soft-clipping
can make the sound more smooth if very high volume lev‐
els are used. Enable this option if the dynamic range
of the loudspeakers is very low.
WARNING: This feature creates distortion and should be
considered a last resort.


Enjoy your home theater ... :)

Wednesday, July 30, 2008

Ubuntu getting slow....

The day I installed Ubuntu and the day after few upgrades.. I noticed drastic decrease in speed. I thought the problem was with my user, so I deleted the configuration files within my ~/ folder many times but never got a preferred result. Nautilus took 10-20 sec to just open, furthermore my gnutop went indiscoverable in my Hostel's LAN Server and I was receiving error messages after login. The symptom which took me towards the solution to this problem was, I got this message everytime I used sudo :
sudo: unable to resolve host HOSTNAME
After a bit of googling I found that it was already reported : Bug #195308.

Here is the solution (if it ever happens to you):
  • Open Terminal
  • Edit your /etc/hosts file
    sudo vim /etc/hosts

  • There replace :
    127.0.1.1 hostname.domainname
    with
    127.0.1.1 hostname

    Example in my case:
    Hostname : gnutop
    Domainname: workgroup

  • Save and Exit

This worked for me as a charm and thought of removing Ubuntu remained a thought.. now Ubuntu is as fast as ever.

Grab your IP

Often you need to know your IP, particularly when your are connected by DCHP kinda connection. So here are some handy tips :

CLI
  • Displaying the current config for all NIC's :
    $ ifconfig

  • Displaying the current config for a particular device :
    $ ifconfig device
    Example:
    $ ifconfig ppp0

  • For knowing your IP via which you are accessing WWW:
    $ ifconfig  | grep 'P-t-P' | cut -d: -f2 | awk {'print $1'}
    OR
    $ wget -q -O- http://www.whatismyip.com/automation/n09230945.asp
    Here we are taking the help of http://www.whatismyip.com/

  • Additional Jobs:

    Display the kernel’s IPv4 network neighbour cache:
    $ arp

    Display the kernel’s IP routing tables
    $ route

    Pinging:
    $ ping IP addr
    Example:
    $ ping 192.169.25.15


There are many more tools for advanced usage like nmap and others, but these are the basics.

SOURCE

Thursday, July 24, 2008

LAN Messenger

Today I was searching for a LAN messaging client on my Ubuntu box, so after a bit of googling I turned to Pidgin. I searched if it was possible to configure Pidgin as a LAN Messenger and out of my surprise it was simpler than I ever thought of. Here's how:

1> Open Pidgin

2> Then Navigate to Accounts > Manage > Add

3> Select Bonjour

4> Fill the other details as per your choice.

5> Do the same setting in other nodes and enjoying offline chat

Pidgin is a Crossplatform Mutliprotocol Instant Messaging client, so it doesn't matters if you are in Windows or Linux. The only thing that may matter is it comes preloaded in most of the present Linux Distros where as you have to install it in Windows.