m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
5.96k stars 449 forks source link

Add NVENC support for gstreamer #269

Closed m1k1o closed 1 year ago

m1k1o commented 1 year ago

Nvidia hardware encoding using nvh264enc. Can be merged when following issue is solved:

There is still a problem when using nvh264enc pipeline, if its already running and someone joins that pipeline, no video is shown until pipeline is restarted. Solution would be to restart pipeline everytime when somesone joins. But that is rather hack than solution.

Discussion about this problem is here: https://github.com/m1k1o/neko/issues/193

m1k1o commented 1 year ago

Issue has been fixed by @mbattista, the actual problem was, that nvenc sends SPS and PPS NAL units only at the begining. Those units are needed for encoding to work. Adding h264parse config-interval=-1 ensures, that this is sent weith every keyframe. https://www.cardinalpeak.com/blog/the-h-264-sequence-parameter-set