# IP camera can't connect

**URL:** <https://discuss.bluerobotics.com/t/ip-camera-cant-connect/14391>\
**Category:** QGroundControl\
**Created:** [May 29, 2023, 3:17am UTC](https://discuss.bluerobotics.com/t/ip-camera-cant-connect/14391 "2023-05-29T03:17:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![etienne](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/etienne/32/1942_2.png) [@etienne](https://discuss.bluerobotics.com/u/etienne)\
**Post date:** [May 29, 2023, 3:17am UTC](https://discuss.bluerobotics.com/t/ip-camera-cant-connect/14391/1 "2023-05-29T03:17:03Z")

</div>

Dear all,

I am trying to connect my IP camera but not having much luck.

Using Onvif Device Manager, I can see my camera feed with address: rtsp://192.168.2.88:554/11

 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/5/5c7126b3329878432d9274b1a66380a54dfe4e2b.jpeg)  
I can view the camera feed in VLC  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/0/0d4926c887adb7262190091540e3645538090c0a.jpeg)  
I think I got QGC configured correctly  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/4/4ecc290ae4990aa9a2dffcf72beae2bccbf977e0.png)  
I got no picture.

Hopefully someone can help.

I’ve already read other posts on the subject but couldn’t find a solution.

Cheers,

E.

---

<div class="post-metadata">

**Author:** ![Andres](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/andres/32/5213_2.png) [@Andres](https://discuss.bluerobotics.com/u/Andres)\
**Post date:** [May 31, 2023, 10:08pm UTC](https://discuss.bluerobotics.com/t/ip-camera-cant-connect/14391/2 "2023-05-31T22:08:44Z")

</div>

Hi @etienne ,

I think you are missing a username and password. Example: rtps://user:password@192.168.2.88:554/11

In any case, it seems to me an incomplete rtps address. It should be something like this: rtps://user:password@192.168.2.88:554/video1 or rtps://user:password@192.168.2.88:554/h264/ch1/stream\_0 or something similar.

Watch this video [Find RTSP URL IP Camera Using ODM (Onvif Device Manager) - YouTube](https://youtu.be/1IWTMY6bdWU)

I’ve tried multiple ip cams through rtsp in Qgroundcontrol and whenever they haven’t connected it was due to an incomplete or incorrect address.

I’m thinking now that another option may be that you have to allow remote connection to rtsp, through the web browser of the camera, some have that option, or even for remote access authorization. For example the hikvision cameras to use onvif you have to create a specific user and authenticate it.

Best regards  
Andrés

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [June 2, 2023, 5:13am UTC](https://discuss.bluerobotics.com/t/ip-camera-cant-connect/14391/3 "2023-06-02T05:13:20Z")

</div>

Hi @etienne,

I asked internally in case there were any ideas, and it was suggested that it’s possible QGC’s video pipeline is missing some required compatibility flag for handling your particular stream. In particular

> [@joaoantoniocardoso](#):
>
> this would be [an example gstreamer] pipeline to check if the onvif flag helps:
> 
> ```auto
> gst-launch-1.0 -vc rtspsrc location=rtsp://192.168.0.87:8554/0 is-live=true onvif-mode=true ! decodebin ! autovideosink
> 
> ```

---

<div class="post-metadata">

**Author:** ![etienne](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/etienne/32/1942_2.png) [@etienne](https://discuss.bluerobotics.com/u/etienne)\
**Post date:** [June 2, 2023, 5:50am UTC](https://discuss.bluerobotics.com/t/ip-camera-cant-connect/14391/4 "2023-06-02T05:50:11Z")

</div>

Hi Andres,

Thank you for your response.

As per my previous pictures I got the rtsp from ODM and videolan was fine with it. That said, keeping an open mind, I added the username and password. Same results. VLC is ok and QGC is not.

Cheers,  
E.

---

<div class="post-metadata">

**Author:** ![etienne](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/etienne/32/1942_2.png) [@etienne](https://discuss.bluerobotics.com/u/etienne)\
**Post date:** [June 2, 2023, 5:55am UTC](https://discuss.bluerobotics.com/t/ip-camera-cant-connect/14391/5 "2023-06-02T05:55:08Z")

</div>

Hi Eliot,

Thank you for looking into it. I am not sure what I am supposed to do with the information. Do I copy and paste the arguments in QGC like this?  
gst-launch-1.0 -vc rtspsrc location=rtsp://192.168.2.88:554/11 is-live=true onvif-mode=true ! decodebin ! autovideosink  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/a/a0e8dc16ea55a58793850a15cfa6243425374899.png)

That didn’t work for me.

Cheers,  
E.

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [June 2, 2023, 7:59am UTC](https://discuss.bluerobotics.com/t/ip-camera-cant-connect/14391/6 "2023-06-02T07:59:07Z")

</div>

> [@etienne](#):
>
> I am not sure what I am supposed to do with the information. Do I copy and paste the arguments in QGC like this?

QGC’s video pipeline can’t be modified without building a new version of QGC. If you’ve got gstreamer installed\[1\] on your (topside) computer then you can test different pipelines to see whether they do or don’t work, and if you find that getting the pipeline to work requires a cap or flag that QGC definitely isn’t using then that could help determine why QGC is failing to properly receive your stream.

Alternatively you might find there’s some other information / URL you need to use, which might get it working in both plain gstreamer and QGC (e.g. if Andres is correct about the address being potentially incomplete / needing a username or password)

* * *

1. Instructions from [this comment](https://discuss.bluerobotics.com/t/how-to-stream-another-cameras-video/9573/3):

---

<div class="post-metadata">

**Author:** ![Andres](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/andres/32/5213_2.png) [@Andres](https://discuss.bluerobotics.com/u/Andres)\
**Post date:** [June 15, 2023, 12:14pm UTC](https://discuss.bluerobotics.com/t/ip-camera-cant-connect/14391/7 "2023-06-15T12:14:30Z")

</div>

Hello @EliotBR

I am testing a new model of IP camera 4k 30 fps that I transmit to qgroundcontrol by rtsp:// protocol

I have tried all the encoding systems that qgroundcontrol offers (DirectX, software, etc) and I have even forced qgroundcontrol to run with my PC’s GPU, but still if I set the camera to its maximum quality (4k/3840 \*2160/h265+/30fps/CBR/Maximum bite rate) has a lot of latency, as you can see in the attached video at the following link:

> **[VID\_20230614\_214236.mp4](https://drive.google.com/file/d/1MJfWRJfZ153KkZIGDerBA1d6ydbgi9ak/view?usp=drivesdk)**
>
> Google Drive file.

If I reduce the image quality, the latency improves, for example in the following settings: (3072\*1728/30fps/ h265+ /VBR/ Bit rate Best quality) or (4k/30fps/h264/VBR/Bit rate best quality ) or (4k/25fps/h265+/VBR/Bit rate best quality). These transmissions have good quality, but without a doubt at their highest quality and a significant improvement is noted.

Thanks to your comments about gstreamer 1.0, I have decided to test this camera directly through gstreamer 1.0 by command line in CMD, and my surprise has been great, since I get an almost instantaneous transmission, with excellent latency, according to the following pipeline , as you can see in the video below is the pipeline:

gst-launch -vc rtsprc location=rtsp://admin:123456@192.168.2.15:554/video1 ! decodebin ! autovideosink sync=false

> **[VID\_20230614\_214359.mp4](https://drive.google.com/file/d/1MGZtk3Vssk8aKr2ruFDCroKXdkkW0QrZ/view?usp=drivesdk)**
>
> Google Drive file.

My doubts are: If qgroundcontrol uses gstreamer 1.0 for video display, why is there such a big difference in latency? What exactly is qgroundcontrol’s pipeline for the rtsp:// protocol?

I think the problem lies in the qgroundcontrol pipeline. In your previous comments you commented that this pipeline cannot be modified without creating a new version of Qgroundcontrol. Would it be too difficult to simply change qgroundcontrol’s rtsps:// pipeline?

I have tested the connection by gstreamer with the same pipeline for 3 different IP cameras, all 4k h265, and with all of them I have the same result, a perfect latency with gstreamer and very late with qgroundcontrol. Therefore, I think it is worth reviewing this topic.

On the other hand I have written a small program through python to control the zoom and focus by cgi commands, and it works very well, so if the visualization in qgroundcontrol was better, the integration of the camera would be perfect, to use in BR2 with the design I do with this camera as you can see in the following photo.

 ![dd717ebc6549e56910c676f4443fc24f7715c5ae_2_1134x1000](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/a/a84809967fdd0b2b0d080c677bb7053e8e58377b.jpeg)

Thank you very much for your help or that of other forum members.

Note: @etienne I hope you have found the solution to your rtsp connection

Andrés

---

<div class="post-metadata">

**Author:** ![Andres](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/andres/32/5213_2.png) [@Andres](https://discuss.bluerobotics.com/u/Andres)\
**Post date:** [July 3, 2023, 2:20pm UTC](https://discuss.bluerobotics.com/t/ip-camera-cant-connect/14391/8 "2023-07-03T14:20:03Z")

</div>

Hi @EliotBR

Any comments on my previous message? I would like to be able to move forward with this problem, and if necessary try to compile a version of qgroundcontrol with a better pipeline for rtsp h265+, but some answers to my doubts would help me.

Very grateful in advance

Andrés

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [July 7, 2023, 11:40pm UTC](https://discuss.bluerobotics.com/t/ip-camera-cant-connect/14391/9 "2023-07-07T23:40:44Z")

</div>

Hi @Andres, apologies for the delay on this.

> [@Andres](#):
>
> If qgroundcontrol uses gstreamer 1.0 for video display, why is there such a big difference in latency?

It’s very possible for different pipelines to have different amounts of latency, depending on how they do their processing and whether there are additional queues and buffers that are intended to provide some form of smoothing / jitter avoidance.

It’s also possible that your installed QGC version does not have access to the same gstreamer plugins as your separate gstreamer installation, so perhaps the latter is able to use hardware decoding where the former is stuck doing it in software, for example.

> [@Andres](#):
>
> What exactly is qgroundcontrol’s pipeline for the rtsp:// protocol?

Honestly I’m not sure - as I understand it QGC’s video pipelines are dynamically created, but [the code](https://github.com/mavlink/qgroundcontrol/blob/Stable_V4.2/src/VideoReceiver/GstVideoReceiver.cc) is challenging to parse, and gstreamer can do all sorts of configuration / element selection internally if it’s asked to automatically convert from one format to another.

@joaoantoniocardoso do you happen to have any insights here, either on how to determine what pipeline and elements QGC is using, and/or whether MAVLink Camera Manager’s WebRTC output is supposed to be able to handle 4k H265-encoded streams (in which case we could test the receiving with Cockpit)?

---

<div class="post-metadata">

**Author:** ![joaoantoniocardoso](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/joaoantoniocardoso/32/8377_2.png) [@joaoantoniocardoso](https://discuss.bluerobotics.com/u/joaoantoniocardoso)\
**Post date:** [July 8, 2023, 2:22am UTC](https://discuss.bluerobotics.com/t/ip-camera-cant-connect/14391/10 "2023-07-08T02:22:27Z")

</div>

@EliotBR, to check what pipeline QGC is creating, one must run QGC with the debug-dump environment variable, like `export GST_DEBUG_DUMP_DOT_DIR=$(pwd)/dots; `, and then use some software to read it, like `xdot dots/somestream-played.dot`. Since it’s using `decodebin3` element to create the decoding elements, each type of stream can potentially have different setups, so I won’t try to reproduce here unless we want to compare different systems/cases.

About the MCM’s WebRTC, there’s no plan for us to support H265 because it’s not supported by many browsers/OSs/platforms, [at least not yet](https://caniuse.com/?search=h265).

---

<div class="post-metadata">

**Author:** ![Andres](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/andres/32/5213_2.png) [@Andres](https://discuss.bluerobotics.com/u/Andres)\
**Post date:** [July 9, 2023, 9:03am UTC](https://discuss.bluerobotics.com/t/ip-camera-cant-connect/14391/11 "2023-07-09T09:03:22Z")

</div>

Hi @EliotBR & @joaoantoniocardoso

There is nothing to excuse, you have to attend to many queries. very grateful for the answer.

So I understand that qgroundcontrol is dynamic in assigning pipelines, which I understand complicates the option of assigning a specific pipeline.

I had also thought about doing it through webRTC, but I already knew that I only handle H264. I have tried to create a pipeline that converts rtsp to udp and visualize it through udp h265 in qgroundcontrol but the result has more delay than connecting directly to qgroundcontrol by rtsp.

Would it be possible to create a version of qgroundcontrol with a fixed pipeline?

Best regards  
Andrés
