CircusMonkey / ros_rtsp

ROS node to subscribe to an image and serve it up as a RTSP video feed.
The Unlicense
103 stars 48 forks source link

nvidia codec #20

Open madjxatw opened 1 year ago

madjxatw commented 1 year ago

Hi, I am working to use GPU-accelerated encoder instead as xh264enc causes considerably high CPU usage. What I am currently doing is simply replacing xh264enc with nvh264enc in the pipeline string and removing those properties not supported by nvh264enc like tune=zerolatency etc. I can see a substantial drop of CPU usage on the sender side, but the receiver side gets higher latency. How could I reconstruct the gstreamer pipeline properly to achieve the same low latency as the original xh264enc? There seems much fewer options that can be used to tune nvh264enc.

CircusMonkey commented 4 months ago

I came across the same problem. I was able to get considerably less latency using CPU and x265 than a GPU. Might be a driver issue, or maybe something is double handling the memory.

Sorry but I no longer have time to work on this further.

You can have a look at what corenel did in his fork? Let me know how it goes.

https://github.com/corenel/ros_rtsp