Monday, December 7, 2009

Audiobook as a podcast

Audiobooks have several specific features that differentiate them from bunch of songs and make it hard to listen to them using regular audio player:
* They can have the same title/album/artist headers, with filename the only difference.
* They must be in certain order.
* Once an audio file was listened to, it can be automatically safely deleted, thus freeing up space.

This makes audiobooks fit nicely into podcasts model.

To convert audiobooks into a podcast I wrote a python script that scans given directory of mp3 files and creates RSS feed out of the files. The verion 0.1 of the script can be downloaded from abook2podcast.

Monday, February 16, 2009

bittorrent and VoIP in the same sentence

At my home I have an modest ADSL line with a standard 128kbits upload. The upload is shared between several computers, an bittorrent process and asterisk (VoIP) server. I have looked around for an simple script to balance the upload according to set of very simple rules:
  • VoIP packets go out first, no matter what
  • ssh, www, smtp, etc go after
  • everything else (including bittorrent) go last
After many fruitless hours of trying I have found a sample script at and then heavily modified it.
There are only two lines in the script to change. You should be aware of following assumptions in the script however:
  • The machine serves as the gateway for your network
  • Internet is established using autodialer on interface ppp0
  • asterisk runs on the same machine as the shaper
As a result, the VoIP is hitchless, even in presence of unlimited bittorrent upload.

You can download my script here.