Menu

Sunday, 22 March 2009

I've been wanting a way to use playlists on my media center either from within MythTV or with any other player. The reason is I have a bunch of short videos (music and documentaries) that I'd like to be able to play consecutively.

It turns out to be a case of just RTFM. You can create playlists for MPlayer from directory listings, and then associate playlists with a particular mplayer command.

To generate the playlist from all files in a directory, I use the following:

dir * | sed 's/\\//g' > all_videos.pls

The sed part of this command removes the \ from escaped spaces... i.e. a file 'Hello world' is output from the dir command as 'Hello\ world' - the space is escaped. We need to generate a file without these escaped spaces for it to work properly.

I use the following mplayer command associated with the pls extension:

Saturday, 21 March 2009

I first installed my laptop with Ubuntu 8.04, and later upgraded to 8.10. After the upgrade I noticed that hibernate no longer worked, and I think (from memory) I found an error message saying something about not enough swap space. I briefly thought about trying to find out how to add more swap (I already had a 4G partition defined, and I've only got 2G ram) but then I swiftly moved on to other more pressing issues.

Well, just recently I fired up System Monitor to check on a process, and notice in the bottom right corner it said there was no swap space. Firing up 'top' confirmed this - my system had zero swap!

Tuesday, 17 March 2009

I'm getting closer to a podcatching solution with gpodder. Gpodder is a simple and easy to use podcatcher - and importantly, it can be invoked from the command line in a non-interactive mode. This is important because of my internet plan - I get twice as much download quota on off-peak times as I do on on-peak. So, I can shedule a cron job to fire gpodder up at 1am and download the latest podcasts. Great, because I'm not going to consume precious on-peak bandwidth.

Now that I've got the latest podcasts handy, I can listen to them on my media center using Amarok. This isn't the only option, but it works for me because the interface lets me 'group by album' - which is conveniently groups most podcasts - and display those added today/1 week/1 month/...

Amarok also lets me configure Xine to output to SPDIF - important, because my media center is only connected via SPDIF to my surround sound receiver. Without this option, I wouldn't be able to hear anything.

A little frustrating is that gpodder saves all of its files using hashes instead of human readable filenames (it looks like there may be a solution to this in the next release). This doesn't really matter if you use a media player that reads the mp3 tags - as most do, including Amarok - but I've been surprised by several podcasts that have no mp3 tags at all:

Another feature of gpodder that I appreciate is synchronization to media device OR filesystem. The filesystem synchronization means you can specify a directory to copy to and the filename format. This suits me well (although this doesn't seem to copy those files without mp3 tags).

Monday, 16 March 2009

A friend put me on to this blog post about extra repositories for Ubuntu. This is a great resource which highlights some great (and possibly essential) software that you should know about if you are running Ubuntu (and possibly any linux flavour).

Have a look, you may find some software listed there of interest to you. I didn't know about some of the items listed (eg GNOME Do) so its been a great resource for me.

I've got a Linux VPS through RimuHosting - I'm no system admin, and the root account gets a pile of email spam. This takes up disk space so I try to regularly delete it. The best way I've found is to us Mutt - a console based email reader.

Firing up Mutt as root displays the thousands of spam mails recieved. Pressing 'D' lets you delete messages that match a pattern. So I can specify the pattern 'a' and that matches almost all of the messages. When quitting the application, it deletes the marked messages.

So, this is a good solution for reading or deleting many emails without downloading them - if you have ssh access.

To avoid having to do this, can anyone tell me how to stop receiving these emails?

Saturday, 14 March 2009

I generally prefer Maven2, but I'm currently on a project using a custom ant build script - and I'm over having to type -Dskip.junit=true when I just want to generate a quick jar without running the tests.

To easily switch off tests, I modified ant.bat so that it looks for a command line parameter 'st' and if found, it will substitute it with -Dskip.junit=true.

In Ant 1.7.0, you just need to change line 68 in block ':setupArgs' from

Depositphotos

Get royalty-free images, photos, vectors, illustrations and videos from the best microstock - Depositphotos.

vsConsole

vsConsole is a tool for developers and testers which lets you easily tail log files on remote servers, monitor the status and version of applications deployed to your environments, and stay informed with broadcast messaging.
Learn more

SSD Cloud Servers‎

Built For Developers. Deploy An SSD Cloud Server In 55 Seconds.
Digital Ocean