Inspired from LabVIEW portal - reference link
Library and examples provided as is, minor bugs (aka. features) included but still can be useful for someone who needs to acquire, compress and edit video/audio streams from various sources, directshow compatible devices and internet streams.
Works with GigE cameras if manufacturer provides directshow compatible filter. (Tested with Basler family).
DirectShow has a steep learning curve but once you get familiar with GraphEdit then samples from internet and examples from below should be sufficient to create sophisticated applications.
To back check your LabVIEW creating add
Wire it to your FilterGraph and open in GraphEdit program for inspection and debugging.
Requires:
Microsoft Windows SDK - download
Directshow.net library - download
DirectX.Capture class library - download
References:
DirectShow Debugging/ConceptProofing Tools:
GraphEdit (Microsoft Windows SDK)
Alphabetical and Numerically Logical String Array Sort for user menu facelift
BEFORE Opening any vi make sure you have in the same directory:
DirectShowLib-2005.dll
DShowNET.dll
DirectX.Capture.dll
logicalstringarraysort.llb
Great links:
H.264 CUDA Encoder directshow filter -> Examples Added 02/16/2013
Directshow virtual video capture source - aka printscreen
Other articles from Maxim Kartavenkov
02/16/2013 Update
H264Encoder requires:
I went with wrapper mode implementation. Check Maxim Kartavenkov forum for details.
H264 CUDA Encoder directshow filter example can be done entirely in BaseClassesNET.dll. Which might be done one day...
No error checking on CUDA capabilities.
Use with Nvidia GPU's only
Examples:
Updates to Library:
02/07/2013 Update
Examples:
Updates to Library:
Updates to Capture.vi
Update 10/08/2014:
DShow - JPEG dump example.
-Artur
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Greetings to all - I have successfully run several of the examples provided and can now capture video from my Blackmagic Ultrastudio SDI, very nice!
My goal is to be able to stream AVI files created in LV to the SDI output of the Ultrastudio. I noticed an example called Render Media Stream and was wondering if it could be modified to stream an AVI. I will continue to study the libraries and Direct Show documentation but if anyone has a few pointers I would be greatly appreciative. Thanks.
Hi,
I am trying to run the DirectShow - Example - Acquire Video.vi in Windows 10 environment. I installed everything and copied DLLs into the same folder as the LLB as directed. I would like to capture the HDMI input from the AVerMedia PCIe adapter and display it in a Labview panel. I had a success running the same example in the same Labview 2016 64-bit version on a Windows 7 computer but on Windows 10 the picture box remains black while VI is running without errors. Interestingly, if I run the Acquire Video plus Sample Grabber.vi the Sample Grabber control displays the video while Picture Box control remains black. Did anybody on this forum have a similar problem under Windows 10? I also get a warning message on both Win7 and Win10 machines stating that expected assembly "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKey Token=[token number]", but found "System.Windows.Forms, Version=4.0.0.0, Culture etc."
...
Expected assembly "System.Windows.Forms, Version=2.0.0.0 etc." but found "System.Windows.Forms, Version=4.0.0.0 etc."
These warnings go not seem to impede the example from functioning correctly in Win7 though.
Hi,
You can try to add a labview.exe.config file in the same folder than labview.exe.
This file contains on my side :
<?xml version ="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319"/>
</startup>
</configuration>
Hope it helps,
Bim
Thanks for responding, Bim. That did not work for me.
I have setup an AVI streaming graph and it works perfectly in graphedit. In my LV code, I am getting a 1172 error (class not registered) from a AVIReader .net constructor I have Visual Studio 2015 and the Windows 7 SDK installed. All of the recommended dll's are present, is there anything else I need to do?
Is anybody found a way to get the manufacturer serial number of the camera with those .dll?
Thanks
Benoit
I am trying to get the Render Media Stream example working and am receiving a error 1172 in the Enum Pins vi
All of the incoming refnums look valid but the IEnumPins method (in red) produces an error. Any ideas?
Great job GriffinRU.
I have got a Blackmagic Intensity Pro 4k, then I created the post: Acquire Blackmagic Intensity Pro 4K Images (HDMI and Analog Video Inputs), due some questions about that in the forum.
Hello,
I use this library since a few years. It is a great library. Builds of my softwares are ok on Windows 10 Version 1607. But, since last Windows 10 updates, I encounter problems with builds. In Labview developpement 2017, it seems ok. But after in build, it does not function anymore. PictureBox remains grey. I'm quite sure it is something with Windows 10 creators update.
Do you guys have a solution bout this issue?
Hi.
I want to capture images using Labview, the drawback that I have is that the image is delivered to me by a videofluoroscope (Biomedical equipment), through a DVI output, I want to take the image to a laptop and Labview, which is not possible without using a video capture, someone recommended me to use this already developed program together with this captured (https://www.amazon.com/StarTech-com-DVI-Video-Capture-Card/dp/B01IEW58NO). I would like to know if someone has done something similar and it has worked for them, or if as such it is possible to do it.
Thank you
GriffinRU and everyone:
I've been using this library for a while with LV 2017 32-bit on WIn 10 and 11 64-bit, and it works very well. If anyone is interested in my proof-of-concept application, you are welcome to try it, it's called Airplane! SnV, and you can find it here.
Now I am trying to use this library with LV2023 Q3 64-bit, and so far, no luck. (I did replace DirectShowLib-2005.dll with its 64-bit version from SourceForge, but I did not find 64-bit replacements for DShowNET.dll and DirectX.Capture.dll. Not sure if they are being used though).
Has anyone ported these libraries to 64 bits? Any advice? Thanks!