OpenCV cannot open stream using IP camera - c++

I have 2 identical IP cameras and I'm trying to access stream of them. To do this I'm using
http://username:password#ip/axis-cgi/mjpg/video.cgi?m.mjpg
I give this to OpenCV VideoCapture. And now let's consider that there is camera_1 and camera_2. Cameras have different IPs, so there is no conflicts. The problem is that I can't open stream in OpenCV of camera_1, but in the browser it works. And with camera_2 is problem that sometimes I can open the stream in OpenCV and sometimes I can't do this (I don't change any settings, just run application ones and it works, after that I close application and run it again and it doesn't work).
So what can be the reason? Where to looking for a solution?

Related

HALCON: webcam doesn't connect

I'm trying to connect my webcam to MVTec Halcon for university purposes using the Image Acquisition tool, but when I click on Auto-detect interfaces, it only finds File.
Auto detect interfaces
I'm using an external Teaisiy ZC-D2 webcam connected via USB. Does anyone know how to solve this problem or do I have to change the camera?

libvlc after 12 instances hardware accelerator failed to decode picture error

I am using libvlc 3.0.11 sdk. I have multiple instances of vlc player in my program developed in Qt platform. I am using libvlc_media_new_callbacks API to read data from custom buffer. There isn't any problem until 12 instance of players but when I increase the number of instances, libVLC gives that error
hardware accelerator failed to decode picture
with red text color.
If I open multiple instances of my own program, I can create 12 instances for each program and works fine. According from this, I think this is not hardware-capacity related problem. I have tried different hardware accelereation options but I could'nt make it work. I need help

Capturing an Android Camera Stream over USB with C/C++ and libusb

I've done some research on this and have already tried using IP WebCam and gstreamer to pipe the video stream from the IP based source to /dev/videoX and reading from that.
It works fine, but it isn't exactly what I am looking for. I have several old useless phones that I would like to use on a robot as video sources from multiple angles for computer vision based tasks.
I've also read that DroidCam does this, but I have read terrible reviews about the app and especially the USB based part.
Most likely this robot will not be near any WiFi (or rather should not require it), and the phones will not have a network connection (no SIM card), so no USB tethering.
It seems like there should be a very simple way to do this. Is there a way to uselibusb and maybe adb to capture the video stream from an Android phone connected to an Ubuntu box with USB?

Cross-platform method for streaming encrypted video over internet through server

I want to stream encrypted video (with audio) captured from a webcam from one computer to another over the internet with a server in between to forward the video. The program to display the encrypted video will be written in C++ and must be cross-platform; this program will have other functions, so I can't use a currently existing program. The program to stream the video from the webcam must run on Linux. I could use a program already available or write my own in C++.
Try VLC + encypted VPN. It's stable crossplatform solution.

How can I stream video from my application to the web?

I have an application that grabs video from multiple webcams, does some image processing, and displays the result on the screen. I'd like to be able to stream the video output on to the web - preferably to some kind of distribution service rather than connecting to clients directly myself.
So my questions are:
Do such streaming distribution services exist? I'm thinking of something like ShoutCAST relays, but for video. I'm aware of ustream.tv, but I think they just take a direct webcam connection rather than allow you to send any stream.
If so, is there a standard protocol for doing this?
If so, is there a free library implementation of this protocol for Win32?
Ideally I'd just like to throw a frame of video in DIB format at a SendToServer(bitmap) function, and have it compress, send, and distribute it for me ;)
Take a look at video LAN client (or VLC for short) as a means for streaming video.
As for distribution sites, I don't know how well it works with ustream.tv and similar new services.
ustream.tv works by using Adobe Flash's support for reading input from a webcam. To fake it out, you need a fake webcam driver. Looking on the ustream.tv site, they point to an application called WebCamMax that allows effects and splicing in video. It works by creating a pseudo-webcam that mixes video from one or more cameras along with other sources. Since that app can do it, your own code could do that too, although you'll probably need to write a Windows driver to get it all working correctly.