How to connect to RTSP camera stream, broadcasted by VLC media player
With OZEKI Camera SDK you can connect to an RTSP camera, you can customize and forward the stream which can be received for example with the widely used VLC media player and you can also connect to streams broadcast by VLC media player with RTSP protocol. On this webpage you will find detailed information on how to connect to an RTSP camera device with VLC media player, how to broadcast the RTSP camera stream with VLC media player, and how you can connect to VLC media player's RTSP stream with OZEKI camera SDK.
Download VLC media player
VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVDs, Audio CDs, VCDs, and various streaming protocols, You can download the VLC media player from the homepage of the VideoLAN project: http://www.videolan.org/ and you can install within a few easy steps.
Broadcasting RTSP camera stream with VLC
Open VLC media player and go to Media > Stream...
In the [Open Media] window select the Network tab, enter the network URL of the RTSP camera device and click the Stream button.
In the following window click the Next button.
For New destination select RTSP, it is recommended to activate the Display locally check-box to be able to see the RTSP camera stream which you are broadcasting. Finally click the Add button.
Now in the new RTSP tab you can set the port number and the session (Path) for the stream, finally click the Next button. Later you can use the IP address of your PC, the port number and the session name to construct the RTSP URL of the VLC stream.
In the following window leave the Activate Transcoding checkbox unchecked and click the Next button.
In the following window activate the Stream all elementary streams checkbox and click the Stream button.
The broadcast will start after some buffering and within a few seconds the VLC media player will display the media correctly although it is possible that at the start you will experience some minor picture errors.
Connecting to VLC media player RTSP stream with Ozeki Camera SDK
Now let's see how can you connect to the stream presented above.
Ozeki camera SDK gives you solutions for constructing RTSP URL from IP address, port number and session name. The VLC RTSP stream can be accessed with the IP address of the PC. In the following part you will find a simple example for how can you connect to the VLC RTSP stream with one of the simplest demo applications from Ozeki Camera SDK, CameraViewerONVIF.
Open CameraViewerONVIF and click the Compose button.
The Camera URL Builder window will list all of the available streaming sources such as USB cameras and IP cameras or other streaming sources on the local network.
You can select the proper address from the list or add one manually with Add button. We will present an example for both possibilities.
Select the address of the VLC RSTP stream and click the Ok button.
As you can see the URL was inserted to the Camera URL field, click to Connect button...
and the stream should start.
Let us jump a few steps back to discuss about the Add button in the Camera URL Builder window. Click on to the Add button.
In the Add Camera Wizard window click the Build URL button, and you can customize the url and the transport layer protocol (UDP or TCP). The transport layer protocol is very important, if you can't connect to the stream you can try to switch the protocol.
After the completion of the fields you can use the Preview button to make sure that the URL is correct and the stream works.
Finally close the preview window, click the Ok button and select the New entry from the list in the Camera URL Builder window, then click the Ok button and connect to the stream.
As you can see above, you can easily connect to VLC media player RTSP stream with Ozeki Camera SDK.
Related Pages
FAQ
Below you can find the answers for the most frequently asked questions related to this topic:
-
I have not managed to build the solution. How to solve it?
- Please set the Target framework property of the project to .NET 4.0.
- You should add the OzekiSDK.dll to the references of the solution.
- Please import the missing classes.
-
Why is the camera moving, when I am not using it?
It is possible that someone else is also using the camera.
-
Why cannot I turn the camera in bigger angle than the current?
Because all cameras have a limit in rotation.
More information
- How to forward PTZ instructions in C#
- How to turn your USB camera into an Onvif IP webcam in C#
- How to turn your old RTSP ip camera into an Onvif IP webcam in C#
- Send video to Iphone Android mobile in C#
- C# stream video to multiple locations simultaneously
- How to make your software discoverable by other applications in C#
- Connect to RTSP camera stream, broadcasted by VLC media player
- How to find not Onvif cameras on the network
- How to compress h.263 and h.264 codec in C#