Keys for Kino#
Mon, 04 Dec 2006 23:17:56 +0000
I've just been sorting out some photos for the LFNS site based on bits of video I took on Sunday. Quality is not great, but it never will be given that the camera takes interlaced images.
Anywaym the reason I remark on this is mostly to whine about how the traditional virtue of Unix - scriptability - seems to have been thrown out with the bathwater in this brave new user-friendly world. For each frame I want to save from Kino, I have to
- find it
- click on the "save still" button
- move the mouse to the filename requester
- type a suitable name
- hit 'OK'
For upwards of 50 frames, this is tedious, and there's no apparent way of automating it without hacking the Kino source directly. And as it uses the Xvideo extension, ordinary window grabbing utilities like xwd don't work either.
So I, uh, hacked the Kino source directly. First the .glade file to add a C-A-s keyboard accelerator to the "save still" button, then the C++ source to bypass the file requester and use a hardcoded pathname. Great, now I have a fork of the wretched application...
Index: src/kino_common.cc =================================================================== RCS file: /cvsroot/kino/kino/src/kino_common.cc,v retrieving revision 1.114 diff -u -r1.114 kino_common.cc --- src/kino_common.cc 17 Oct 2006 07:31:17 -0000 1.114 +++ src/kino_common.cc 4 Dec 2006 23:04:54 -0000 @@ -930,9 +931,10 @@ } else { - char * filename = common->getFileToSave( _( "Save Still Frame" ) ); - if ( filename && strcmp( filename, "" ) ) - common->saveFrame( common->g_currentFrame, filename ); + char * filename;// = common->getFileToSave( _( "Save Still Frame" ) ); + filename=tempFileName; + sprintf(filename,"/tmp/kino_still_%d.png", common->g_currentFrame); + common->saveFrame( common->g_currentFrame, filename ); } }
Output at http://www.lfns.co.uk/route.php/20061203/1 - see, told you the quality wasn't that good.