selkies-project / selkies-gstreamer

Open-Source Low-Latency Linux WebRTC HTML5 Remote Desktop and 3D Graphics / Game Streaming Platform with GStreamer
Mozilla Public License 2.0
237 stars 42 forks source link

Cannot start stream with NvFBC #137

Closed xhejtman closed 2 months ago

xhejtman commented 2 months ago

Sometimes, the browser is unable to sync on the first stream keyframe. Using my nvfbc encoder, I have debug messages showing:

** (python3:9745): WARNING **: 10:45:50.479: got event: 69121, subtype: GstForceKeyUnit

** (python3:9745): WARNING **: 10:45:50.479: Forcing keyframe

** (python3:9745): WARNING **: 10:45:50.503: Forced keyframe

** (python3:9745): WARNING **: 10:45:50.636: got event: 69121, subtype: GstForceKeyUnit

** (python3:9745): WARNING **: 10:45:50.637: Forcing keyframe

** (python3:9745): WARNING **: 10:45:50.669: Forced keyframe

** (python3:9745): WARNING **: 10:45:50.808: got event: 69121, subtype: GstForceKeyUnit

** (python3:9745): WARNING **: 10:45:50.808: Forcing keyframe

** (python3:9745): WARNING **: 10:45:50.836: Forced keyframe

** (python3:9745): WARNING **: 10:45:50.979: got event: 69121, subtype: GstForceKeyUnit

** (python3:9745): WARNING **: 10:45:50.979: Forcing keyframe

** (python3:9745): WARNING **: 10:45:51.003: Forced keyframe

** (python3:9745): WARNING **: 10:45:51.151: got event: 69121, subtype: GstForceKeyUnit

** (python3:9745): WARNING **: 10:45:51.151: Forcing keyframe

** (python3:9745): WARNING **: 10:45:51.169: Forced keyframe

** (python3:9745): WARNING **: 10:45:51.308: got event: 69121, subtype: GstForceKeyUnit

** (python3:9745): WARNING **: 10:45:51.308: Forcing keyframe

** (python3:9745): WARNING **: 10:45:51.336: Forced keyframe

I believe, it is independent of the used encoder. Maybe the keyframe does packet burst and some of it is always lost? It is happening with gstreamer 1.20.3 and 1.24.0, seems to be omnipresent.

After several browser window reload, the stream usually starts.

ehfd commented 2 months ago

@xhejtman Could you post the link for your custom nvfbc plugin?

ehfd commented 2 months ago

In continuum to #30.

xhejtman commented 2 months ago

https://github.com/CERIT-SC/gstreamer-nvimagesrc

ehfd commented 2 months ago

I'm tracking this in #30.