Eyevinn / srt-whep

SRT to WHEP (WebRTC)
Apache License 2.0
69 stars 9 forks source link

Cannot access preview on port 8000 #39

Closed cosec90 closed 1 year ago

cosec90 commented 1 year ago

After running the docker commands, I am not able to get preview of the file at port 8000. Also the webpage dosent open on port 8000

Please refer the images attached below.

srt-error-2 srt-error
birme commented 1 year ago

Hi! You need to ensure that you are running in host-mode which is mainly supported on docker engine on Linux.

cosec90 commented 1 year ago

Hi, I am running this on ubuntu 20.04. I am not sure what do you mean by host-mode, can you please elaborate? Used below command to run in sudo

docker run --rm --network host eyevinntechnology/srt-whep \ -i : \ -o 0.0.0.0:8888 \ -p 8000 -s caller

birme commented 1 year ago

Ok, yes that is correct. What WHEP player and browser are you using?

cosec90 commented 1 year ago

I am using this https://webrtc.player.eyevinn.technology/?type=whep player on chrome

Wkkkkk commented 1 year ago

Hi @cosec90, thanks for trying it out. It'd be great if you could share some context about the input SRT stream that you are using. For example, is it generated by FFmpeg, or which video profile it is using? Also, some screenshots of chrome console would be helpful.

Wkkkkk commented 1 year ago

Hi, I did a quick check myself on Ubuntu and it works fine. To find out the problem, it might be a good idea to generate a testing input stream with command

## This requires gstreamer
gst-launch-1.0 -v videotestsrc ! clockoverlay ! video/x-raw, height=360, width=640 ! videoconvert ! \
    x264enc tune=zerolatency ! video/x-h264, profile=main ! \
    mpegtsmux ! srtsink uri="srt://127.0.0.1:1234?mode=listener" wait-for-connection=false
Wkkkkk commented 1 year ago

You are welcome to try out this testing stream with docker too.

## Generate an SRT stream (bars & tones)
docker run --rm -p 1234:1234/udp eyevinntechnology/testsrc

## Connect to it (in host network)
docker run --rm --network host eyevinntechnology/srt-whep \
  -i 127.0.0.1:1234 \
  -o 0.0.0.0:8888 \
  -p 8000 \
  -s caller | bunyan

## Play out with WebRTC Player, URL is
http://localhost:8000/channel
cosec90 commented 1 year ago

Hi, sorry for the delayed response.

On following the above steps I got this error (from srt-whep container) while trying to play stream on webrtc player

srt-whep-error1

Using chrome webrtc extension, I got this

srt-whep-error2

Can you tell me what am I doing wrong here?

cosec90 commented 1 year ago

For creating srt stream I am using wms (nimble) panel and video resolution is 1280x720

Thanks

Wkkkkk commented 1 year ago

Hi, thanks for trying out.

This problem occurs quite often as the tool to generate SRT stream might be incompatible to each other. For example, stream generated by ffmpeg might fail to play with gstreamer/VLC on MacOS. A more comprehensive test can be seen here.

We are working to address this issue at full speed. In the mean time, you are welcome to use our sample SRT stream for a quick test.

cosec90 commented 1 year ago

Hi, thanks for your help.

I think its more of webrtc issue. As soon as I try to connect the server, the request fails with status code 400. Also I tried using your sample srt stream docker image but got the same results.

Also I can play the srt stream in VLC on port 8888

birme commented 1 year ago

I suspect the issue is when joining the SRT/MPEG-TS stream. As Kun said we are actively working on addressing this

Wkkkkk commented 1 year ago

Kind reminder to @cosec90 that we have solved this problem. You are welcome to have another try.