So yes, I understand the need for a custom URL and I have already added that as you requested. I would like it for the user to be able to just type in the IP, the name, etc like I had done for HTTP, but I understand that won't be possible if all the camera stream URL's are different. The problem now is that the different protocols will have different settings/options that need to be set in the code in order for them to work properly. Here is the list from their website:
ffmpeg.org/ffmpeg-protocols.html. I tried connecting to an RTSP stream using the same options that I had set for the other methods of connection. It failed to connect. One issue is the "timeout" option that was required for capture devices and for IP cameras with http access, but apparently means something completely different for an RTSP stream. There seems to be a separate option called "listen_timeout" that only exists for RTSP. It worked better when I disabled the timeout for RTSP, but I will need to investigate it since it was important in the others. There is another option called "rtsp_transport" that may or may not be needed to get it to work right. Regardless, once I got it so it connected, I tried to get a frame the way I do with the other protocols and it crashed inside one of the ffmpeg libraries. So, I will need to spend some more time investigating this.
Note that I am not accessing the separate FFMPEG program via an external command line command, I am using libavformat and other internal methods and objects of ffmpeg to get this to work. So it might work a little differently than it does from the command line. So something that "just works" at the command line might require a little internal finagling to get it to work internally.
One concern that I have about introducing the custom URL is that people will try other protocols that may or may not work properly because they require special commands or options internally. But I think it is still important so I added it as you requested. We can work out those issues in the future I guess.