Skip to main content

Posts

Showing posts from May, 2010

Find files of particular size

Use find with the size option. The size option takes one argument. -5000k means less than while +5000k means greater than 5MB. Examples - To find mp3 files of size < 5 MB $ find /mp3collection -name '*.mp3' -size -5000k To find file of size > 10MB $ find / -size +10000k To find file of size > 180MB but < 190 MB. For example if I want to find files for the Friends episodes in my hard disk which I know are approx. ~ 185MB. $ find / -size +180000k -and -190000k Practice - Guess what the following command does? $ find /mp3-collection -name 'Metallica*' -and -size +10000k For more , see http://www.codecoffee.com/tipsforlinux/articles/21.html

To increase volume of mp3 in Linux

To increase volume of mp3 in Linux install the lame package. To install lame first add the Medibuntu repos (https://help.ubuntu.com/community/Medibuntu) if it is already not added. Install lame as - $ sudo apt-get install build-essential checkinstall $ sudo aptitude install lame The volume of a mp3 can be adjusted by playing with the replaygain using the scale option. $ lame --scale 15 in.mp3 out.mp3 This command scales the audio from in.mp3 by 15 and saves it in the file out.mp3 . For more, see  http://linux.die.net/man/1/lame

Convert .flv to .mpg using ffmpeg

Using ffmpeg : libavcodec is a library containing all the FFmpeg audio/video encoders and decoders. Most codecs were developped from scratch to ensure best performances and high code reusability. libavformat is a library containing parsers and generators for all common audio/video formats. ffmpeg -i jokes.flv -ab 56 -ar 22050 -b 500 -s 320×240 jokes.mpg jokes.flv is the file you want to convert, so the name must be the same as the source file.You can name jokes.mpg whatever you want as long as it has the .mpg extension. -b bitrate: set the video bitrate in kbit/s (default = 200 kb/s) -ab bitrate: set the audio bitrate in kbit/s (default = 64) -ar sample rate: set the audio samplerate in Hz (default = 44100 Hz) -s size: set frame size. The format is WxH (default 160×128 ) Using mencoder : This might not work. To convert flv (flash video) files to AVI using open source mencoder. To perform the conversion, you just need to type : mencoder -oac copy -ovc lavc -o video.avi video.fl