Run multiple webcams at a time using DirectShow - winapi

I'm using Windows 7 OS. working with Visual Studio 2010. Here I'm usng DirectShow2005-Lib.dll.
Here I'm able to run two webcams at a time. But when I'm going to connect and run the 3rd webcam .. I'm not able to run all the three at a time. I can run only two at a time.
and getting an error : No combination of intermediate filters could be found to make the connection.
How can I run multiple webcams at a time using DirectShow?

USB bandwidith is a limited resource and you cannot run too many cameras. Sometimes, in some modes, you can run only one camera at a time.
See:
Two webcams on one usb hub - bandwidth issues
2 usb cameras not working with opencv
Implications of using many USB web cameras

The problem is solved. I have used PCI Card USB Slot. Two cameras connected to the PCI USB slot and one to normal USB slot. Thus all the three cameras are running simultaneously at the same time.
We can also use USB Hub for this.

Some (most?) drivers I've encountered don't allow multiple instances to be loaded. As you already have 2 loaded, this is unlikely to be the case, but this is for future reference.

I’ve noticed 2 instances when I receive the same error:
1)I’m trying to connect to a web cam that is already running a graph. (most webcam drivers can only have one instance open, like Deana mentioned)
2)You’re connecting to the wrong pins or you need to set up a smart T filter for that particular camera.
Are you using the same cameras (if so be cautious of not running the same one twice)?
USB bandwidth won’t be an issue if your pumping out low resolution, but if your frames are over 3MP you could run into issues only if you’re running off the same USB port…
Step through the graph, where exactly is it failing?

Related

What technical specifications are relevant to creating an at-home UnitTest lab?

I need to run tests against physical mobile devices, and need to deploy unit tests to many concurrent devices at the same time.
Conceptually, this is similar to the Xamarin Mobile Test Cloud, or Microsoft Mobile cloud... but I need an on-premise equivalent so that I can test Bluetooth and GPS features
I'm looking to test 7 to 14 physical devices all connected to the same USB hub.
Question
How many devices can a single Mac / Windows machine talk to over a single USB port?
What are the power considerations I need to keep in mind while selecting hardware?
Here is a visual example of what I imagine, however this device is focused on charging, not connecting a USB backplane to a computer.
Per USB controller you can have a 127 devices (128 minus the controller), bu I am not saying you can simultaneously have 127 devices communicating to the host and maintain any type of data throughput, that is a different story....
The core USB issue with a lot of devices is the power draw. We use special Y cables that have a data only side and a power only side even when using the so-called "powered" USB hubs.
The really good cables that do this are typically found via companies that cater to audiophiles and as such are typically very expensive and work great but are overkill for this usage. But also avoid the cheap Y-cables where the data-only side is "ungrounded" as you will have data transfer failures. Low quality cables will kill data through-put and have you running in circles chasing test failures.
Consumer external USB hubs are not created equal and wildly vary in their power output and simultaneous throughput across each port. While most will do well with one/two devices talking simultaneously, many start failing when 4-8 devices are all talking. Also trying to cascade them for increasing the number of ports can cause failures across the entire chain. Make sure you have a good return policy where ever you can buying it from.
You did not stated the testing framework, but some Appium info:
For Appium-based Android testing I have use a combination of:
Android<-USB->Host(adb)
8 devices is about the threshold for reliable simultaneously (bi-directional) testing
Android<-Wifi->AP<-Host(adb)
A DHCP server handles assigning an IP to the Android device via MAC address so we can create a static mapping of ports to IPs for remapping via adb
8 simultaneous Appium servers (thus devices) running per Window server/host is about what to expect
This works for about 32/64 devices per dedicated AP.
Remember the AP has to be ~4/5 feet away from the devices for proper signal attenuation
Mobile cloud datacenters use EMI / faraday cages to isolate each mobile device rack where multiple servers, an AP and the devices are installed within each rack
Android<-USB2Ethernet<-Host(adb)
Not all devices support OTG, so this is not always an option, but works great.
A DHCP server is required just like the Android<-Wifi->AP setup
iOS is a totally different can of worms:
4 iOS devices connected to a Mac is about all you can achieve with reliable results.
Remember a separate Xcode Instruments is spun up per Appium server on the host.
Mac Minis work great for dedicated Appium test servers.
In terms of GPS testing, mocking is the easiest way to go. There are hardware devices designed for GPS testing that are use by the top tier app developers (mapping, traffic, avionics, etc..) but for an ad-hoc in-house device lab these are usually way to expensive to purchase and setup (EMI / faraday cages are needed enclosing the device and the GPS injector antenna).
Bluetooth can be a big problem in a device lab due to interference, pairing issues, etc..., having a number of devices in close proximity competing for a single (or more) bluetooth accessory can make the accessories fail to pair with any device. Basically bluetooth testing simultaneously does not work well, but you can use Appium to automate the turning the wifi/bluetooth/airplane mode on/off, but for Android devices this requires that they are all USB connected and not using adb to remap host ports to IP addresses over wifi...

Hard reconect USB device from bash

I have a lot of USB modems connected to a server. Sometimes USB not respond to software like gnokii o gammu (I need read IMEI) and we need disconnect device and reconnect, and the problem is solved.
I need a way to do this from bash. I know is impossible shutdown disabling energy. Any ideas?
I try with:
usbreset.c (https://gist.github.com/x2q/5124616)
usbpower.pl (https://gist.github.com/Krellan/6575538)
Both solutions detach device and atach again, but the problem when I request data still failing.
A solution passing this data is better for me :)
/dev/ttyUSB0
/dev/bus/usb/001/001
You may need to remove power from your usb device to make it reset properly. Though the usb standard expected hubs to provide for remote power switching by software, very few hubs actually implement this feature (which cuts down on 1 extra transister per port). You should try searching for usb hubs with PPPS which means per-port power switching.
This uhubctl software for Linux and MacOSX can control such a hub, and the page lists some compatible hubs. For example, this support reply in December 2016 from Plugable Technologies lists two inexpensive hubs they make which you can find, on amazon, for example.

UWP Mediabox - a few questions

I have a question to you and I really hope you can provide me some information.
I wish to build a media center because I have not found any possibilities to cast my stuff straight to the big screen from my Windows mobile phone.
Off course there is the wireless display adapter from Microsoft but I wish not to cast my whole display to my tv.
After testing a few product (Amazon fire tv box, apple tv 3, display dock and the wireless dock) I came to the conclusion that I can not have an all in one solution which fits my perceptions.
From that point I thought that I have to build my own "tv application".
Ok ok... There is kodi(xbmc) and so on... But I think this is just making a detour.
Following features must be included:
running on Windows 10
Cast music, videos and pictures.
Ability to launch and download windows store apps.
Project Rome implementation to share data across devices.
Seems possible but here´s one big problem...
If we are talking about mediaboxes, we do talk about those small boxes besides your tv. Instead off building a micro ATX setup, I want to take this to the next level... using IoT (Raspberry Pi 3).
Using IoT may have some advantages but there are a few disadvantages I have to worry about.
Will Windows 10 work properly on IoT (advantages - disadvantages)
Media streaming?
ARM architecture
Bluetooth, WIFI, Ethernet connectivity
I have never ever worked on IoT before, so I am kinda noob again. I´am asking for some advices to make this possible.
[UWP] How can I stream data (e.g. video, music, images) to another application?
[UWP] Implement a remote control - just like the amazon fire tv controler ?
Advantages - Disadvantages of using Windows 10 on a Raspberry Pi ?
Using windows 10 default applications (Groove Music, Images, Videos - Application) to play incomming data?
What do you think? Is it possible to create a Mediacenter which is running on a raspberry pi using windows 10?
Thank you in advance.
The most straightforward idea would be to create an always-running app with a MediaPlayerElement with a Source property that can be set programmatically by a remote control app. A remote control app could also control the pause, play, next, previous actions.
Be aware that there is no hardware video acceleration support for Raspberry Pi on Windows IoT Core yet, and probably that also won't come soon. There are other devices that do have proper video drivers (look at the hardware support page of Windows IoT Core).
Also be aware that there is no Windows Store on Windows IoT Core, unless you are an OEM (then you can publish your properly signed apps in an official way to devices that are managed by you).
A simpler way would be to buy a Windows 10 box from aliexpress. Then you can use Miracast to stream your screen, install apps from the App Store and play films directly on it, for example using Kodi for which remote control apps exist.

OSX -- Output WAV independently to 12 speakers connected via USB soundcards

I wish to simultaneously play sounds through up to 12 mono speakers.
I could connect these to my MacBook using 6 USB soundcards, and use the left and right channel of each.
But how can I get the MacBook to play sound out of speaker #5, for example?
PS If anyone can see a smarter way to wire up 12 speakers to a MacBook, please do say!
You can setup an Aggregate Device (Audio Midi Setup > Create Aggregate Device), which allows the ability to combine multiple devices of the same model, or to combine multiple inputs and outputs for apps that don't support separate input and output devices. This Apple guide shows how it works and is surprisingly quite easy to setup.
Another way to route audio to multiple channels and outputs (up to 64) is with the free app/plug-in Soundflower. You can download a compiled version, or compile the source code if you want/need to specifically do something that the current compiled version might not.

Connect multiple (two) windows phones to the computer at the same time and develop

I'm developing an app on windows phone that simply can't work without at least two phones (Two phones need to see each other through wireless network and act together. And I use an API that is not properly implemented on emulator).
Unplug the first one and plug in another repeatedly as I'm modifying the code and watching changes on the phones is painful.
Is it possible that I connect two windows phones, and make them work, at the same time?
Unfortunately it's not possible to connect multiple phones to the same PC at once. The connection used by Zune (or WPConnect) only works with one device at a time.
I've been in a similar situation to you (debugging software on multiple phones at the same time--as they talk to each other) but there's no way round this.

Resources