title: Convert Movie to OpenNI *.oni video
body: <p>The <a href="http://openni.org/" rel="nofollow">Kinect OpenNI library</a> uses a custom video file format to store videos that contain rgb+d information. These videos have the extension *.oni. I am unable to find any information or documentation whatsoever on the ONI video format.</p>
  
  <p>I'm looking for a way to convert a conventional rgb video to a *.oni video. The depth channel can be left blank (ie zeroed out). For example purposes, I have a MPEG-4 encoded .mov file with audio and video channels.</p>
  
  <p>There are no restrictions on how this conversion must be made, I just need to convert it somehow! Ie, imagemagick, ffmpeg, mencoder are all ok, as is custom conversion code in C/C++ etc.</p>
  
  <p>So far, all I can find is <a href="https://github.com/OpenNI/OpenNI/blob/master/Samples/NiConvertXToONI/NiConvertXToONI.cpp" rel="nofollow">one C++ conversion utility in the OpenNI sources</a>. From the looks of it, I this converts from one *.oni file to another though. I've also managed to find <a href="http://www.uco.es/dptos/aceyte/arquitectura/profesores/jcgamez/?RESEARCH_%28English%29" rel="nofollow">a C++ script by a phd student that converts images from a academic database into a *.oni file</a>. Unfortunately the code is in spanish, not one of my native languages.</p>
  
  <p>Any help or pointers much appreciated!</p>
  
  <p>EDIT: As my usecase is a little odd, some explanation may be in order. The OpenNI Drivers (in my case I'm using the excellent <a href="http://www.mathworks.com.au/matlabcentral/fileexchange/30242-kinect-matlab" rel="nofollow">Kinect for Matlab library</a>) allow you to specify a *.oni file when creating the Kinect context. This allows you to emulate having a real Kinect attached that is receiving video data - useful when you're testing / developing code (you don't need to have the Kinect attached to do this). In my particular case, we will be using a Kinect in the production environment (process control in a factory environment), but during development all I have is a video file :) Hence wanting to convert to a *.oni file. We aren't using the Depth channel at the moment, hence not caring about it.</p>