Archive for the ‘Linux’ Category

10 Songbird add-ons for a better audio player

Posted on the June 20th, 2009 under Linux by Administrator

Slowly but steadily, Mozilla grew into more areas of interest than someone could have previously imagined. , Thunderbird, Instabird for instant messaging and… Songbird. The latter is a promising audio application some of you might have gotten yourselves accustomed to. The 1.0.0 release launched in the first days of December delivers an impressive arsenal ranging from themes to add-ons.

Just like in ’s case, these add-ons extend the application’s possibilities beyond the original intent. Here are ten such extensions you might find interesting.

Song status message

Don’t let yourself be deceived by the name. LiveTwitter does more than publishing your song preferences to Twitter. It can also display the currently playing song in MSN/Windows Live Messenger, Pidgin, Mercury or any other IM application that can take an input from a plain text file. It lets you customize the text displayed in front of the song name and artist title, but sadly, these two ID tags are the only ones it can display.

Lyrics display

LyricMaster is a must for anyone that keeps his audio player opened all day long. There are two sites from which it can pull lyrics from, namely lyricsplugin.com and lyricwiki.com. One feature this add-on offers is the scanning of the entire library, action which gathers lyrics for all your songs at once. LyricMaster can automatically save the lyrics it grabs or it can prompt you to do so. It also features eight different display styles for the text and background.

iTunes-like cover flow

If you ever wanted to make your Songbird look just like iTunes, grab one of the existing feathers (themes) that look like they were made by and install MediaFlow. The addon offers an animated cover browser for your music library, allowing you to set the number of maximum covers to be displayed and the choice to show or hide their reflection.

Automatic album art

You’ll need this one too. The default album cover display in Songbird does not fetch images automatically. But the Last.fm Album Art add-on does. Just publish it in place of the old album display extension and it will grab the images from Last.fm. It works surprisingly well, as it caught album covers for some underground bands I didn’t think the has ever heard of.

Song information

When you’re running Songbird minimized and on shuffle, you might want to know the name of the song currently booming in your headphones. With Notify Me, a notification system for Songbird, a popup will appear in the lower-right corner of your whenever a song changes. It displays the song title, artist name, song duration and the song rating. Sadly, there nothing to customize about Notify Me. You use it as it is.

Another useful add-on is called mashTape. It offers a compendium of information for the currently playing artist: bio, discography, news, photos and even videos from YouTube and Yahoo! Music. The links to the discography’s albums lead to the Amazon.com online store, just in case you decide to buy one of them. News are gathered from all over the and displayed in a separate tab. You can narrow the displayed search results by choosing a specific site from the plugin’s configuration window (MTV Music News or Digg are good choices here). The third tab shows images related to the band and grabbed from Flickr or SmugMug. This doesn’t always work as it should because while playing a band called Nile and expecting pictures from concerts, you’ll get images from Egypt. Still, with well-known bands like Nine Inch Nails, the search results will be radically different.

mashTape can be further extended with providers that can display news feeds (like the Delicious mashTape Provider) or additional sources (MTV Music Video mashTape Provider and the excellent Vimeo mashTape Provider).

Similar artists

Every software audio player should have a way to display similar artists. A simple feature like this can make you dig deeper in the genres you like and discover band names you’ll later inscribe your t-shirts with. Music Recommendations is simple, yet effective. It displays a short info on the currently playing artist and offers a list of band names that come the closest to his style. If you click the small thumbnails on the left of these names, you’ll be taken to the band’s Last.fm page.

Audio shares

If you have DAAP shares in your local network you might want to install Daap Client. You can access the share by typing the device’s IP in the Songbird address bar using the daap:// protocol. For example, if you run an iTunes server you can use daap://192.168.1.2:3689 to connect to it and access the songs it hosts. The configuration window of the addon can let you specify which ones of the available 28 song columns Songbird will display: name, artist, album, genre, sample rate and so on.

Find that song

SongTapper is interesting. If you ever want to hear a certain song but can’t really pinpoint the song’s name, you can start tapping it’s rhythm from memory. Activate the plugin, click the link it displays and start tapping the melody using your spacebar. When finished, click the link again and you’ll be taken to an online list of song names that match your “morse code”. Hopefully, what you’ve been searching for will be listed there.

Instant messaging

The SamePlace extension is known to many from where it enables one to connect to a variety of instant messaging services directly from the browser’s interface. Since Songbird is also the brainchild of Mozilla, the SamePlace add-on is available for the music player. You can configure it to appear in any of the display panes and it works the same as it does in Flock, Thunderbird or : login through the Account Manager in your GoogleTalk, Jabber, Twitter, AIM, MSN or SamePlace account and start chatting while inspecting your playlist.

But there’s more

As you can see, Songbird can evolve into more than an audio player or a browser. Most add-ons on the Songbird site don’t work with the latest version of the audio player and it will take some time for the developers to port them all. Some of these are very useful and it would be a shame not to make them available by the time the final release hits the .

Linux video conversion using mencoder

Posted on the June 20th, 2009 under Linux by Administrator

Besides being a great player, MPlayer also comes with a great utility for converting files to different formats. You can use mencoder via the command line or in conjunction with one of the many user interfaces available for it, but CLI has obvious advantages over a predefined GUI because of the options it gives the user. I can’t think of a single filetype that mencoder couldn’t convert for me when I needed it. I used to launch mencoder strings years ago when I needed movies that would play nicely on my PocketPC, now I use it to convert movies for my iPod Touch or simply convert a YouTube from Flash to something playable with any player.

Be it MPEG/VOB, AVI, ASF/WMA/WMV, RM, QT/MOV/MP4, Ogg/OGM, MKV, VIVO, FLI or FLV, mencoder can turn it into something else, resize it, amplify the volume, compress the part or append it to a second one. Let’s see what mencoder can do with a few simple options.

mencoder .mpg -o .avi -ovc lavc -oac lavc

The above command will turn a MPG file into an AVI file. The -ovc and -oac options represent the and audio codecs you can use. To find out what codecs you can currently use, do a

mencoder -ovc help

for and a

mencoder -oac helpfor the audio part.For example, the first command will output information about the available codecs:

cypress@brunner:~$ mencoder -ovc helpMEncoder 2:1.0~rc2-0ubuntu17 (C) 2000-2007 MPlayer TeamCPU: Genuine (R) CPU T2400 @ 1.83GHz (Family: 6, Model: 14, Stepping: 8)CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1Compiled with runtime CPU detection.Available codecs: copy – frame copy, without re-encoding. Doesn’t work with filters. frameno – special audio-only file for 3-pass encoding, see DOCS. raw – uncompressed . Use fourcc option to set format explicitly. nuv – nuppel lavc – libavcodec codecs – best quality! vfw – VfW DLLs, read DOCS/HTML/en/encoding-guide.html. qtvideo – QuickTime DLLs, currently only SVQ1/3 are supported. libdv – DV encoding with libdv v0.9.5 xvid – XviD encoding x264 – H.264 encodingSimilarly, the audio codecs available on my system are as follows:Available codecs: copy – frame copy, without re-encoding (useful for AC3) pcm – uncompressed PCM audio mp3lame – cbr/abr/vbr MP3 using libmp3lame lavc – FFmpeg audio encoder (MP2, AC3, …) faac – FAAC AAC audio encoder

Great! So I can create an XviD file with an MP3 audio track, which is what most people would probably need. But what if i need uncompressed audio instead of MP3? Then I’d use

mencoder file.mpg -o file.avi -ovc lavc -oac lavc -lavcopts acodec=pcm

Returning to compressed audio, you can even specify the audio bitrate by using the abitrate option:

mencoder file.mpg -o file.avi -ovc lavc -oac lavc -lavcopts acodec=libmp3lame:abitrate=128

Mencoder can also output VBR (Variable BitRate):

mencoder file -o file.avi -ovc lavc -oac mp3lame -lameopts vbr=2:q=3

(where q can be any number between 0 and 9)Same goes for the part:

mencoder file.mpg -o file.avi -ovc lavc -oac lavc -lavcopts acodec=libmp3lame:abitrate=128 vcodec=xvid

If you do not wish to compress the part, use vcodec=copy and the frames will simply be copied piece by piece from the source file. If you’d rather wish to adjust the quality of the part, use the bitrate option:

mencoder -ovc xvid -oac mp3lame -xvidencopts bitrate=878 -o destination_file.avi source_file.avi

The higher the bitrate, the bigger the resulting file and better the quality. To mantain quality and still obtain a smaller file size, use the two-pass mode:

mencoder dvd:// -oac mp3lame -ovc xvid -xvidencopts pass=1 -o /dev/nullmencoder dvd:// -oac mp3lame -ovc xvid -xvidencopts pass=2:bitrate=800 -o file.avi

Adjust the bitrate part to your liking. When wishing to convert a movie DVD to a standard 700MB AVI file, I’d use

mencoder dvd:// -ovc xvid -oac mp3lame -xvidencopts bitrate=-700000 -o file.avi

This will put your CPU to the test and you cand go and have a beer until it finishes because you won’t be able to do anything else on your computer while this is running. A workaround would be to use a niceness level for the process to be able at least to read some e-mails or browse the :

nice -n 19 mencoder dvd:// -ovc xvid -oac mp3lame -xvidencopts bitrate=-700000 -o file.aviWhat else can you do with mencoder?

Answer: a lot of things. Let’s say you have a bunch of JPG files laying around in a folder and would like – for whatever reason – to join them into an AVI file with a framerate of 24. One command you could use would be

mencoder “mf://*.jpg” -mf fps=24 -o file.avi

Or maybe you’d like to append multiple files one unto another. Just rename them accordingly so that they follow the order you wish them to be displayed in and do a simple

mencoder * -o output.avi

in the directory that contains them.If you want to create a presentation with a custom soundtrack, just put the file and an MP3 file in the same directory and do a

mencoder source_video.avi -o destination_video.avi -ovc copy -oac copy -audiofile audio_file.mp3

Mencoder helped me a lot with converting files for the 320×240 screen of PocketPC devices. For example, if I wanted the resulting to expand upon the entire screen, i would do a

mencoder -oac mp3lame -lameopts mode=3:preset=24 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=384:keyint=250 -vop expand=”320:240″ -o output.avi input.avi

If I wanted the movie to constrain proportions the command I would use would be

mencoder input.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=200:abitrate=48 -vop scale=320:240 -oac copy -o output.avi

With mencoder you can even record what your plugged-in webcam is “seeing”:

mencoder tv:// -tv driver=v4l:device=/dev/video0:width=640:height=480:forceaudio -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:acodec=mp3 -ffourcc divx -o test.avi

Too sleepy tonight but still want to catch that show you love? Record it for later with mencoder and your TVtuner card:

mencoder tv:// -v -tv driver=v4l:width=720:height=576:input=1:device=/dev/video0:immediatemode=0: /alsa:adevice=hw.0,0:outfm t=yv12 -o resulting_file.avi -af volume=10:0 -ovc lavc -lavcopts vcodec=mjpeg:aspect=4/3 -aspect 4:3 -oac pcm -endpos 02:00:00

The command above will keep recording for two hours then save the file.

Conclusion

As you can see, mencoder is ’s multimedia army knife. The resulting output of a file depends only on how well you used mencoder’s options and the possibilities for scripting are endless. Just imagine how much a company would gain to have detailed records of their office cameras by using just a dozen cheap webcams and an old PC running as a mencoder server.

If the command line has no appeal to you, try one of the following graphical interfaces that use mencoder as a base:

Extend Gedit with amazing plugins

Posted on the June 20th, 2009 under Linux by Administrator

Gedit is one of the most widely-used GUI text editors available in . Every GNOME user resorts to using Gedit if not working in the command line because the editor is not only fast, but also extensible via a series of plugins. This article discusses some of the most useful such plugins and how they can make your text editing easier.

Gedit already comes with a dozen preinstalled plugins that provide the user with document statistics, a Python console and tools to format and sort batches of text. From the GNOME.org website we can download other such extensions that we simply copy in the ~/.gnome2/gedit/plugins/ directory.

The Gedit plugins window

Text formatting

The Align plugin alows one to group selected text into columns just like you would do in OpenOffice.org Write or other advanced text editor. You can even set a background color for the text with the intuitively-named Current Line Background Color plugin. If you have the GtkSourceCompletion library installed, you can use the Document Words Completion plugin to ease the way you write your text. The Word completion plugin does the same thing by popping up a small context menu that allows the user to chose the right word.

The word completion plugin

If you want to increase or decrease the line spacing of your text, it all can be done by installing the Line-spacing plugin.

General use

The Send To plugin can be particularly useful if you wish to quickly send a text file to someone via e-mail. It creates a new entry in the file menu, just below the Save As option. Would you like the session saver functionality from included in Gedit? No problem – use this plugin to restore the last used tabs automatically on startup.

The Grep plugin can be used to search for text not only in files, but also folders. One thing worth mentioning is that this plugin searches through files even if they weren’t saved yet. How about Multiple Copy/Paste Channels? You can chose what to paste by picking one of the ten channels that this plugin has to offer.

Code editing

Gedit is perfect for code editing, be it HTML, PHP, plain C or other scripting and programming languages. If you’re working in PHP, you can use a plugin to automatically strip whitespaces after ?> tags to reduce filesize. The Strict Tabulation plugin automatically sets tabulation to four spaces in PHP and Python and to two spaces in Ruby files.

There is a HTML export plugin that takes all the text you currently selected and exports it to a HTML file, ready to be uploaded to a server. The HTML Tidy plugin needs no introduction and it can be used to clean up your code while the Live HTML Timestamp plugin mimics a feature from XEmacs that inserts the time and date into a file every time the said file is being saved.

Webdesigners might find it interesting to know that Gedit has syntax highliting support and that there is a certain plugin that also displays Markdown previews in a bottom panel of Gedit’s window.

Developers working in Python can use the Run in Python plugin to execute their code with the locally installed Python interpreter or check their code with the Pylint plugin.

Did you know you can actually browse pages with the use of Gedit? With the help of this plugin, you can navigate the just as you would do in Dillo or . Since Gedit has support for tabs, you can read a webpage in one tab and write impressions in another for later use. There’s also a Browser Preview plugin for developers that shows the currently edited page directly into the browser of your choice.

Other plugins

Automatically inserting text has never been easier. Whenever you develop a website and need a block of text to preview the content area, you can try the Lorem ipsum plugin that automatically inserts the well-known latin text at the current cursor’s position. You can even use templates with Gedit and the New From Template plugin. Say you want a letter template formated one way and a code file formatted another way. If you’re working with lots of opened files at a time, you can easily differentiate between them by selecting a specific formatting for each of them.

Why use Nautilus when trying to get to the folder holding the file you’re currently editing? Try the Open Folder plugin that will get you there in no time. With Gedit you can group your files into projects, search text in files using regular expressions or indent your text the smart way.

The SplitView plugin allows the user to view two files at a time in the Gedit window and work on both of them without having to switch from one tab to another. There’s also a Gedit plugin that lets you organize you time as you see fit via the ToDo List plugin. If you and a friend want to edit a text together there’s no need to bounce e-mails back and forth between you. Use the Collaborate plugin that allows different users to edit the same file at the same time while saving the changes.

Conclusion

There are many ways to extend this simple text editor. started as a simple browser and during the years it turned out to be so much more. The same thing happens now with Gedit with the help of the above plugins. There’s a plugin for almost each use you could think of, and soon we might find that Gedit will have instant messaging capabilities or even e-mail client functionality embedded.