erdnaxe / galene-stream

Gateway to send UDP, RTMP, SRT or RIST streams to Galène videoconference server.
MIT License
24 stars 5 forks source link

RTX is not enabled #3

Open erdnaxe opened 3 years ago

erdnaxe commented 3 years ago

Observation:

So have_rtx=False, so transport_stream_get_pt (stream, "RTX") == 0 in our case, which is wrong.

We want RTX for frame retransmission. I tried forcing it with a rtprtxsend before the webrtcbin but it was an ugly and non-working hack.

erdnaxe commented 3 years ago

Galène expect the retransmission on the main track. GStreamer does not seem to support this mode. So there is a need to implement RTX on a separate track in Galène (https://tools.ietf.org/html/rfc4588).

erdnaxe commented 3 years ago

GStreamer does not seem to support this mode.

Actually it seems that rtprtxqueue can retransmit with the same SSRC. Although it seems to fulfill requests when using it on video track, the pipeline crashes.

2021-04-26 10:53:10,934 [galene_stream.webrtc] INFO Setting local description
2021-04-26 10:53:10,954 [galene_stream.webrtc] INFO Setting remote session description
0:00:25.009190290 20856      0x1275240 WARN                 tsdemux tsdemux.c:2473:gst_ts_demux_queue_data: CONTINUITY: Mismatch packet 3, stream 1
0:00:25.070080168 20856 0x7fa288002240 WARN                   vaapi gstvaapidecoder_h264.c:4343:decode_unit: unknown NAL unit type id 0, skip
0:00:25.427817383 20856 0x7fa28c0c2c00 WARN           audioresample gstaudioresample.c:720:gst_audio_resample_check_discont:<audioresample0> encountered timestamp discontinuity of 1422 samples = 0:00:00.032244898
0:00:25.972776250 20856 0x7fa2882388c0 WARN                 srtpenc gstsrtpenc.c:1190:gst_srtp_enc_process_buffer:<srtpenc0> error: Unable to protect buffer (protect failed) code 9
0:00:26.028373810 20856      0x1275240 WARN                 basesrc gstbasesrc.c:3127:gst_base_src_loop:<source> error: Internal data stream error.
0:00:26.028418900 20856      0x1275240 WARN                 basesrc gstbasesrc.c:3127:gst_base_src_loop:<source> error: streaming stopped, reason error (-5)
0:00:26.029312329 20856 0x7fa288002240 WARN                   queue gstqueue.c:990:gst_queue_handle_sink_event:<vaapi-queue> error: Internal data stream error.
0:00:26.029369236 20856 0x7fa288002240 WARN                   queue gstqueue.c:990:gst_queue_handle_sink_event:<vaapi-queue> error: streaming stopped, reason error (-5)
2021-04-26 10:54:09,877 [galene_stream.galene] INFO Closing WebSocket connection
erdnaxe commented 2 years ago

Upstream issue: https://github.com/pion/webrtc/issues/1675#issuecomment-797252369