2010년 11월 21일 일요일

Mencoder - Examples.

//Xvid, 320:240 size.
mencoder input.avi -o output.avi \
-ovc xvid -xvidencopts bitrate=750 -ofps 24 -vf scale=320:240 \
-oac mp3lame -lameopts abr:br=160:vol=2

//Fixed Quality
mencoder input.avi -o output.avi \
-ovc xvid -xvidencopts fixed_quant=2 \
-oac mp3lame -lameopts abr:br=160:vol=2 \


//FLV
mencoder input.avi -o output.flv -of lavf \
-oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc \
-lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3

//Simple lavf codec.
mencoder input.avi -o output.avi -of lavf \
-ovc lavc -lavcopts vcodec=msmpeg4 \
-oac pcm \

//another example.
mencoder input.avi -o output.avi \
-of lavf \
-ovc lavc -lavcopts vcodec=wmv2 \
-oac mp3lame -lameopts abr:br=56 -srate 22050

2010년 11월 8일 월요일

How to: Linux delete or remove kernel

How to: Linux delete or remove kernel


A. Linux Kernel and related files are stored in following locations:
=> /boot - Stores actual kernel and related file such system man and initrd images,

=> /etc or /boot/grub - Stores grub.conf file (most distro use /boot/grub these days).

=> /iib/modules/KERNEL-VERSION/* - Linux device drivers (modules)




.deb based distro - Debian or Ubuntu Linux

Again find out all installed kernel version:
$ dpkg --list | grep kernel-image



Now remove kernel-image-2.4.27-2-386 with apt-get command itself:
# apt-get remove kernel-image-2.4.27-2-386
OR
$ sudo apt-get remove kernel-image-2.4.27-2-386


If you have custom compiled kernel you need to remove following files/dirs:

* /boot/vmlinuz*KERNEL-VERSION*
* /boot/initrd*KERNEL-VERSION*
* /boot/System-map*KERNEL-VERSION*
* /boot/config-*KERNEL-VERSION*
* /lib/modules/*KERNEL-VERSION*/

*update grub2
update-grub

Linux Ubuntu, Mint. Kernel Compile.

Removing kernel

 Build Kernel

if compiled and installed via make install, you will need to manually remove the following entries:
/boot/vmlinuz*KERNEL-VERSION*
/boot/initrd*KERNEL-VERSION*
/boot/System-map*KERNEL-VERSION*
/boot/config-*KERNEL-VERSION*
/lib/modules/*KERNEL-VERSION*/

Then update the grub configuration:
sudo update-grub2

If compiled via the Debian method, you can see the installed kernels with the following:
dpkg --list | grep kernel-image
And then unistall the desired kernel package with apt-get:
sudo apt-get remove kernel-image-your-kernel-image

 -----------------------




Compile an Ubuntu 9.04 Kernel

The purpose of this tutorial is to show you how to set up a kernel that is highly tuned for your CPU, in this case a Pentium 4 with hyperthreading for a workstation.

Caution: If you do something wrong..it happens…be sure to reboot and select an alternative kernel. You should always have several kernels in case of trouble. DO THIS ON A TEST MACHINE or make sure you have a good backup.

Step #1: Download and install the necessary tools.
Download the necessary tools so that you have everything ready.

# apt-get install kernel-package libncurses5-dev fakeroot wget bzip2

You must have the source available to create a new kernel.

# apt-get install linux-source

You must be in the /usr/src directory to work or copy the source,
linux-source-2.6.28.tar.bz2, to the directory you want to work in. Either move into the /usr/src directory to work or into the alternative directory you will make the build in.

# cd /usr/src

This directory will contain the necessary headers to build the kernel. These are the source files.

You need to unpack the source that was downloaded.

# bzip2 -d linux-source-2.6.28.tar.bz2
# tar xvf linux-source-2.6.28.tar

Now you should have a directory that looks like this:

linux-source-2.6.28

Create a symbolic link to this source directory and name it linux.

# ln -s linux-source-2.6.28 linux

Move into the directory, you can use the term linux as it is now a link to that folder.

# cd linux

The config file is a hidden file that has the configuration from the kernel that is installed. You will need to copy that because it has already determined your hardware devices.

# cp /boot/config-`uname -r` ./.config

When you copy this config file over, it is a file represents the hardware that the kernel discovered at boot and set up. It also reflects many default settings.

Step #2: Now the fun begins….

You are ready to start menuconfig which will allow you to choose your kernel specifics.

make menuconfig




This opens the menu to start configuration.

Here you see it detected the .config file.

Now work your way through the menus and make the selections that you want to add or subtract. For example, here KVM is changed from being a module to load to actually being made a part of the kernel. It has been unchecked so modular support will not be available, thus saving space in your kernel. The “*” indicates that it will be loaded into the kernel and an empty option means that no support for that option will be placed in the kernel.

If you know about your hardware you can increase your speed by making the kernel smaller by removing those modules that you do not need. It is important that you make changes slowly so that if you have problems you have fewer places to troubleshoot.

Once you have all of your modifications complete save the new .config file.

Run this command to clean up.

# make-kpkg clean

The next thing you want to do is create a kernel extension so that as you make kernels you are able to tell the versions apart. What I usually do is place my initials and a number so that I can keep track.

# fakeroot make-kpkg – -initrd – -append-to-version=-mw4 kernel_image kernel_headers

After –append-to-version= you write a string that will help you keep track of your kernel changes, it must begin with a minus (-) and must not contain whitespace.

This will take awhile. This can take 3-6 hours depending on your CPU and memory.

After the successful kernel build, you can find two .deb packages in the directory you built the kernel in. If you were located in the linux directory, look in the directory above for the two .deb packages.

Now you can install and create .deb files so you can take your kernel to another machine with similar hardware. Run these commands as root in order to install them into the boot directory and modify your /boot/grub/menu.lst.

# dpkg -i linux-image-2.6.28.9mw4_2.6.28.9mw4-10.00.Custom_i386.deb

# dpkg -i linux-headers-2.6.28.9mw4_2.6.28.9mw4-10.00.Custom_i386.deb


note: if you want to delete new kernel, after delete kernel update grub.,To update grub, use command in terminal.

# update-grub

2010년 11월 2일 화요일

Volume Control Icon. Ubuntu 10.04, 10.10

Volume Control/Icon is gone (Ubuntu 10.04)
E-mail Print
Ubuntu
Q. After installing Ubuntu 10.04 (Lucid), my volume control is missing. How can I get it back?

A. 1. Right-click on the panel where you'd like the volume controller to appear and select "Add to panel"
2. Choose "Indicator Applet" from the list and click on "Add" and you're done. The volume control should be back.


FOUND A WAY TO REMOVE THE MAIL ICON!!!
64 Saturday, 16 October 2010 17:07
yboris
https://answers.launchpad.net/ubuntu/+source/indicator-applet/+question/108636

Here is a workaround:
sudo apt-get remove indicator-messages indicator-me

sublime close without confirmation

  Close without confirm   Yes, you can just write a plugin to set the view as scratch and close it. Then create a keybinding for that c...