The URI prefix is not recognized.

I have a video camera on a LAN
I have to request a video stream over this URL

VideoIQ://192.168.12.200:554/Storage/1?t=clock:20150926T04:01:02.000Z-20150926T04:01:12.000Z

however, when Its erroring with the above message on this line
 var req = System.Net.WebRequest.Create(videoUrl);

From what i read, its because it doesn't contain HTTP
I'm trying to write the video stream to file
full code is:

videoUrl = "VideoIQ://192.168.12.200:554/Storage/1?t=clock:20150926T04:01:02.000Z-20150926T04:01:12.000Z";

                const int BUFFER_SIZE = 16 * 1024;
                using (var outputFileStream = File.Create(@"c:\tempVideo\videoText.mp4", BUFFER_SIZE))
                {
                    var req = System.Net.WebRequest.Create(videoUrl);
                    using (var response = req.GetResponse())
                    {
                        using (var responseStream = response.GetResponseStream())
                        {
                            var buffer = new byte[BUFFER_SIZE];
                            int bytesRead;
                            do
                            {
                                bytesRead = responseStream.Read(buffer, 0, BUFFER_SIZE);
                                outputFileStream.Write(buffer, 0, bytesRead);
                            } while (bytesRead > 0);
                        }
                    }
                }

Open in new window

websssAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
how would you open this stream in a browser?
VideoIQ:

\\192.168.12.200:554 wouldn't this work for a stream?
0
websssAuthor Commented:
No it does not
The hardware requires VideoIQ:// otherwise it won't return anything.
0
David Johnson, CD, MVPOwnerCommented:
so you have to "Registers a WebRequest descendant for the specified URI"
and
create the uri web request register prefix
https://msdn.microsoft.com/en-us/library/system.net.webrequest.registerprefix%28v=vs.110%29.aspx
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

ste5anSenior DeveloperCommented:
I don't think your are right.

The hardware will never see the schema VideoIQ://. The schema is used to specify the kind of service. Thus I think your hardware ships with software, which needs to be installed correctly. Normally the schema defines how the connection is made to 192.168.12.200, e.g. the port. But you're also specifing a port, so I guess it's time to rtfm.

Otherwise try a search engine. E.g.

Connecting to your VideoIQ IP camera:
 
Models	Connection Type	Example URL
iCVRHD	MJPEG		http://IPADDRESS/viqcam.mjpg
iCVRHD	VLC 		rtsp://IPADDRESS:554/hiQ.sdp
iCVRHD	VLC		rtsp://IPADDRESS:554/lowQ.sdp
Other	FFMPEG 		http://IPADDRESS/videostream.asf?user=[USERNAME]&pwd=[PASSWORD]&resolution=[WIDTH]*[HEIGHT] 
Other	VLC 		rtsp://IPADDRESS:554/hiQ.sdp 

Open in new window

0
websssAuthor Commented:
Here is a snippet from the Manual which is what i'm using
sdk
I have the windows media player plug in installed, and it plays the video stream fine
The SDK project i'm using that plays this stream has a reference to AxWMPLib
The code which streams to windows media player is
                axWindowsMediaPlayer1.Ctlcontrols.stop();
                axWindowsMediaPlayer1.URL = videoUrl;
                axWindowsMediaPlayer1.Ctlcontrols.play();

However, my requirement is that I need to intercept this video stream, and write to disk as MP4 which is the format the video is sent in (as a stream not a file)
0
ste5anSenior DeveloperCommented:
So you can enter that URL in Windows Media Player? Seems that only that plugin translate your VideoIQ URL.

So I would use a network sniffer to see what's going on.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.