• Posted on October 21, 2013

VirtualBox Video Capture

Running VirtualBox and Screen Capture software can be put a large dent in performance of your PC. The point being, why should capturing Virtual machines be so difficult, including cropping the desktop, getting the resolutions correct, etc. VirtualBox has built in a Video Capture method that will now record your virtual machine to a WebM video file.

Now, this feature existed before version 4.3.0 of VirtualBox, but it required extra work, not just your normal installation. In 4.3.0, Oracle and VirtualBox Developers made it much easier to have access to, by including it in the base installation.

Recording VirtualBox Guest OS

  1. Select the Guest OS from VirtualBox
  2. Open up Settings > Display for the selected OS
  3. Under the tabs for Display, select “Video Capture” and enable it. Here you can also set the frame size, frames per second (fps), video file location, and the quality.

Other than using the above method, which will start recording right when the Guest OS starts up, you can also at any time while a Guest OS is running, go to “Device” and “Video Capture”. This will start recording to a filename of “virtualbox-” with the date appended to it, in YYYY-MM-DD format, including time. Another method to record, which is similar to the previous one, is that, on the bottom right of a Guest OS screen, you will see a video camera. If you click it, the film reel will start spinning (filming), and click again to stop.

Although this idea of Screen Capture for Virtual machines is great, they did fail to integrate it well enough for production level. It’s fine for showing something quick with decent quality, but you won’t get sharp clear images using the VirtualBox capture tool as apposed to recording directly from DVI-D or HDMI into a capture card, or using various other desktop screen capture software.

As you will notice below in the video, when capturing at 720p at 25fps at the highest available quality, it’s still lacking in clearness. Now, the rendering on YouTube may have changed the quality slightly, but when I watch the original file next to the uploaded file, they are near clones of each other.

Other than the quality issues, we have the issue with the only possible encoding method and container. You can only save the video as WebM VP8. WebM is designed for website use, and is trying for a high quality, open video format that is free for everyone. I’ve worked with WebM in the past, the quality is good in most cases, but for some reason with VirtualBox, it doesn’t turn out right. Also, keep in mind, when working with WebM, you will most likely have to convert it away from webm after recording. Very few programs support this format, thus is why I would like to see h.264 encoding formats available for VirtualBox. Luckily for me, YouTube supports WebM uploads, so I was able to just drop the file into their website.

The last of the issues I have are, cropping for the wrong output resolution, difficulty to use, and it doesn’t record audio. Most of these issues I can live with, but the quality issues listed above and lack of audio make me want to use my normal recording setup. The cropping issue boils down to, if you are recording at a lower resolution than the Guest OS, the screen will be cropped with only the center region visible. I would expect the full Guest OS screen to be scaled down in the video to fit the output resolution.

The issue with the difficulty of use, that’s a whole story on it’s own. I’ve spent more than a couple of hours trying to get VirtualBox to record properly. First in Windows 8, in which I had no luck with other than the Boot screens. Next I moved into Linux and could record only when I disabled the video acceleration of 2D and 3D, otherwise the video would be black other than the boot and shutdown screens.

Below you can see a test video we recorded of Ubuntu 13.10. No modifications other than rendering to acceptable format were made. This is the quality you can expect recording at 720p, 25fps, highest quality.

For the full changelog for version 4.3, you can visit www.virtualbox.org/wiki/Changelog