<div dir="ltr">Hi Ross,<div><br></div><div>Thank you for your response.<br><br>Indeed ... I'm struggling with the latency challenge.</div><div><br></div><div>My first implementation uses the approach you mentioned. I implemented it using x264 and it worked fine.</div><div><br></div><div>But my requirement is to use the Nvidia Jetson Nano hardware encoder. Nvidia provides an API to handle the encoder. This API uses threads for the encoder and select() for V4L communication. On my implementation, when I executed everything, the Live555 worked fine and the Encoder thread got stuck, because the use of the select() is also blocking.</div><div><br></div><div>Do you have any experience using Nvidia Jetson multimedia API with Live555 on a single application? Just telling me that it works is enough to get back to that path.</div><div><br></div><div>Best regards,</div><div><br></div><div>Flavio <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 21 Apr 2024 at 22:56, Ross Finlayson <<a href="mailto:finlayson@live555.com">finlayson@live555.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On Apr 18, 2024, at 1:07 PM, Flavio Alves <<a href="mailto:flavio.alves@vitalintelligencedata.com" target="_blank">flavio.alves@vitalintelligencedata.com</a>> wrote:<br>
> <br>
> Hello,<br>
> <br>
> I'm working on a live streaming service using Live55 using an Nvidia Jetson Nano board.<br>
> <br>
> I'm capturing the frames from an USB webcam and I am encoding using Nvidia's hardware encoder. Then Live555 is responsible for streaming this capture using RTSP.<br>
> <br>
> The Nvidia software api to use the encoder uses some threads, and I was unable to use it in a single application. I implemented 2 applications: the RTSP server and the Capture application.<br>
> <br>
> The communication between them is shared memory, in Linux. I implemented a circular buffer on this shared memory to place the encoded frames, which are seen by the RTSP server application.<br>
<br>
The problem with this solution is that having the encoder application write H.264 NALs to a shared buffer, and the the RTSP server application read H.264 NALs from the shared buffer will add some extra latency. If this latency is OK for you, then fine.<br>
<br>
But if not, then I suggest instead trying to have the encoder and the RTSP server be part of the same application (i.e., process), but as separate threads. One thread (just one) will run LIVE555 code (the RTSP server). The other thread (the encoder) would signal the availabilty of each new, just-encoded H.264 NAL by calling “triggerEvent()”. (This is the only LIVE555 function that can be called by a non-LIVE555 thread.)<br>
<br>
For a model of how to do this, see “liveMedia/DeviceSource.cpp”<br>
<br>
<br>
Ross Finlayson<br>
Live Networks, Inc.<br>
<a href="http://www.live555.com/" rel="noreferrer" target="_blank">http://www.live555.com/</a><br>
<br>
<br>
_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com" target="_blank">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" rel="noreferrer" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
</blockquote></div>