bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
11.4k stars 1.45k forks source link

webRTC video artifacts #3550

Closed Pepslee closed 1 month ago

Pepslee commented 1 month ago

v1.8.3

Which operating system are you using?

Linux amd64 standard + Linux arm64 standard

Description

I have two mediamtx servers:

  1. remote server on arm64 (192.168.1.2)
  2. local server on amd64 (0.0.0.0)

There is a gstreamer pipeline on the remote device with rtspclientsync which reads from the camera and publishes into mediamtx. Pipeline and mediamtx are on the same host.

Locally I have mediamtx which pulls from remote mediamtx via webrtc whep: Part of the config that describes the path

paths:
  local:
     source: "whep://192.168.1.2:8889/remote/whep"

I opened in the browser http://192.168.1.2:8889/remote And another page is http://0.0.0.0:8889/local So I try to open the stream directly from remote mediamtx and local mediamtx, which pulls the same stream from the same remote mediamtx. The picture from remote mediamtx looks great, but a picture from local mediamtx has some artifacts. (attached video and logs from both mediamtx instances). The network connection between local and remote devices is cellular, so bandwidth is unstable.

local_log.txt remote_log.txt

https://github.com/user-attachments/assets/7c87821c-e508-46dc-90e4-deede50051c3

artifact timestamps: 00:18 00:34 00:47 01:33 01:42

I tried one more approach, to pull from remote mediamtx to local mediamtx with rtsp:

paths:
  local:
     source: "rtsp://192.168.1.2:8554/remote"

reading rtsp with gstreamer With this approach, there are no artifacts, but the stream that I read directly from remote mediamtx is great, but the stream from local mediamtx is freezing and delayed.

Is there any way to fix these glitches and artifacts during webrtc to webrtc streaming? Thanks in advice

github-actions[bot] commented 1 month ago

This issue is being automatically closed because it does not follow the issue template. Please reopen the issue and make sure to include all sections of the template.