Archive for the ‘XBMC’ Category

Fixing the aspect ratio on Canon camcorder *.MOD files

Saturday, April 2nd, 2011

I have a Canon FS200 digital video camera which creates MOD files.  These are playable on Linux by simply changing the file extension to “mpg”.  The only issue is that the video displays in 4:3 aspect ratio, whereas it should be 16:9.

On many players, you can override the display aspect ratio during playback and then the files display correctly.  The problem is when you want to edit these files or create overlay text/graphics, as the editing program will process them in 4:3 ratio, and then when displayed in 16:9, the overlays will look stretched (while the video looks correct).

Although I have tried to solve this a number of ways, the actual fix is remarkably simple and fast.  The clue to this fix was in the error message “ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.“.  Searching in the mencoder man page for “vprp” provided the solution.  Mencoder has a command line option “-force-avi-aspect” that can be used with the “-ovc copy” option, so you don’t need to re-encode (and potentially loose quality).  As this is only updating the meta data in the file, the fix is almost instantaneous.

The following command will perform the fix:

mencoder -oac copy -ovc copy -force-avi-aspect 1.777 input-4_3.mpg -o output-16_9.mpg

Ubuntu upgrade breaks LIRC

Saturday, January 8th, 2011

I recently upgraded my Ubuntu 10.04/XBMC based media center box (not a dist. upgrade, just a sudo apt-get upgrade).  After the update finished, I realised that the remote control (StreamZap) wasn’t working any more.

Quickly scanning the relevant files (i.e. /etc/lirc/* and /dev/lirc*) didn’t show up any obvious issues.

It turns out, all that is required is to run the following reconfiguration on lirc:

sudo dpkg-reconfigure lirc

Select your appropriate control and (if this doesn’t fix everything) then reboot and the remote should be working again.

UPDATE:

Unfortunately this seems not to be a permanent fix.  After rebooting, more often than not, the remote is not working again.  Performing the step above does seem to fix it for the current boot though.

A bit of further research found this post.  The post explains, that when the lirc_imon module is loaded (i.e visible when running an lsmod) the remote doesn’t work.  Performing the dpkg-reconfigure as stated above actually ends up removing the module lirc_imon – this is what actually fixes it.

So, to make the fix permant, you need to add lirc_imon to your modules blacklist.  The cleanest way to do this is to create another file called blacklist-lirc.conf in the /etc/modprobe.d/ directory with the following content:

blacklist lirc_imon

This will stop the module loading on boot, and your remote should remain working.