PGTS PGTS Pty. Ltd.   ACN: 007 008 568

point Site Navigation

point Other Blog Threads



  Valid HTML 4.01 Transitional

   Download Kubuntu Today

   Ubuntu

   The Power Of KDE + Ubuntu






PGTS Humble Blog

Thread: Tips/Tricks For Programming etc

Author Image Gerry Patterson. The world's most humble blogger
Edited and endorsed by PGTS, Home of the world's most humble blogger

Buffering Audio Streams. Configuring Nautilus


Chronogical Blog Entries:



Date: Tue, 19 Apr 2011 15:23:28 +1000

The trend towards online content continues. Australian media organisations seem to be slow to catch on to this. However, an outstanding exception is the ABC, which has many quality online offerings. For example radio programs, which used to broadcast on AM and FM channels are now offered as digital streams or podcasts.

The podcast from Radio National are very good quality and well maintained. There is a large number of these available online from the RN webpage on abc.net.au, with an extensive back catalogue. I found the best way to listen to them was to download the mp3 files and store them for listening later, either on my desktop, or by transferring to a portable device. Also, the Unix utility wget is very handy in this regard, being simple to use and very robust (and restartable if a file is partially downloaded).

There are also very good quality music streams from RN, JJJ, DIG, DIG Jazz and DIG Country, which I would often use. These used to work very well in Amorok. Since Ubuntu version 10 I have been listening to them with VLC and/or Totem. I would save the URL (a digital stream from mp3media2.abc.net.au on port 8060) as an M3U playlist file. The M3U file format seems to have been widely adopted as a standard way of storing playlists.


Buffering Audio Streams.

However a few months ago, the ABC changed the way they stream their music. All the URLs were changed. Under the new regime there is support for Windows Media player and iTunes. All the streams seem to use only the HTTP port (80). DIG encourage listeners to use the player built in to the web interface. The web player works in Ubuntu with Firefox and Chrome, but the quality is not as good as the previous MP3 stream.

It is a shame that the ABC has devoted most of their attention to supporting the proprietary formats (WMP and iTunes). As both of these would be able to use the MP3 streams. They do still offer MP3 streams which now uses port 80. But the quality of these is poor, compared to what it used to be. I found that DIG had a bad case of the jitters.

I tried to tackle the problem in Totem. And I had limited success. But it did result in an improvement. In order to do this it is necessary to change the Totem configuration file, ~/.gconf/apps/totem/%gconf.xml. However you should not try to do this with a text editor unless you are really sure of what you are doing --- Or just enjoy tinkering around with things you don't fully understand in order to see how they work. The recommended way to alter the configuration in Ubuntu is to use the Gconf Editor.

To start the Gconf Editor just run the command gconf-editor. You can do this by entering the command from a "terminal" window or by pressing Alt-F2 and entering the command in the little window that pops up. When the editor starts up it will present you with a panel of gconf options which you can edit. Look for apps->totem->network-buffer-threshold. The value in this field is the amount of buffer in seconds. The default value seems to be 2 seconds. I found that I got an improvement by increasing this to 20 seconds.

However Kubuntu users will discover that Kubuntu, by default, does not have Gconf Editor installed -- Not all that surprising since the editor was originally built for the Gnome desktop -- There is a working copy in the repository. You can install it by entering the command:

	sudo apt-get install gconf-editor

It seems that if you use gconf-editor to modify Totem while it has a window open, the changes get held in a cache (most likely ~/.gconf/apps/gconf-editor/%gconf.xml) until you close Totem.

DIG still does skip occasionally However it is tolerable ... More or less like an old vinyl record which might skip every so often at a raucous party. I suspect that designers of Totem paid more attention to buffering video rather than audio.

Altering VLC proved a little more difficult. There is a package, mentioned in the man pages that come with VLC, called videolan-doc, which can be downloaded with APT. However information regarding configuration files is scant. In Kubuntu, there are two VLC configuration files. One of them at ~/.config/vlc/vlcrc seems to contain information that is most pertinent to the operation of VLC. The other one, ~/.kde/share/config/vlcrc, seems to configure the appearance of the initial VLC interface. Most of the options in ~/.config/vlc/vlcrc are commented out. It seems that the vlrc file in .config will be re-created with a default configuration if you remove it. The default config file will contain the following:

	qt-privacy-ask=0

If that variable is zero , the following screen will popup:

New VLC PNG
VLC First Use Screen.

It was difficult to find a complete explanation of the variables in the config file. I tried uncommenting the following line:

	#norm-buff-size=20
	---
	norm-buff-size=40
This seems to have improved things, but only marginally for DIG.


Configuring Nautilus.

Since I prefer to use the command line for most of my interactions with the operating system, I don't often use Nautilus, the default file manager for Ubuntu. A conversation with someone not too long ago, made me realise how little many average users know about Nautilus. I don't often use it myself and don't usually take time to explain how it can perform simple file management tasks.

If you are wondering what Nautilus is, it is the application that is launched in Ubuntu when you click on places.

New bookmarks can be added quite easily by going to the bookmarks selection on the top menu bar. You can choose "Add" and "Edit". Alternatively, bookmarks can easily be added using the GUI interface:

For example, let's suppose you have a folder called "statements" on your Desktop which you want in your places menu. Just start up Nautilus by choosing "places". And find the folder.

New VLC PNG
Select the folder by right-clicking.

The Nautilus screen will look something like the above screenshot. Grab the folder by left-clicking and holding the mouse.

New VLC PNG
Drag it to the places column.

The drag it to the places column on the left. And release it ...

New VLC PNG
Release it and the new bookmark is ready to use.

You will now find a new bookmark in your "places". Of course this doesn't have to be on your Desktop it can be any folder ... For example an obscure folder a long way down some tree on a shared drive. You can still edit and change the properties of the bookmark with the edit function in the Nautilus main window.

The best way to find out more about the capabilities of Nautilus is to click on the "help" option (see the above screen shot). There are a number of useful features. For example ... Nautilus is also easily configurable with scripts. For those of you who feel so inclined you could write a script which mounts some form of external device (e.g. a floppy drive, which these days is not very well-supported, since hardly anyone owns a floppy drive).

For details of writing scripts see this HOWTO page.

Sadly, this is probably an example of two user demographics that don't often intersect. The people who have the necessary skills to write a script wouldn't dream of doing it because the command line is much faster and more reliable. The people who want to use a GUI to do this, generally lack the necessary command line skills to write a script.


Other Blog Posts In This Thread:

Copyright     2011, Gerry Patterson. All Rights Reserved.