Record video from visionworks demo

I would like to record the output video from some visionWorks demos. What is a good way to do this?

Assuming you don’t want to spend money on an HDMI video recorder, perhaps you could do this by setting up a TurboVNC session as posted here: [url][HowTo]Install VirtualGL and TurboVNC to Jetson TK1 - Jetson TK1 - NVIDIA Developer Forums. You should be able to record the VNC session from a remote machine on a TurboVNC client that supports recording.

As to whether or not this is a good solution, I haven’t tried it, but it might be worth a shot.

I was thinking there should be a way to pipe the demo video to vlc or something, but haven’t been able to get that to work. I tried running

./command-to-run-demo | vlc -

then attempted to play /dev/stdin in vlc, but no video was displayed.

I’m using the demos to process some of my own videos, and I want to record the output for comparison in optimizing settings of the demo apps.

I’ve not seen anything like that, I wish it was that easy. I might’ve overthought what you were looking for, though. What you’re looking for might be as easy as getting a screen recorder. There’s recordmydesktop, which has a GUI frontend that can be installed with “sudo apt-get install gtk-recordmydesktop”. You can use its advanced settings to change how it performs (for example, you’ll probably want to record at 2x the reported frame rate of the demo). By default, the output of recordmydesktop goes to your home folder.

If you want a no-compromise recording of the OpenGL output, things get more complicated. Looks like this could be handled by hacking the OpenGL code to save out a buffer: [url]c++ - Saving the openGL context as a video output - Stack Overflow. The other suggestion there was to save the simulation data and then record later based on what was saved (this could be handy if the demo plays at, say, 6fps, but you want it to replay at 30fps), but I’m not sure how feasible that is with these demos.

All of the VisionWorks sample and demos support “–nvxio_render video” command line option to enable outputting to a video file instead of rendering to the screen. This command will create video file “.avi” in the current directory. For more information about NVXIO options use “–nvxio_help” command line argument.

Alternatively, you can enable video file encoding by modifying the sample/demo code. Just replace nvxio::createDefaultRender with nvxio::createVideoRender in sample’s main file and replace window name with path to video file, then your output frames will be written out to a compressed video file.