Archive for November 7th, 2009

get_iplayer - Command Line Downloader for BBC iplayer

Saturday, November 7th, 2009

get_iplayer

My favourite program of the moment which exceeds the delivery of the iPlayer on Windows in just about every way!

To get the best out of it, download the latest version (and everything else you need) from here, and also make sure you have the following installed to make the most of the features available:

flvstreamer
ffmpeg
mplayer

(If you must install on Windows, there is an installer which takes care of everything for you)

flvstreamer is especially useful for getting higher quality versions of programmes, but you may have to fiddle about with the location of the file and its permissions to get things working correctly.

Ok, here are the commands I use the most:

get_iplayer
(this gathers a full index of programmes available)

get_iplayer keyword
(gathers index but also finds matches for “keyword” of your choice, e.g. Dr Who or Casualty)

Running the two above will show you the index number for the programme. Use this as follows:

get_iplayer –info 123
(will provide detailed info about the programme, including the various versions and qualities available)

get_iplayer -get 123
(will download the default version, usually iPhone - mov quality)

get_iplayer -get 123 modes=flashhigh flvstreamer=’/usr/bin/flvstreamer’
(will download a higher quality version in mp4 format using flvstreamer, my binary is located in /usr/bin/)

Finally

get_iplayer –update
(simply checks for any updates to get_iplayer and installs them)

Further commands, help and information here

Dual Booting Karmic and Jaunty and then using grub-legacy

Saturday, November 7th, 2009

What a palava. Grub2 will become the defacto standard in time, but right now I am not quite ready to switch over. Having installed Karmic to a separate partition, and chosen to install grub2 to the local root (not mbr) I could not chainload boot to karmic from grub legacy.

So, bootedup the live cd again and installed Grub2 to the mbr. Instructions on how to do this can be found here.

OK, good. Boot up Karmic now, and run “sudo update-grub” in order to load up all the other OS’s into Grub2 menu.

While you are in Karmic, open up the grub.cfg file and copy out the boot menu info for Karmic (you will need this later to put into your grub-legacy menu.lst) Should look something like this:

“sudo nano /boot/grub/grub.cfg”

menuentry “Ubuntu, Linux 2.6.31-14-generic” {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,10)
search –no-floppy –fs-uuid –set b50237f3-c90c-4af6-a275-892a09165ea3
linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=b50237f3-c90c-4af6-a275-892a09165ea3 ro   quiet splash
initrd    /boot/initrd.img-2.6.31-14-generic

Now reboot, and you should be OK to boot back into Jaunty.

In Jaunty, open up menu.lst, and add the following entry to your “Other Operating Systems” section

title       Xubuntu Karmic Koala
uuid       b50237f3-c90c-4af6-a275-892a09165ea3
kernel    /vmlinuz root=UUID=b50237f3-c90c-4af6-a275-892a09165ea3 ro  quiet splash
initrd    /initrd.img
quiet

You’ll see why you needed the info from grub.cfg to insert the UUID information. This layout, I believe also has the benefit of coping with kernal updates to Karmic.

Save your menu.lst file, and reboot. You should now have an entry for Karmic and it should boot.  :)

HJSplit with Zenity (Thunar custom action)

Saturday, November 7th, 2009

Lots of large files come down split up into pieces using HJSplit. It’s a bit of a slog to do the joining manually, so here is a simple command line that solves the problem as a thunar custom action

java -jar /path_to/hjsplit_g.jar -c join -f %f

of course you need sun java installed  :)

Permanently Remove Files with Zenity (Thunar custom action)

Saturday, November 7th, 2009

 Have previously used xdialog for this, but it was time to update to zenity

zenity –question –width 640 –height 240 –title=”Permanently Remove Files” –text=”Are you sure you want to remove these files? \n\n %N”; if [ $? = 0 ] ; then rm -r %F ; else exit; fi

You do get a sanity check before you decide to delete, and of course, DON’T run this on /        :)

Terminal Fight solved by Zenity (Thunar Custom Actions)

Saturday, November 7th, 2009

Love my thunar custom actions, and all I wanted to do was run mediainfo against a media file to see how it was made etc. Trying to do this with just xfce4-terminal was a pita. This simple line throws the info up in a zenity info dialog:

mediainfo %f | zenity –width=640 –height=480 –text-info

Unfortunately you don’t get the nice alignment you get in a terminal but hey…