Ozeki Camera Recorder Stat

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.

Figure 1 - Playing RTSP stream broadcasted by VLC

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...

Figure 2 - Media menu

In the [Open Media] window select the Network tab, enter the network URL of the RTSP camera device and click the Stream button.

Figure 3 - Specifying the RTSP address of the camera

In the following window click the Next button.

Figure 4 - Clicking on 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.

Figure 5 - Selecting streaming type

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.

Figure 6 - Providing the URL

In the following window leave the Activate Transcoding checkbox unchecked and click the Next button.

Figure 7 - Transcoding options

In the following window activate the Stream all elementary streams checkbox and click the Stream button.

Figure 8 - Playing and streaming video 1

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.

Figure 9 - Playing and streaming video 2

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.

Figure 10 - Opening CameraViewerONVIF example

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.

Figure 11 - Selecting the VLC stream

As you can see the URL was inserted to the Camera URL field, click to Connect button...

Figure 12 - Connecting to the stream

and the stream should start.

Figure 13 - Playing the stream

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.

Figure 14 - Selecting the stream again

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.

Figure 15 - Building URL using camera wizard

After the completion of the fields you can use the Preview button to make sure that the URL is correct and the stream works.

Figure 16 - Clicking on the preview button

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.

Figure 17 - Closing the preview window and connecting to the stream

As you can see above, you can easily connect to VLC media player RTSP stream with Ozeki Camera SDK.

Related Pages


Below you can find the answers for the most frequently asked questions related to this topic:

  1. 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.
  2. Why is the camera moving, when I am not using it?

    It is possible that someone else is also using the camera.

  3. Why cannot I turn the camera in bigger angle than the current?

    Because all cameras have a limit in rotation.