[Live-devel] Help with live streaming h.264 frames

Flavio Alves flavio.alves at vitalintelligencedata.com
Wed Apr 24 13:46:56 PDT 2024


Hi Ross,

Thank you for your response.

Indeed ... I'm struggling with the latency challenge.

My first implementation uses the approach you mentioned. I implemented it
using x264 and it worked fine.

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.

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.

Best regards,

Flavio

On Sun, 21 Apr 2024 at 22:56, Ross Finlayson <finlayson at live555.com> wrote:

>
>
> > On Apr 18, 2024, at 1:07 PM, Flavio Alves <
> flavio.alves at vitalintelligencedata.com> wrote:
> >
> > Hello,
> >
> > I'm working on a live streaming service using Live55 using an Nvidia
> Jetson Nano board.
> >
> > 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.
> >
> > 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.
> >
> > 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.
>
> 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.
>
> 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.)
>
> For a model of how to do this, see “liveMedia/DeviceSource.cpp”
>
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20240424/86f66703/attachment.htm>


More information about the live-devel mailing list