deepch / RTSPtoWeb

RTSP Stream to WebBrowser
MIT License
1.26k stars 300 forks source link

Docker not Working correctly #112

Open shadow05139 opened 2 years ago

shadow05139 commented 2 years ago

Configuring with command : docker run --name rtsp-to-web --network "host" ghcr.io/deepch/rtsptoweb:latest Doesn't provide a connectable Host via 127.0.0.1:8083 or LocalHost:8083, adding -p 8083:8083 does but doesn't provide WEBRTC streams for my cameras

Edit"I did notice the below in cmd after posting might be the issue: level=error msg="WebRTC Client Offline" call=WritePacket channel=0 func=HTTPAPIServerStreamWebRTC"

allenporter commented 2 years ago

Can you elaborate on the problem? I'm not sure I have enough context to understand the issue.

shadow05139 commented 2 years ago

When using the command stated above, I can't access the webpage associated, when I add -p 8083:8083 it's no longer using - network host, hence my camreas setup don't feed back to the home assistant integration

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Allen Porter @.> Sent: Wednesday, March 2, 2022 11:32:49 PM To: deepch/RTSPtoWeb @.> Cc: shadow05139 @.>; Author @.> Subject: Re: [deepch/RTSPtoWeb] Docker not Working correctly (Issue #112)

Can you elaborate on the problem? I'm not sure I have enough context to understand the issue.

— Reply to this email directly, view it on GitHubhttps://github.com/deepch/RTSPtoWeb/issues/112#issuecomment-1056768601, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHM7XMXX4HZ36KBLIYZMFILU547VDANCNFSM5PWXMEIA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>

hellcry37 commented 2 years ago

hello, please learn a bit about docker and you will see why is not working, it has nothing to do with a bug of this software, this can be closed

azrin1972 commented 2 years ago

I'm having the same issue too. If I may suggest to add the -p 8083:8083 to the docker run cmd example in the readme.md

As with @allenporter, I've setup the streams as per manual, I could not get the video to be shown in the demo if its running inside docker but the same configuration works under normal execution (without using docker)

I believe as what as @hellcry37 mention, there's is no issue with the software, its just a matter of configuring docker.

So my ask is may I know what is the right setup for running RTSPToWeb in docker

Thank you

hellcry37 commented 2 years ago

first advice that i can give is dont use 127.0.0.1 or localhost the second one dont map ports use host network mode if you are a pro and want to map ports then use it correctly and finally use docker compose:

version: '3.7'
services:
  rtsptoweb:
    container_name: rtsp-to-web
    image: ghcr.io/deepch/rtsptoweb:latest
    network_mode: host
    privileged: true
    environment:
      - TZ=Europe/Bucharest
    volumes:
      - '/home/docker-files/rtsp-to-web/config.json:/config/config.json'
    restart: unless-stopped

get a good config.json from this repo

azrin1972 commented 2 years ago

Thank you @hellcry37