Search This Blog

Saturday, April 10, 2010

How to Restart a Unresponsive Linux System with Reisub


It may sometime happen that our Linux system hangs completely and the only option available is to shut down the system via the power button.

The power button to reboot could cause a problem if your hard drive is still being written to, and usually causes more problems than it solves. The Linux kernel includes a secret method of restarting your PC

 * Hold down the Alt and SysRq (Print Screen) keys.
 * While holding those down, type the following in order: REISUB
Alt + PrintScreen + r + s + e + i + u + b
 * With above key combination your frozen Linux system will go for a reboot.

Here is what the individual keys do in that sequence
R:Switch the keyboard from raw mode to XLATE mode
E:Send the SIGTERM signal to all processes except init
 I:Send the SIGKILL signal to all processes except init
S:Sync all mounted filesystems
U:Remount all mounted filesystems in read-only mode
B:Immediately reboot the system, without unmounting partitions or syncing

How to Extract Audio from Video file using ffmpeg


FFmpeg is a complete solution to record, convert and stream audio and video. It is a command line tool to convert one video file format to another. It also supports grabbing and encoding in real time from a TV card. Several FrontEnds/GUIs available like WinFF, Super, Avanti, AutoFF, Xpegt, GVC.

You can easily extract audio from video files such as avi, mpg, even flv into mp3 uses ffmpeg. You can even record online stream into mp3, such as stream from radio cast.

The audio component can be extracted to an mp3 using floowing command (from the command line Terminal). (This will work for any type of video file, not just Flash.)
ffmpeg -i video.flv -ab 160k -ac 2 -ar 44100 -vn audio.mp3
-i indicates the input
-ab indicates the bit rate (in this example 160kb/sec)
-vn means no video ouput
-ac 2 means 2 channels
-ar 44100 indicates the sampling frequency.