At A Glance Main Projects Tutorials Resume


There currently is no messenger. Manually, you can contact me via:
AIM: TecGumbo

Google Talk: palen1c at

Twitter: @Technogumbo

Quick No Hassle PlpgSQL Stored Procedure Debugging

Thur, 15 Mar 2018 21:52:51 EST

Of all of the open source databases; PostgreSQL has always been my favorite. I have used it on several projects, and it has always proven reliable. Recently, I have been working on increasingly complex stored procedures. During development, it can be difficult to determine error states. A quick way to print output that will be visible is to utilize the raise notice statement.
It works very similar to print statements in other programming languages. For example:

raise notice '% %', declared_variable_1, declared_variable_2;

Will print the values of declared_variable_1 and declared_variable_2.


How to Achieve Greater Than 4K Resolution Playback With HAP

Fri, 13 Oct 2017 21:51:51 EST

When working with public displays you often have to pull off non standard video playback. Examples include video walls, multi-monitor setups, and multi-projector displays. The challenges when working with these displays often revolves around flawless video playback at large resolutions and sync.

Flawless video playback starts to become very difficult (in 2017) at resolutions greater than 4K. Traditionally, the larger native resolution of a video, the more computing resources it takes to achieve playback. Many consumer playback codecs also fall short at larger resolutions. The most popular codec/format, H.264 does not currently support resolutions greater than 4096x2160. If you attempt to run resolutions larger than this on modern operating systems, you may see no playback at all.

The sync problem has to do with multiple devices playing back one video source in perfect synchronization. This is not a trivial task. When you reach the maximum amount of monitors/projectors one device can support, you have to utilize multiple independent devices to accomplish full playback. In 2017 If you also want to play back a video source larger than 4K, you often have to utilize more than one hardware device to do it due to the limitations outlined above.

A six by one array diagram.
Commercial off the shelf solutions often handle this by utilizing one device as a master and others pull time code or similar information from the master over a network to synchronize the other hardware playback devices. I feel for the engineers who had to program these solutions. They are very difficult. You have to throw out frames on some sources to stay in sync and guess as to actual synchronization. It is a very difficult balancing act. Commercial solutions I have worked with that utilize techniques similar to this are the popular Brightsign hardware playback devices, and solutions using Watchout. Both of these solutions can be very expensive depending on how big of a display you are creating.

I didn't even mention the complexity of producing video for multi-display setups. Often editors will produce one massive video, but then have to split it up into multiple regions for playback on the different devices.

Thinking outside the box regarding sync, resolution limits, and playback you can avoid the difficult synchronization problem if you can play back ultra high resolution on one device. In a recent project, we were able to pull off 11520px x 1080px playback on one computer. This was a 1x6 orientation for a video wall; but using the same technique you could pull off: 5760 x 3240 in a 3x3 orientation. There are a few modern video cards that support up to 6 displays. You can also use techniques that chain cards together to get multiple outputs on one computer. We had to utilize a computer because the application functioned as ultra high resolution playback as well as an interactive multi-touch wall display.

A three by three array diagram.
The true secret behind that massive resolution is the Vidvox HAP codec. HAP was designed for video DJ activities. When working with HAP you end up with monstrously huge files. Our 4 minute 11520 x 1080 file was around 30 GB in size. When working with HAP you often need a SSD. HAP utilizes very low CPU resources but requires massive disk access speed. Even big players in the space like Dataton's Watchout now support HAP.

I was previously utilizing Adobe Media Encoder to create HAP compliant videos. Adobe Media Encoder takes too long to encode HAP. Thankfully as of September 2017 HAP encoding in FFMPEG Has been fixed as well. If you have a build that supports it, you can utilize a command like this to transcode an input video to HAP with AAC audio:

ffmpeg -i -vcodec hap -format hap -chunks 4 -acodec aac

"chunks" is an important HAP specific command. The default is 1. Chunks are not supposed to exceed the number of cores the playback computer has. I noticed with a chunk of 1, I was experiencing large memory utilization on a quad to eight core machine. A chunk setting of four really smoothed things out in my use case. My custom application for the multi-touch display and super resolution video playback was written in Unity3D.

AV Integrator's often use off the shelf components such as Brightsigns or Watchout, but with the combination of HAP + SSD savvy installers may want to take a second look at rolling their own solutions. They may end up with significant cost savings if they have the programming expertise to pull it off.


Drupal 8 Unity3D REST Example

Thur, 2 Jun 2016 14:07:41 EST

Since around 2009 I've been utilizing Drupal as a content management system for many different large and small deployments. The power of Drupal when interfacing with non-standard custom content comes in the flexibility of its' content types coupled with the expansive module system. Yesterday I posted a working example on Github of interfacing Unity3D with Drupal 8 REST services using C#.

REST services in Drupal 8 are very promising in comparison to Drupal 7 services; which I encountered many bugs with. I have not yet started dealing with the CSRF token in Drupal 8; but so far I am very excited!

Using the class is very easy. In this example, connecting to a Drupal CMS at

DrupalInterface _drup = new DrupalInterface("","YourUsername","YourPassword");

Techno Gumbo RSS Feed Michigan Livestock Data Services The Research Computing and Engineering Podcast