Thursday, 11 November 2010

Concatenate two avi files

Just a quicky

I had two avi files from a *cough* friend and a single subtitle file from *cough* another friend and needed to splice the two avi files before applying subtitles.

Mencoder to the rescue:mencoder -oac copy -ovc copy -o out.avi in1.avi in2.aviProceed with subtitling as normal.

Wednesday, 2 June 2010

Fun with find

I found (ha) myself with a sticky problem. I had a directory tree of mp3 files that I wanted to play in directory order and filename order within the directories. From the outset, it seemed a trivial enough problem: use find and exec and off you go.

Except some of the files had spaces in them, meaning that I had to use the -print0 arg which then meant that I had to wrap the output in quotes, replace the NULL char with a \n char before I could finally pass it on to sort and xargs.

After much scratching of head, I came up with this:find -type f -print0 | xargs -0 printf "\"%s\"\n"| sort
"./01/01 Track.mp3"
"./01/02 Track.mp3"
"./01/03 Track.mp3"
"./01/04 Track.mp3"
"./01/05 Track.mp3"
"./01/06 Track.mp3"
"./01/07 Track.mp3"
"./01/09 Track.mp3"
"./02/01 Track.mp3"

Which sorts by directory and file. Simply pipe to what ever it is you want do with it. Eg:

find -type f -print0 | xargs -0 printf "\"%s\"\n"| sort | xargs mplayer

Further reading on similar issues and different approaches can be found here on the unixjunkie blog.

man find, man xargs and man printf are also your friend.

Thursday, 27 May 2010

TMS Widget

[Off Topic]

Ah, summer is here and Aggers has just mentioned that there is a TMS Widget "whatever one of those is".

Well, here it is...

BBC iPlayer beta

I eagerly downloaded the new beta version of the BBC iPlayer in the hope that they will have allowed the rendering and placement of system menus (minimize maximize) el al to be controlled by the operating system.

As it happens, I have been using my Ubuntu desktop with a Mac OSX-like theme with these menus on the left-hand side for many years. I draw this to their attention because as from version 10.04 (Lucid Lynx) of Ubuntu the out-of-the-box settings for placement of these icons now matches mine.

At the tine of writing, not only does the iPlayer place these icons in the wrong place, but they use their own artwork for these icons too. FOR THE LOVE OF GOD, WHY? Please trust the operating system to do the job and don't presume that you know better. Because you don't.

This is what they should be doing on my system: (Tweetdeck another Adobe AIR application)

This is what they are doing:

Of the countless applications I have used, this is the only one that I have encountered that knows better than the window manager and puts the system menu buttons in the wrong place (for me).

Please, please fix this before you release this version into the wild as a little part of me dies every time I try to minimize your application.

Friday, 26 March 2010

Gwibber – some intial thoughts.

I started using Gwibber yesterday as an alternative to Tweetdeck. Tweetdeck is a lovely app but getting AIR apps to run on 64 bit boxes requires effort and I keep losing the URL on how to do it properly. (I know)

Anyway as Canonical are pushing Gwibber, I thought I'd run it for a day and see how I got on. Here are some of my (constructive, I hope) comments.

Integration with the desktop

You can now tweet or update your statuses etc from the notification area. I'm sure that this sounds like a Good Thing in a meeting but the reality is you have a 20 character window in which to type or paste your pearls of wisdom. This, in itself, is bearable, but you would still have to remember which social networks you have enabled and which ones you have disabled - leaving you open to all kinds of inappropriate social interaction. It's not going to go away as a feature, but I would personally AVOID, AVOID, AVOID using it.

The must have integration feature that is missing is being able to dock Gwibber to the notification area. When new notifications arrive and are being acknowledged, the mouse pointer will be in that part of the screen anyway, so a quick click a few cm away would bring Gwibber to the fore making for happy users. Please implement.

Look and feel

It's harmless enough on the eyes. Some of the text takes up too much screen real estate and could be a little smaller. I notice that there are two themes installed from the get-go, so I am guessing that it will be skin-able to one's taste. I'll investigate further if I feel the need.


The Facebook feed Message filter is too noisy for me. Can you add a Status Update notification filter as well as the Message filter too? It is in the Facebook API.

I do not have an imax for a screen nor is my monitor spotless nor is my eyesight perfect

Can you really tell which one of these accounts is enabled and which is disabled at a quick glance? Really? Good for you. Srsly, can you overlay a red cross or something over the disabled accounts?

Tuesday, 16 March 2010

UK only tor exit nodes

In light of last night's Panorama I thought that I'd investigate setting up onion routing to only exit in UK exit nodes so that I could enjoy UK-centric content with the benefit of a degree of anonymity.


Is very simple for debian-type systems. Simply follow the instructions here.

Configuration for UK only exit nodes:

Edit file /etc/tor/torrc and insert these lines at the end.ExitNodes {GB}
StrictExitNodes 1
NumEntryGuards 6
KeepalivePeriod 60
NewCircuitPeriod 15
Restart torsudo /etc/init.d/tor restartThat's it. It works like a charm.

Wednesday, 10 February 2010

ksplice means never having to reboot

Honestly, I can live with reboots on my home server when a new kernel is applied, but I can see its appeal in more demanding environments. The good people from kspice have written a utility that manages to apply kernel patches in situ meaning that you don't need to reboot when patches are applied. As it is free for Ubuntu 9.10, I thought I'd install it on my server and see how it gets on.

Download and install instructions are here and are a piece of cake.

10/10 for simplicity and I'll be interested to see how it goes.

My uptime, such as it is, can be monitored here.

I see that howtoforge have added a article for this. If you like pointy-clicky instructions, then this is the article for you.

Playing MP3 files with amarok

It has been ages since I have done a fresh OS install and I had forgotten that Amarok needs a little encouragement in order to play mp3 files.

So, for future reference:

sudo apt-get install libxine1-ffmpeg
At the time of writing, Ubuntu version was 9.10.