Video capture hardware for DIY stb tester rigs - stb-tester/stb-tester GitHub Wiki
Experience reports of video-capture hardware used with stb-tester. If you have worked with hardware not on this list, please edit this wiki page or post the details to the mailing list.
The authors of stb-tester don't recommend any of this hardware; they all have problems of one kind or another: crashing, freezing, glitches & artifacts, lossy capture, buggy mode-change handling, incompatible differences across driver versions, etc. For reliable, well tested and supported hardware buy the stb-tester ONE.
Blackmagic Intensity Pro
The Blackmagic Intensity Pro is an inexpensive internal PCIe video-capture card. It works well for writing test scripts (it takes high-quality screenshots because it doesn't use lossy compression), for targetted regression tests (when you don't care if some manual intervention is occasionally required), and even for extended soak testing as long as you only use one card per PC.
In: HDMI (no HDCP); HD Component; Composite; S-Video. Out: Raw video over PCIe bus.
Driver: Closed-source Linux driver. Note that the external USB models like the Intensity Shuttle do not have a Linux driver.
Cost: ~US$190. Note that more than one Intensity Pro card per PC causes lock-ups, which reduces the cost-effectiveness in large test rigs.
Configuration: The GStreamer decklinksrc element requires you to specify the input connection used and the video resolution to expect. Change mode below to match your system under test (use gst-inspect-1.0 decklinksrc to see allowed values). device-number is only necessary if you have more than 1 card in the PC.
[global]
source_pipeline = decklinksrc connection=component mode=720p50 device-number=0 ! videoconvert
Stability: A single Intensity Pro card is stable, with uptimes of a week or more under continuous usage. But when we use more than one card per PC one of the cards tends to lock up within 24 hours (it won't deliver video until you reboot the PC) or worse, crash the PC.
Problems:
- Instability with more than 1 card per PC.
- Your Linux kernel version has to match exactly the manufacturer's recommended kernel, which is ancient. Otherwise we saw the Blackmagic driver causing random memory corruption (of other processes' memory!).
Blackmagic Intensity Pro 4K
Blackmagic Intensity Pro 4K is an updated version of the Intensity Pro.
In: HDMI (no HDCP); HD Component; Composite; S-Video. Out: Raw video over PCIe bus.
Drivers:
- Closed-source Linux driver.
- Due to an issue in GStreamer, that got fixed in version 1.7.2, the card was barely usable. As a result, to avoid compiling GStreamer, it is recommended to use Ubuntu 16.04 LTS which ships with GStreamer 1.8.1.
- When installing the driver, make sure to run "sudo apt-get install -f" in the final step to fix dependency issues.
- Use drivers >V10.5.4 as there were a lot of bugs in the previous versions.
Cost: $199
Configuration:
- In contrast to the previous version, when using the updated version of GStreamer, specifying the input connection and video resolution is optional. device-number is still only necessary if you have more than 1 card in the PC.
- Keep in mind that the decklinksrc element was replaced with decklinkvideosrc and decklinkaudiosrc in newer GStreamer versions (>v1.6).
- With GStreamer >v1.7.2 you can now also use mode sensing (mode=auto) to set the correct video mode automatically. This is really convenient as it allows you to change the device's resolution or hot-swap the connected device on the fly without restarting the GStreamer session.
Stability:
- I've noticed an issue when continuously using the card under Ubuntu 16.04, GStreamer 1.8.1 and Blackmagic Desktop Video Drivers 10.5.4+. After certain time (can vary from 14h to several days), the card fails to stream the video signal while no obvious errors can be observed (well, excepts for occasional colord-sane crash after rebooting). I the get the black screen in GStreamer and the Blackmagic Media Express software. Neither rebooting nor reinstalling/downgrading the drivers helps. I was able to reproduce it with several Pro 4K cards on different machines (identical HW though). The only reliable workaround is to power off the machine for a couple of minutes. Then the issue resolves by itself. Might be some sort of a memory leak. Anyway, what I do know is to shutdown the system at midnight via /etc/crontab and let it wake up shortly after by utilizing the Wake Up Alarm option in the BIOS.
Problems:
- There is an issue where the first frame captured is a black 720x486px frame. A workaround for this is to, manually, recall
get_frame()
. More information about this, see issue #381. - GStreamer 1.8.1 doesn't play well with aRGB video sources (e.g. FireTV, PS4) when setting the mode manually. Use "mode=auto" until the next GStreamer version is available.
- When using "mode=auto" with GStreamer >v1.7.2, the video output window stays small no matter what the actual resolution of your device is. That's because internally, GStreamer starts the with an SD video mode and adapts to the actual video after a couple of frames. As a side effect, stbt batch' records cropped and/or stretched videos in the HTML reports. For more detail and a workaround see issue #372
- Some devices, e.g. PlayStation, have the "Deep Colour Output(HDMI)" setting on per default. Make sure to switch it off since the Intensity Pro cards can't handle it.
Teradek VidiU
The Teradek VidiU is an external video-capture device that streams RTMP (flash video) over the network. We recommend the VidiU for extended soak testing.
In: HDMI (no HDCP). Out: H.264 (max. 5Mbps) RTMP.
Driver: Not applicable (it's an external streaming device).
Cost: ~US$700.
Configuration: You'll need to run an RTMP server, configure the VidiU to stream to that server, and use stb-tester with the GStreamer rtmpsrc element. If you're using Fedora you'll have to install gstreamer1-plugins-bad-freeworld from the RPM Fusion free repository (on Ubuntu rtmpsrc will have been installed automatically when you installed stb-tester). For a ready-to-use Ubuntu configuration with an RTMP server already configured see stb-tester/extra/vm.
[global]
source_pipeline = rtmpsrc location=rtmp://localhost/live/stream-name\ live=1
Stability: The VidiU has been rock-solid in our testing so far, with weeks at a time of continuous usage.
Problems:
- Lossy capture.
- The VidiU's H.264 encoder stops on any mode change (for example when the
resolution changes or the device-under-test reboots), and it takes the VidiU
20 seconds to recover and start streaming again; this
doesn't play nicely with
stb-tester's record-a-video-of-each-testrun functionality, so you won't be
able to use
stbt batch run
if the system-under-test's resolution will change during a single testcase.
Hauppauge HD PVR
The Hauppauge HD PVR is an inexpensive external USB video-capture device. We don't recommend the HD PVR.
In: HD Component; Composite; S-Video. Out: H.264 MPEG-TS over USB.
Driver: Open source v4l driver, present in Linux kernel since v2.6.30.
Cost: ~US$150. The HD PVR has been discontinued by Hauppauge in favour of the HD PVR 2 which does not have a Linux driver, but the original HD PVR can still be purchased in bulk orders direct from the manufacturer.
Configuration: The HD PVR presents itself as a V4L device such as "/dev/video0", so use GStreamer's v4l2src element. If you have multiple HD PVRs connected to the same PC, use "/dev/v4l/by-id/..." instead of "/dev/video0" because the "by-id" path won't change when you reboot the PC. If you're using Fedora you'll have to install gstreamer1-libav (for an H.264 decoder) from the RPM Fusion free repository (on Ubuntu this will have been installed automatically when you installed stb-tester).
[global]
source_pipeline = v4l2src device=/dev/video0 ! tsdemux ! h264parse
restart_source = True
Use v4l2-ctl --list-inputs and --set-input to select the HD PVR's component, composite or s-video input. (v4l2-ctl is from the v4l-utils package.)
Stability: The HD PVR is quite unreliable: Within hours it locks up and stops providing video. You have to power-cycle the device before you can use it again. Before the permanent lock-up, the HD PVR also suffers from transient failures which will affect the results of your test scripts.
Problems:
- Lossy capture.
- Extremely unstable.
ViewCast Osprey 820e
The ViewCast Osprey 820e is a professional-grade internal PCIe video-capture card.
In: HDMI (no HDCP); DVI; HD Component; Composite; S-Video. Out: Raw video over PCIe bus.
Driver: An open-source v4l driver is available but it has not been accepted upstream into the Linux kernel. It has been tested with Ubuntu 12.04, but it may need some porting work for newer Linux kernels.
Cost: ~US$1,800. Each card supports 2 simultaneous inputs, and it has high requirements on the CPU and bandwidth of the host PC.
Stability: Around 1% of video captures exhibit a distinct colour tint, strong enough to make stb-tester's image matching fail.
Magewell Pro Capture HDMI
The Magewell Pro Capture HDMI is an affordable PCIe video-capture card that works well with stb-tester.
In: HDMI (no HDCP); HD Component; Composite; S-Video. Out: Raw video over PCIe bus.
Driver: Closed-source Linux driver.
Cost: ~US$299.
Configuration: You are required to set resolution and frame rate in your source pipeline. The stbt.conf file should look like this:
[global]
source_pipeline = v4l2src device=/dev/video0 ! video/x-raw, width=1920, height=1080, framerate=30/1
Stability: A single Pro Capture card is very stable and has no reported issues with stb-tester.
TBS2603se Professional HD H.265/H.264 HDMI Video Encoder
The TBS2603se is a relatively inexpensive 2k HDMI Video Encoder that can stream RTMP and RTSP. In RTSP mode there is no need to run any separate server.
In: HDMI (no HDCP). Out: H.264/H.265 RTMP and RTSP.
Driver: Not applicable (it's an external streaming device).
Cost: ~US$200.
Configuration:
[global]
source_pipeline = rtspsrc location=rtsp://<ip_of_device>/stream0 ! rtph264depay
Stability:
- Very occasionally it needs rebooting (you can set the reboot on a timer in the UI).
Problems:
- Not 4k-capable.
- No Dolby Digital
Standard Definition
Users have reported using BT878 and EasyCap video-capture hardware with stb-tester. Noise in analog signals can be overcome by tweaking stb-tester's image-matching parameters.
Software capture
This is the very opposite of video-capture hardware, but I'll mention it here anyway. If you can install GStreamer on your system-under-test, then you can write a GStreamer element to grab video directly from the framebuffer and stream it to a GStreamer network source on the test-runner PC. For an example see the DirectFB surface source element.