title: CUDA: real time video post-processing
body: <p>I would like to know if anyone could point me in the right direction here.</p>
  
  <p>Suppose I have a video file in some encoding (e.g., H.264), and I decode this video using CUDA's video decoding library (https://developer.nvidia.com/nvidia-codec-libraries). What this would do (I presume), is it would decode the video and play it on the screen. So far so good.</p>
  
  <p>Now, what I would really like to do is modify the decoding library (or write a wrapper, or something of that sort), to perform some post-processing on the video frames. </p>
  
  <p>For example, suppose the video has 1000 frames, and I would like to (in real-time) add some custom effects to <em>some</em> (specified by the user) of the frames (e.g., render a 3d model---passed in by the user---and overlay the output to some location in the frame, etc). </p>
  
  <p>I guess my question really is:</p>
  
  <ol>
  <li>Is this possible at all? </li>
  <li>Does anybody know of any code samples that can accomplish this or something similar (or tutorials, papers, manuals, anything at all)?</li>
  </ol>
  
  <p>Thanks!</p>