# RSTP Camera: "send by message" bug

**URL:** <https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856>\
**Category:** Développement\
**Created:** [January 18, 2023, 2:54pm UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856 "2023-01-18T14:54:26Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [January 18, 2023, 2:54pm UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/1 "2023-01-18T14:54:26Z")

</div>

Hi,

Can you confirm for me that this is a bug?

My camera is visible :

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/7/772d882ad7d477d0f0e2a475ef83305d4eb9f674.png)

But when in a scene I ask to retrieve and send the latest image, I get nothing :

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/6/6388209b7ae89e9920bcc125e30292590d9b92a1.png)

---

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [January 18, 2023, 3:11pm UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/2 "2023-01-18T15:11:11Z")

</div>

After some research, I confirm two things :

1. It’s probably a bug
2. There’s an error with ffmpeg

Update every 2 seconds, after a few minutes:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/9/9ddfad19e29ccd0d7a2b4c7f508cfc2d38c07011.png)

Same, one minute later:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/a/a34077bac6dfe108b5a30a58a49566af57c695e9.png)

Same one minute later:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/5/5968a3ce1ef1790a0d7a11f711ce873a94473c33.png)

You can see a lot of new ffmpeg threads, never closed (should there be a 2-second timeout otherwise?).

Finally, I changed the port used for RTSP on my camera (#DIY) and I still see threads using the old port. Proof they were not stopped in time.

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/0/0e262b10902b7b4d5eb61c774610ac430d34f024.png)

Note: I use the camera on only one dashboard, **which wasn’t even open** at the time of the tests and screenshots.

So it’s 100% related to this thread: [Gladys utilisation de la ram](https://community.gladysassistant.com/t/gladys-utilisation-de-la-ram/7821)

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [January 18, 2023, 7:24pm UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/3 "2023-01-18T19:24:27Z")

</div>

What’s your refresh rate?

For me, the request via chat works.

---

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [January 18, 2023, 7:51pm UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/4 "2023-01-18T19:51:34Z")

</div>

Is it possible to display in Gladys the % of RAM used by the system?  
Like the ping or the % of disk used.

---

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [January 18, 2023, 8:24pm UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/5 "2023-01-18T20:24:45Z")

</div>

With a refresh rate of 1min I only have a single process left, indeed.  
But originally I would have wanted quasi-live, hence the 10 seconds for my part.  
And I agree that there is really a bug at that level which is still quite annoying — to say «&nbsp;who cares, leave it at 1min&nbsp;» 😛

Is a timeout possible?  
Or is it simply impossible?

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [January 18, 2023, 8:39pm UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/6 "2023-01-18T20:39:24Z")

</div>

I see it differently, the refresh should stay as is. Maybe even remove the 1s refresh. And see how we could set up a live stream.

And that would be comfortable because we’d have a Dashboard that stays light and if live is needed you click on the image or a button.

I don’t know if that’s clear 😅

---

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [January 18, 2023, 8:44pm UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/7 "2023-01-18T20:44:46Z")

</div>

Both points are indeed justified 🙂  
I had made a request a while ago to zoom the camera on click.  
Maybe that’s what would make the stream more interesting 🙂

---

<div class="post-metadata">

**Author:** ![GBoulvin](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gboulvin/32/10006_2.png) [@GBoulvin](https://community.gladysassistant.com/u/GBoulvin)\
**Post date:** [January 18, 2023, 8:47pm UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/8 "2023-01-18T20:47:50Z")

</div>

To display the stream, we discussed it here:

> [@Accéder au flux vidéo en direct en cliquant sur l'aperçu du Dashboard](https://community.gladysassistant.com/t/acceder-au-flux-video-en-direct-en-cliquant-sur-lapercu-du-dashboard/5972/2):
>
> c’est une feature qui m’intéresse et je vais chercher comment faire après ma mise à jour du module caméra

---

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [January 18, 2023, 8:49pm UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/9 "2023-01-18T20:49:22Z")

</div>

Very good memory, or research ^^, January 2021 haha that takes me back  
Too bad that @pierre-gilles has closed the thread ^^

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [January 18, 2023, 9:19pm UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/10 "2023-01-18T21:19:54Z")

</div>

Well, we’ll reopen it, I think.

---

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [January 18, 2023, 9:50pm UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/11 "2023-01-18T21:50:16Z")

</div>

To answer the questions, I was trying to have a continuous stream with the 1-second option.  
It was running fine, except for the reported bug.

---

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [January 18, 2023, 9:51pm UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/12 "2023-01-18T21:51:27Z")

</div>

Isn’t it possible to put a continuous stream on the dashboard only when it’s visible?

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [January 19, 2023, 1:57am UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/13 "2023-01-19T01:57:31Z")

</div>

> [@lmilcent](#):
>
> To answer the questions, I was trying to have a continuous stream with the 1-second option.  
> It ran fine, except for the reported bug.

Yes it’s indeed a bug as said in the other thread, we need to investigate, it shouldn’t be too serious. Regression on the ffmpeg side in my opinion / or a change related to Node 18 in the management of child processes. In any case it’s a bug to fix, we can keep the other thread for that 🙂

I haven’t had time to look yet, if someone wants to do the research it would help me 😃

> [@spenceur](#):
>
> Too bad that @pierre-gilles closed the thread ^^

I closed the thread because it was a duplicated request with a request that had more votes:

> [@Afficher l'image en direct d'une caméra en plein écran depuis le dashboard](https://community.gladysassistant.com/t/afficher-la-camera-en-pleine-ecran-depuis-le-dashboard/6610):
>
> Je souhaiterais pouvoir, depuis le dashboard, agrandir la camera pour ainsi mieux la visualiser.

Even though I agree @spenceur, your request doesn’t seem to say exactly that, but in any case I had understood that you wanted to open the live stream from the front end.

The live topic interests me a lot and on the contrary it’s a topic I worked on a bit at the end of the year (for now only at the research stage)

I managed to do conclusive tests that could lead to a development if it’s a highly requested feature.

In any case it’s a dev in the «&nbsp;very large development&nbsp;» category, because on the Gladys Plus side it’s a whole end-to-end encrypted video streaming infra that needs to be put in place. Very exciting but time-consuming project, it’s a multi-month project in my opinion 🙂

---

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [January 19, 2023, 6:57am UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/14 "2023-01-19T06:57:05Z")

</div>

Ah yes I had forgotten my ticket ahah ^^’  
Great if you were able to start looking into the subject 🙂  
Thanks for your feedback!  
As mentioned above, switching to 1 minute is a medium-term solution while waiting for someone to look at the real issue, thanks!

---

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [January 19, 2023, 9:55am UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/15 "2023-01-19T09:55:54Z")

</div>

It’s true that I hadn’t thought about the Gladys Plus infrastructure. Especially if (or when) the number of users becomes significant, streaming is resource-intensive!

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [January 20, 2023, 2:09am UTC](https://community.gladysassistant.com/t/rstp-camera-bug-envoyer-par-message/7856/16 "2023-01-20T02:09:46Z")

</div>

> [@spenceur](#):
>
> Ah yes I had forgotten my ticket haha ^^’

I edited it so it talks about the live stream, does that work for you?
