Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WebRTC] Gstreamer sample code not working, server never gets the stream. #3573

Closed
2 of 13 tasks
VanderBieu opened this issue Jul 24, 2024 · 2 comments
Closed
2 of 13 tasks

Comments

@VanderBieu
Copy link

VanderBieu commented Jul 24, 2024

Which version are you using?

v1.8.4

Which operating system are you using?

  • Linux amd64 standard
  • Linux amd64 Docker
  • Linux arm64 standard
  • Linux arm64 Docker
  • Linux arm7 standard
  • Linux arm7 Docker
  • Linux arm6 standard
  • Linux arm6 Docker
  • Windows amd64 standard
  • Windows amd64 Docker (WSL backend)
  • macOS amd64 standard
  • macOS amd64 Docker
  • Other (please describe) macOS arm64 standard

Describe the issue

The gstreamer command cannot properly stream video to the server. The log shows nothing publishing to the server.

Describe how to replicate the issue

  1. start the server with default setting
  2. publish with gstreamer command line gst-launch-1.0 videotestsrc \ ! video/x-raw,width=1920,height=1080,format=I420 \ ! x264enc speed-preset=ultrafast bitrate=2000 \ ! video/x-h264,profile=baseline \ ! whipclientsink signaller::whip-endpoint=http://localhost:8889/mystream/whip
  3. read with browser

Did you attach the server logs?

yes.
2024/07/24 19:43:56 INF MediaMTX v1.8.4
2024/07/24 19:43:56 INF configuration loaded from C:\Users\xwh\Projects\mediamtx_v1.8.4_windows_amd64\mediamtx.yml
2024/07/24 19:43:56 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)
2024/07/24 19:43:56 INF [RTMP] listener opened on :1935
2024/07/24 19:43:56 INF [HLS] listener opened on :8888
2024/07/24 19:43:56 INF [WebRTC] listener opened on :8889 (HTTP), :8189 (ICE/UDP)
2024/07/24 19:43:56 INF [SRT] listener opened on :8890 (UDP)

Nothing happened.

Did you attach a network dump?

no. I tested on localhost.

@VanderBieu
Copy link
Author

OBS and browser worked fine, so it seems this has nothing to do with my platform.

@aler9
Copy link
Member

aler9 commented Sep 15, 2024

Hello, the command you posted:

videotestsrc ! video/x-raw,width=1920,height=1080,format=I420 ! x264enc speed-preset=ultrafast bitrate=2000 ! video/x-h264,profile=baseline ! whipclientsink signaller::whip-endpoint=http://localhost:8889/mystream/whip

works perfectly:

2024/09/15 22:26:58 INF [WebRTC] [session d2fc0db6] created by 127.0.0.1:60154
2024/09/15 22:26:58 INF [WebRTC] [session d2fc0db6] peer connection established, local candidate: host/udp/192.168.3.26/8189, remote candidate: host/udp/192.168.3.26/35399
2024/09/15 22:26:59 INF [WebRTC] [session d2fc0db6] is publishing to path 'mystream', 1 track (H264)

In your server logs there's no trace of incoming connections. Make sure that GStreamer and the server can communicate correctly, otherwise adjust the IP address accordingly.

@aler9 aler9 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants