- 31 Jan 2010 -

After futile searches and a lot of old pages, I finally found a linux screencast tool: recordmydesktop.

Using the synaptic package manager, I installed recordmydesktop.  Eventually I discovered that this was not the gui part of the program and installed gtk-recordmydesktop.

I’ve been very happy with the results.

This is in the babble category tagged as ,

Add a comment »

- 23 Jan 2010 -

Kenya seems to loathe alarm clocks. Ubuntu’s clock screen saver is sub-par, so I wrote a quick javascript clock to open in my browser and display all night long.

nightclock.html

After opening the file in your favorite browser you can press F11 to hide all the toolbars.

This is in the babble category tagged as , , ,

Add a comment »

I struggled with getting the mpeg2 movies from my JVC Everio HD camera into a smaller file and up onto a video sharing site with high quality.

My first attempt was with Handbrake. That converted the MOV to an MP4 very nicely. However, I wasn’t able to upload those to Blip.tv and have them convert successfully every time to an flv. Blip was timing out on the longer videos and poorly converting the smaller ones.

I then decided to try the command line ffmpeg. There weren’t any gui tools around it that I found in the repo’s, so I just tried the standard

ffmpeg -i inputfilename.mov outputfilename.flv

but that did not work. Apparently JVC doesn’t put all the right properties into the mpg2 for ffmpeg to automatically pick up the properties because I kept getting a Floating point exception.

I assumed I needed to just manually set the full command with all the different video and audio settings, but I didn’t know what those should be.

After a bit more googling I found winff. From that app I copied the command line arguments over, tweaked them a bit, and came out with this:

ffmpeg -i INPUTFILENAME.mov -vcodec libx264 -deinterlace -vpre hq -crf 22 -r 29.97 -s 960×540 -aspect 16:9 -bf 2 -b 2000kb -ac 1 -ar 22050 -ab 96k OUTPUTFILENAME.flv

The trick is to use the libx264 codec instead of the flv one. After uploading these converted movies to Blip.tv I was pleased with the results.

This is in the babble category tagged as , , , , , , ,

Add a comment »

We have well over 50 million rows in our obs table. Using the simple “update obs set uuid = uuid() where uuid is null” would bomb out with a “The total number of locks exceeds the lock table size” error.

I ran this for a few hours to get through all rows. (Note that it overwrites any uuids that are currently there)

Copy this into a sql script and run it with “source” in mysql at command line.

drop procedure update_uuids;
delimiter //
create procedure update_uuids() begin
set @max = (select max(obs_id) from obs);
set @x = 1;
repeat
set @y = @x + 100000;
update obs set uuid = uuid() where obs_id >=@x and obs_id <@y; set @x = @y; until @x > @max
end repeat;
end
//
delimiter ;
call update_uuids();

This is in the openmrs category tagged as , , ,

2 comments »

A programmer here at AMPATH (Gilbert Tuwei) had some issues installing mysql. The error message was very unhelpful and the solution was equally puzzling, so I want to put here to for the mighty google to find.

Tuwei was running v5.0.17 of MySQL. Upgrading to version 5.1.31 made the problem disappear.

WARN – InitializationFilter$InitializationCompletion$1.run(823) |2009-10-02 15:24:21,000| Error while trying to update to the latest database version
org.openmrs.util.DatabaseUpdateException: There was an error while updating the database to the latest. file: liquibase-update-to-latest.xml. Error: Migration failed for change set liquibase-update-to-latest.xml::2::upul:
Reason:
java.sql.SQLException: Can’t create/write to file ‘C:\WINDOWS\TEMP\#sql_fe4_0.MYI’ (Errcode: 17):
Caused By: Precondition Error
at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:145)
at org.openmrs.web.filter.initialization.InitializationFilter$InitializationCompletion$1.run(InitializationFilter.java:817)
at java.lang.Thread.run(Unknown Source)
Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase-update-to-latest.xml::2::upul:
Reason:
java.sql.SQLException: Can’t create/write to file ‘C:\WINDOWS\TEMP\#sql_fe4_0.MYI’ (Errcode: 17):
Caused By: Precondition Error
at liquibase.ChangeSet.execute(ChangeSet.java:204)
at liquibase.parser.visitor.UpdateVisitor.visit(UpdateVisitor.java:26)
at org.openmrs.util.DatabaseUpdater$1OpenmrsUpdateVisitor.visit(DatabaseUpdater.java:177)
at liquibase.parser.ChangeLogIterator.run(ChangeLogIterator.java:41)
at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:201)
at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:142)
… 2 more
Caused by: liquibase.exception.PreconditionErrorException: Precondition Error
at liquibase.preconditions.ForeignKeyExistsPrecondition.check(ForeignKeyExistsPrecondition.java:36)
at liquibase.preconditions.NotPrecondition.check(NotPrecondition.java:18)
at liquibase.preconditions.AndPrecondition.check(AndPrecondition.java:21)
at liquibase.ChangeSet.execute(ChangeSet.java:169)
… 7 more

This is in the babble category tagged as , , ,

Add a comment »

« Previous Entries Next Entries »