is there any software of hardware that can mimic an external non virtual camera with a custom video input - camera

Websites can tell if camera selected is real or virtual, I think by checking device instance path [real vs virtual camera path][1][1]: https://i.stack.imgur.com/hKr5y.jpg
a real webcam tend to have USB in the path
and virtual tend to have root in the path
is it possible to show the website custom output such as a screen recording or a video stream or ip camera and make it seem like it's a real physical webcam or something like that via a software or an external device that is detected as camera but can I can choose what to output

Related

Android Emulator connect external storage Device while running

I have an App that needs to detect, if a USB Storage device is getting mounted. Can i simulate the mounting of an USB Storage Device while the Emulator is already running? This way i can debug the behavior of my app.
As i know, for registering the mounting and unmounting of the USB Storage Device i can use the StorageVolumeCallback(). What do i have to do to write a simple .txt File to that attached USB Storage Device?
Im having trubble to create a StorageManager inside my ViewModel because i do not have access to the Context.
Im thankful for any Tipp related to USB Storage Management at all.
Info:
API Version: 31
IDE: Android Studio
Language: Kotlin
Edit:
So i do not necessarily need to have a external usb drive mounted at startup. If its possible with adb it would be great if i could just forward a usb Pendrive to the running emulator when i need it. Something like adb connectUsbDevice -deviceid=****,vendorid=***
There isn't a .NET library I'm aware of which can do this. However, please refer to this post where the brilliant answer shows how to do this interfacing with the Win 32 API.
How do I disable a system device programmatically?
You'll need a combination of this, and a WMI query to find an attached PnP device of type storage. As a clue:
using (var searcher = new ManagementObjectSearcher(#"SELECT * FROM Win32_USBHub"))
{
collection = searcher.Get();
}
Change Win32_USBHub to the correct class if this isn't giving you what you're looking for.
EDIT: Be warned. If you're disabling storage devices, make sure they're not in use. That's what the "Safely remove USB" option is for in Windows.
Another option, if you don't need to emulate this in code, use a real USB storage device inserted in the system and use PowerShell to get, disable, and enable the device.
The Cmdlets you'll need are:
Get-PnpDevice
Disable-PnpDevice
Enable-PnpDevice

How to turn webcam to rtsp

I have a product that can analyze video after inputting an rtsp url.
I would like to use a webcam to stream and feed my product the webcam rtsp.
How can I do that?
It will depend on the webcam you are using - most support RTSP but many do not publish the interface to access the stream as they are designed to be used with the webcam's own companion app.
There are some web resources which provide the RTSP urls for common web cams - you may find it hard to find a match as new versions of webcams roll out but it should give you a feel how to try accessing a vendors camera if you have a specific web cam you are testing against. Some examples (at the time of writing):
https://www.getscw.com/decoding/rtsp
https://soleratec.com/get-support/rtsp/
If you can't find the info for the camera you are using, and you have the companion app, you can also use a network sniffer tool like Wireshark (https://www.wireshark.org) and try to search the traffic for 'rtsp://' pattern.
If you just need to test your app and have access to a raspberry pi with a camera module you can also use this to generate an RTSP stream - there are several approaches for this but one I have found reliable is the v4l2rtspserver server:
https://github.com/mpromonet/v4l2rtspserver
There are specific instructions for setting it up on PI (https://github.com/mpromonet/v4l2rtspserver/wiki/Setup-on-Pi) and you can also verify it is working using VLC player on a laptop etc before testing in your specific application.
There are also a small number of test RTSP urls available on the web - the most reliable seem to be the one at this link provided by Wowza (again, link valid at time of writing):
https://www.wowza.com/html/mobile.html

getUserMedia: access system output stream

I know how to access audio input devices via getUserMedia() and route them to the WebAudio API. This works fine for microphones and such. But in my use-case, I would rather like to hook into the audio stream of an output device. The use case is that I want to create a spectrum analyser for audio coming from a digital audio workstation (DAW) running on the same PC.
I tried to enumerate the devices and call getUserMedia() with the device id of an audio device, but the stream returned only showed silence data. The only solution I found so far is to install an audio loopback device (like Soundflower on Macs) to route the DAW's output to and then use this as an input device for getUserMedia(). But this will require the user to install 3rd party software.
Is there any way to hook directly into the audio stream of an output device instead, before it is actually sent to the physical device (speaker or external soundcard)?
This can be achieved using the desktop capture APIs (chrome.desktopCapture.chooseDesktopMedia). An example for chrome is included here

Android MedioPlay How to play http or rtsp stream?

I'm trying used mediaplay play http or rtsp protocol uri from server, when I play the
address as http://**.wma or *.mp3 ,it can working,but I tryed played the address as
"http://qr.fm.qq.com/qqradio?qqradio",it didn't working.
and also I'trying used VideoView play rstp protocol uri from server,when I play the adress as
“rstp://*.sdp”,it can working ,but I tryed play the adress as "rtsp://vs1.thmz.com/radio31"
,it didn't working.
Anybody help me and tell me how
These are live streams, not static files, so, while it may play back some .wma and .mp3 content - these live streams are not defined like that.
Are you sure the first stream link is valid? After a quick scan with nmap, it seems you may need to be in china to connect to this feed (qq.com Registrant Country Code - CN) I get 1000 scanned ports all filtered, usually means a firewall blocking specific geographic regions.
rtsp://vs1.thmz.com/radio31 -> This is a Windows Media Audio stream, using WMA2 codec, delivered via RTSP, which according to the Android Supported Media Formats: http://developer.android.com/guide/appendix/media-formats.html - is NOT supported.

Is there anything like standard IP camera OS emulator?

Is there anything like standard IP camera OS emulator? So to create a plugin\program for it and be able to come to Cameras creator\vendor with something like "Hey, I've developed some cool software for your camera! Look here! Please implement it into your cameras next version or please give me the job in your company!)"
So something like mobile os emulator... But for IP or at least usb Web Cameras.. So to create and test modules for it.
So Point is not in IP cameras HTTP\RTSP apis emulation but in emulation of how camera works internaly (like how frames are obtained, compressed, what controlls all that process etc)
I dont know if this is what you are looking for exactly. http://sourceforge.net/projects/axisemulator/