forked from http://sourceforge.net/p/elphel/svn/HEAD/tree/tools/Movie2DNG/