AirenSoft / OvenMediaEngine

OvenMediaEngine (OME) is a Sub-Second Latency Live Streaming Server with Large-Scale and High-Definition. #WebRTC #LLHLS
https://OvenMediaEngine.com/ome
GNU Affero General Public License v3.0
2.53k stars 1.06k forks source link

WebRTC playback not working #1057

Closed hernanrz closed 1 year ago

hernanrz commented 1 year ago

Describe the bug WebRTC never starts playing after upgrading OME, LLHLS playback works ok

To Reproduce Steps to reproduce the behavior:

  1. Use ome docker image with 0.15.1 0.15.0 or 0.14.18 tags with Server.xml: https://gist.github.com/hernanrz/c30f0c319e4321c3830edf79ad63bf2c
  2. Start stream with obs
  3. Attempt webrtc playback on demo page (from a remote machine, when testing on the same machine the server is running it works)
  4. Player is stuck loading then shows the play button again

Expected behavior Playback should start

Logs ome.txt

Server (please complete the following information):

Player (please complete the following information):

Additional context Add any other context about the problem here.

getroot commented 1 year ago

what was your docker command? Also what was the playback url for your webrtc?

from a remote machine, when testing on the same machine the server is running it works

Does it mean that if you try local playback on a machine running OME, playback works fine? If so, have you checked your firewall? Are 10000-10005/udp and 3478/tcp open to the outside?

hernanrz commented 1 year ago

we're using docker-compose up

with docker-compose.yml

version: '3.3'
services:
  ovenmediaengine:
      image: ovenmediaengine
      env_file: .env
      network_mode: host
      volumes:
          - $SSL_FULLCHAIN_PATH:/opt/ovenmediaengine/fullchain.pem:ro
          - $SSL_PRIVKEY_PATH:/opt/ovenmediaengine/privkey.pem:ro
          - $SSL_CERT_PATH:/opt/ovenmediaengine/cert.pem:ro
          - $RECORDINGS_PATH:/mnt/recordings
          - $DVR_PATH:/tmp/ome_dvr
      restart: always
      labels:
        autoheal: true
      deploy:
        resources:
          limits:
            memory: 50G

Dockerfile

FROM airensoft/ovenmediaengine
RUN apt-get update && apt-get install -y curl

WORKDIR /opt/ovenmediaengine/bin

COPY ./Server.xml /opt/ovenmediaengine/bin/origin_conf/Server.xml
COPY ./Logger.xml /opt/ovenmediaengine/bin/origin_conf/Logger.xml
COPY EdgeConfig.xml ./edge_conf/Server.xml

COPY entrypoint.sh .

CMD ["bash", "entrypoint.sh"]

Does it mean that if you try local playback on a machine running OME, playback works fine? If so, have you checked your firewall? Are 10000-10005/udp and 3478/tcp open to the outside?

Correct, I will check the firewall on the server

naanlizard commented 1 year ago

Notably, this happened with the same firewall settings that worked fine for webrtc on earlier versions of OME

getroot commented 1 year ago

The logic of the modules affecting WebRTC playback (Signaling, ICE) has not changed recently. From version 0.14.18 to 0.15.2 WebRTC works very well in my environment. Would you like to test it out at https://space.ovenplayer.com/? It has 0.15.1 installed now.

Could you try playing with TCP (?transport=tcp)? If that goes well, maybe you tried playing with TCP before and now you're testing with UDP. If so, it seems likely that the UDP port has been blocked in the firewall for a long time.

naanlizard commented 1 year ago

Our player setup didn't change, we simply updated the server in place. I believe at all times we use tcp

On Tue, Mar 7, 2023 at 06:39 Jeheon Han @.***> wrote:

The logic of the modules affecting WebRTC playback (Signaling, ICE) has not changed recently. From version 0.14.18 to 0.15.2 WebRTC works very well in my environment. Would you like to test it out at https://space.ovenplayer.com/? It has 0.15.1 installed now.

Could you try playing with TCP (?transport=tcp)? If that goes well, maybe you tried playing with TCP before and now you're testing with UDP. If so, it seems likely that the UDP port has been blocked in the firewall for a long time.

— Reply to this email directly, view it on GitHub https://github.com/AirenSoft/OvenMediaEngine/issues/1057#issuecomment-1458018627, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV4BWPHPMYOOABVYMIOM7DW24NAXANCNFSM6AAAAAAVQJJSPQ . You are receiving this because you commented.Message ID: @.***>

getroot commented 1 year ago

The log file doesn't show the connection to WebRTC/TCP. (Although it may be hidden in Logger.xml)

The important thing seems to be the fact that it is played locally. If playback fails only remotely, it's likely either a firewall problem or an ICE candiate extraction problem.

If you send the WebRTC playback URL to support@airensoft.com I will check further.

hernanrz commented 1 year ago

After further testing we weren't able to reproduce the problem either, we'll be closing this ticket. Thank you for your help @getroot