---
title: Record video of your Selenium Tests | TestingBot Blog
description: |-
  We have just finished optimizing the video recording in our Selenium grid.
  Implementing this was harder than we thought, so here are some tips on h...
source_url:
  html: https://testingbot.com/blog/2011/12/19/record-video-of-your-selenium-tests
  md: https://testingbot.com/blog/2011/12/19/record-video-of-your-selenium-tests.md
---

# Video recording of Selenium Tests

By [Jochen D.](https://testingbot.com/about/jochen-d)2011-12-19

 Share on Facebook 

 Share on Twitter 

 Post on Reddit 

 Share link 

We have just finished optimizing the video recording in our Selenium grid. Implementing this was harder than we thought, so here are some tips on how we implemented this.

To create a video, we used AForge's AviWriter, which makes creating avi videos very easy in C#. We first started off with using C# and Windows' [PrintWindow](http://msdn.microsoft.com/en-us/library/windows/desktop/dd162869(v=vs.85).aspx) function. This worked in some cases but would sometimes show a dark square in the content area. PrintWindow was also very slow when appending it to a video.

Next, we tried to use [Bitblt](http://msdn.microsoft.com/en-us/library/dd183370(v=vs.85).aspx) and GDI with C#, together with AviWriter. This was still too slow for us as it caused tests to run twice as long. We want your tests to run as fast as possible and did not want to hog the CPU because of video recording.

After searching on Google, we found several costly screen capture SDKs which promised fast video recording by using special drivers. This turned out to be working in some cases, but was still too slow.

Finally, we investigated [Microsoft Expression Encoder](http://www.microsoft.com/expression/products/encoderpro_overview.aspx) which offers a screen-capture SDK. This turned out to be a winner since it recorded video without hogging the CPU. The only pitfall is that the video encoding used by this SDK is a proprietary encoding by Windows. To convert the video to FLV, we needed to encode it after recording, something that requires quite a lot of CPU.

We choose to do the video recording on a different high CPU server, so that your tests will run as fast as possible without a screen recording slowing down the CPU.

The program we're using to take screenshots is [MiniCap](http://www.donationcoder.com/Software/Mouser/MiniCap/index.html), which is a lightweight command line program to easily take screenshots. Highly recommended.

It was quite a journey, but we think we now have a good system to record tests without slowing down your tests.

https://www.youtube.com/embed/EqKYBlEbSzE?rel=0
[← Previous post We run your Selenium tests super fast](https://testingbot.com/blog/2011/12/11/we-run-your-selenium-tests-super-fast) [Next post → Capture Network Traffic with Selenium](https://testingbot.com/blog/2011/12/21/capture-network-traffic-with-selenium)

## Sidebar

### TestingBot Cloud Testing

Run automated, manual and visual tests on remote browsers and devices. Sign up for a free trial.

[Free Trial](https://testingbot.com/users/sign_up)

### Latest articles

[![Announcing AI Test Insights](https://testingbot.com/assets/blog/2026/ai-insights.jpg)](https://testingbot.com/blog/ai-test-insights)

#### Announcing AI Test Insights

Use AI Insights to quickly discover why an automated test...

[Read: Announcing AI Test Insights](https://testingbot.com/blog/ai-test-insights)

[![Selenium vs Playwright 2026](https://testingbot.com/assets/blog/2026/selenium-vs-playwright-2026.jpg)](https://testingbot.com/blog/selenium-vs-playwright)

#### Selenium vs Playwright 2026

Comparing Selenium vs Playwright - which is the best test...

[Read: Selenium vs Playwright 2026](https://testingbot.com/blog/selenium-vs-playwright)

[![Maestro Physical Device Testing](https://testingbot.com/assets/blog/2026/maestro-physical.jpg)](https://testingbot.com/blog/maestro-physical-device-testing)

#### Maestro Physical Device Testing

Maestro testing in parallel on physical Android and iOS d...

[Read: Maestro Physical Device Testing](https://testingbot.com/blog/maestro-physical-device-testing)

## Related Articles

[![Playwright Testing on TestingBot](https://testingbot.com/assets/blog/2023/playwright-testing.jpg)](https://testingbot.com/blog/playwright-testing-introduction "Playwright Testing on TestingBot")

### [Playwright Testing on TestingBot](https://testingbot.com/blog/playwright-testing-introduction)

Learn how Playwright can run your automated tests on a variety of browsers, local or remote browsers on TestingBot.

[Read article →](https://testingbot.com/blog/playwright-testing-introduction)

[![Selenium 4: what's new](https://testingbot.com/assets/blog/2021/se4.webp)](https://testingbot.com/blog/selenium-4 "Selenium 4: what's new")

### [Selenium 4: what's new](https://testingbot.com/blog/selenium-4)

Learn more about what is new Selenium 4.

[Read article →](https://testingbot.com/blog/selenium-4)

[![Announcing AI Test Insights](https://testingbot.com/assets/blog/2026/ai-insights.jpg)](https://testingbot.com/blog/ai-test-insights "Announcing AI Test Insights")

### [Announcing AI Test Insights](https://testingbot.com/blog/ai-test-insights)

Use AI Insights to quickly discover why an automated test failed.

[Read article →](https://testingbot.com/blog/ai-test-insights)

[![Selenium vs Playwright 2026](https://testingbot.com/assets/blog/2026/selenium-vs-playwright-2026.jpg)](https://testingbot.com/blog/selenium-vs-playwright "Selenium vs Playwright 2026")

### [Selenium vs Playwright 2026](https://testingbot.com/blog/selenium-vs-playwright)

Comparing Selenium vs Playwright - which is the best test framework for your usecase?

[Read article →](https://testingbot.com/blog/selenium-vs-playwright)

## More by Jochen D.

[![Announcing AI Test Insights](https://testingbot.com/assets/blog/2026/ai-insights.jpg)](https://testingbot.com/blog/ai-test-insights "Announcing AI Test Insights")
### [Announcing AI Test Insights](https://testingbot.com/blog/ai-test-insights)

Use AI Insights to quickly discover why an automated test failed.

[![Maestro Physical Device Testing](https://testingbot.com/assets/blog/2026/maestro-physical.jpg)](https://testingbot.com/blog/maestro-physical-device-testing "Maestro Physical Device Testing")
### [Maestro Physical Device Testing](https://testingbot.com/blog/maestro-physical-device-testing)

Maestro testing in parallel on physical Android and iOS devices.

[![tvOS Physical Device Testing](https://testingbot.com/assets/blog/2025/appletv.jpg)](https://testingbot.com/blog/tvos-automated-testing "tvOS Physical Device Testing")
### [tvOS Physical Device Testing](https://testingbot.com/blog/tvos-automated-testing)

Run automated tvOS tests on physical AppleTV devices.

[See all posts by Jochen D. →](https://testingbot.com/about/jochen-d)

## Ready to start testing?
[Start a free trial](https://testingbot.com/users/sign_up)
