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

I cannot start with a test environment with docker. #218

Closed
Juanfree opened this issue Nov 24, 2020 · 56 comments
Closed

I cannot start with a test environment with docker. #218

Juanfree opened this issue Nov 24, 2020 · 56 comments

Comments

@Juanfree
Copy link

Describe the bug
I think is not a bug, but I am gonna ask you here.

I am trying to make a little test with OvenMediaEngine, I have 3 components:

OvenMediaEngine, OvenPlayer and OBS.

For OvenMediaEngine I am running with the following command:

docker run -d -p 1935:1935 -p 3333:3333 -p 8080:8080 -p 9000:9000 -p 4000-4005:4000-4005/udp -p 10006-10010:10006-10010/udp nairensoft/ovenmediaengine:latest

I am emitting with OBS to the container directly by RTMP, that's is working ok.

But the problem is when I try to watch the video with OvenPlayer, the video never starts.

And I am configuring in OBS:

Server: rtmp://127.0.0.1:1935/app/
Stream key: stream

To Reproduce
Steps to reproduce the behavior:

  1. As Server.xml I am using the same as it's configured on the nairensoft/ovenmediaengine:latest image
  2. With Encoder OBS 26.0.2 (All the config by default)
  3. The error is below.

Expected behavior
I want to watch the video, it's a simple test but I do not know what is happening :(

Logs
[2020-11-24 17:54:31.596] I 12 Monitor | stream_metrics.cpp:119 | A new session has started playing #default#app/stream on the WebRTC publihser. WebRTC(1)/Stream total(1)/App total(1)
[2020-11-24 17:55:02.059] I 26 Monitor | stream_metrics.cpp:144 | A session has been stopped playing #default#app/stream on the WebRTC publihser. Concurrent Viewers[WebRTC(0)/Stream total(0)/App total(0)]

Server (please complete the following information):

  • OS: docker
  • OvenMediaEngine Version: latest

Player (please complete the following information):

  • Browser chrome and firefox
@gcubeda
Copy link

gcubeda commented Nov 24, 2020

For the webRTC I think there is a port to update in the player config. I had to change the host url and a port 3332 to 3333 and it worked as expected.
Or if you just need to watch the video you could play the HLS output using VLC. For this, open VLC, press ctrl+n and paste the m3u8 playlist which by default is http://OME_SERVER_IP/app/YOUR_STREAM_ID/playlist.m3u8

@Juanfree
Copy link
Author

I am connecting with the port 3333, What do yo mean about OME_SERVER_IP?

I am connecting with a docker container, and I am using docker desktop. I am using OME_SERVER_IP=127.0.0.1 but is not working in my laptop. :(

@getroot
Copy link
Member

getroot commented Nov 25, 2020

What was your webrtc URL you entered in ovenplayer? like this
ws://10.231.33.56:3333/app/stream

and check your firewall settings. udp 10005-10010 in/out, tcp 3333, tcp 1935

@Juanfree
Copy link
Author

Juanfree commented Nov 25, 2020

I am using docker desktop.

The server is up and running on 127.0.0.1, I started the server like this:

docker run -d
-p 1935:1935 -p 3333:3333 -p 3334:3334 -p 8080:8080 -p 9000:9000 -p 4000-4005:4000-4005/udp -p 10006-10010:10006-10010/udp
airensoft/ovenmediaengine:latest

OBS is emitting to the rmtp://127.0.0.1/app/stream, here is working well

On the server logs:

[2020-11-25 06:05:12.629] I 1 Config | config_manager.cpp:150 | Trying to set logfile in directory... (/var/log/ovenmediaengine)
[2020-11-25 06:05:12.631] I 1 Config | config_manager.cpp:48 | Trying to load configurations... (origin_conf/Server.xml)
[2020-11-25 06:05:12.637] I 1 OvenMediaEngine | banner.cpp:28 | OvenMediaEngine v0.10.10 is started on [69a8cc89456d] (Linux x86_64 - 5.4.39-linuxkit, #1 SMP Fri May 8 23:03:06 UTC 2020)
[2020-11-25 06:05:12.637] I 1 OvenMediaEngine | banner.cpp:30 | With modules:
[2020-11-25 06:05:12.637] I 1 OvenMediaEngine | banner.cpp:31 | FFmpeg 3.4.7 OME
[2020-11-25 06:05:12.637] I 1 OvenMediaEngine | banner.cpp:32 | Configuration: --prefix=/opt/ovenmediaengine --enable-gpl --enable-nonfree --extra-cflags=-I/opt/ovenmediaengine/include --extra-ldflags='-L/opt/ovenmediaengine/lib -Wl,-rpath,/opt/ovenmediaengine/lib' --extra-libs=-ldl --enable-shared --disable-static --disable-debug --disable-doc --disable-programs --disable-avdevice --disable-dct --disable-dwt --disable-error-resilience --disable-lsp --disable-lzo --disable-rdft --disable-faan --disable-pixelutils --disable-everything --enable-zlib --enable-libopus --enable-libvpx --enable-libfdk_aac --enable-libx264 --enable-libx265 --enable-encoder='libvpx_vp8,libvpx_vp9,libopus,libfdk_aac,libx264,libx265,mjpeg,png' --enable-decoder='aac,aac_latm,aac_fixed,h264,hevc' --enable-parser='aac,aac_latm,aac_fixed,h264,hevc' --enable-network --enable-protocol=tcp --enable-protocol=udp --enable-protocol='rtp,file,rtmp' --enable-demuxer=rtsp --enable-muxer='mp4,webm,mpegts,flv,mpjpeg' --enable-filter='asetnsamples,aresample,aformat,channelmap,channelsplit,scale,transpose,fps,settb,asettb,format'
[2020-11-25 06:05:12.638] I 1 OvenMediaEngine | banner.cpp:33 | libavformat: 57.83.100
[2020-11-25 06:05:12.638] I 1 OvenMediaEngine | banner.cpp:34 | libavcodec: 57.107.100
[2020-11-25 06:05:12.638] I 1 OvenMediaEngine | banner.cpp:35 | libavutil: 55.78.100
[2020-11-25 06:05:12.638] I 1 OvenMediaEngine | banner.cpp:36 | libavfilter: 6.107.100
[2020-11-25 06:05:12.638] I 1 OvenMediaEngine | banner.cpp:37 | libswresample: 2.9.100
[2020-11-25 06:05:12.638] I 1 OvenMediaEngine | banner.cpp:38 | libswscale: 4.8.100
[2020-11-25 06:05:12.638] I 1 OvenMediaEngine | banner.cpp:39 | SRT: 1.3.3
[2020-11-25 06:05:12.638] I 1 OvenMediaEngine | banner.cpp:40 | SRTP: libsrtp2 2.2.0
[2020-11-25 06:05:12.638] I 1 OvenMediaEngine | banner.cpp:41 | OpenSSL: OpenSSL 1.1.0g 2 Nov 2017
[2020-11-25 06:05:12.638] I 1 OvenMediaEngine | banner.cpp:42 | Configuration: compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR=""/opt/ovenmediaengine"" -DENGINESDIR=""/opt/ovenmediaengine/lib/engines-1.1"" -Wa,--noexecstack
[2020-11-25 06:05:12.638] I 1 OvenMediaEngine | banner.cpp:43 | JsonCpp: 1.9.3
[2020-11-25 06:05:12.638] I 1 OvenMediaEngine | banner.cpp:44 | jemalloc: 5.2.1-0-gea6b3e973b477b8061e0076bb257dbd7f3faa756
[2020-11-25 06:05:12.638] I 1 APIServer | api_server.cpp:30 | API Server is disabled
[2020-11-25 06:05:12.648] I 1 OvenMediaEngine | main.cpp:103 | Trying to create a MediaRouter module
[2020-11-25 06:05:12.648] I 1 MediaRouter | mediarouter.cpp:40 | MediaRouter has been started.
[2020-11-25 06:05:12.648] I 1 OvenMediaEngine | main.cpp:106 | Trying to create a WebRTC Publisher module
[2020-11-25 06:05:12.649] I 1 Signalling.P2P | rtc_p2p_manager.cpp:27 | P2P is disabled in the configuration
[2020-11-25 06:05:12.651] I 1 Ice | ice_port.cpp:91 | ICE port is bound to 0.0.0.0:10006/UDP (0x55fb02b89fd0)
[2020-11-25 06:05:12.651] I 1 Ice | ice_port.cpp:91 | ICE port is bound to 0.0.0.0:10007/UDP (0x55fb02b8d390)
[2020-11-25 06:05:12.652] I 1 Ice | ice_port.cpp:91 | ICE port is bound to 0.0.0.0:10008/UDP (0x55fb02b909d0)
[2020-11-25 06:05:12.652] I 1 Ice | ice_port.cpp:91 | ICE port is bound to 0.0.0.0:10009/UDP (0x55fb02b93fd0)
[2020-11-25 06:05:12.652] I 1 Ice | ice_port.cpp:91 | ICE port is bound to 0.0.0.0:10010/UDP (0x55fb02b976e0)
[2020-11-25 06:05:12.652] I 1 WebRTC | webrtc_publisher.cpp:91 | WebRTC Publisher is listening on 0.0.0.0:3333...
[2020-11-25 06:05:12.652] I 1 Publisher | publisher.cpp:19 | WebRTC Publisher has been started.
[2020-11-25 06:05:12.652] I 1 OvenMediaEngine | main.cpp:107 | Trying to create a HLS Publisher module
[2020-11-25 06:05:12.655] I 1 HTTPPublisher | segment_publisher.cpp:62 | HLS Publisher is listening on 0.0.0.0:8080...
[2020-11-25 06:05:12.655] I 1 Publisher | publisher.cpp:19 | HLS Publisher has been started.
[2020-11-25 06:05:12.655] I 1 OvenMediaEngine | main.cpp:108 | Trying to create a MPEG-DASH Publisher module
[2020-11-25 06:05:12.656] I 1 HTTPPublisher | segment_publisher.cpp:62 | DASH Publisher is listening on 0.0.0.0:8080...
[2020-11-25 06:05:12.656] I 1 Publisher | publisher.cpp:19 | DASH Publisher has been started.
[2020-11-25 06:05:12.656] I 1 OvenMediaEngine | main.cpp:109 | Trying to create a Low-Latency MPEG-DASH Publisher module
[2020-11-25 06:05:12.656] I 1 HTTPPublisher | segment_publisher.cpp:62 | LLDASH Publisher is listening on 0.0.0.0:8080...
[2020-11-25 06:05:12.657] I 1 Publisher | publisher.cpp:19 | LLDASH Publisher has been started.
[2020-11-25 06:05:12.657] I 1 OvenMediaEngine | main.cpp:110 | Trying to create a OVT Publisher module
[2020-11-25 06:05:12.659] I 1 OVT | ovt_publisher.cpp:54 | OVTPublisher is listening on 0.0.0.0:9000
[2020-11-25 06:05:12.659] I 1 Publisher | publisher.cpp:19 | OVTPublisher has been started.
[2020-11-25 06:05:12.659] I 1 OvenMediaEngine | main.cpp:111 | Trying to create a File Publisher module
[2020-11-25 06:05:12.660] I 1 Publisher | publisher.cpp:19 | FilePublisher has been started.
[2020-11-25 06:05:12.660] I 1 OvenMediaEngine | main.cpp:112 | Trying to create a RtmpPush Publisher module
[2020-11-25 06:05:12.660] I 1 Publisher | publisher.cpp:19 | RTMPPushPublisher has been started.
[2020-11-25 06:05:12.660] I 1 OvenMediaEngine | main.cpp:115 | Trying to create a Transcoder module
[2020-11-25 06:05:12.660] I 1 Transcoder | transcoder.cpp:38 | Transcoder has been started.
[2020-11-25 06:05:12.660] I 1 OvenMediaEngine | main.cpp:118 | Trying to create a MPEG-TS Provider module
[2020-11-25 06:05:12.661] I 1 MpegtsProvider | mpegts_provider.cpp:160 | MPEGTSProvider is listening on 0.0.0.0:4000 for [#default#app/stream_4000]
[2020-11-25 06:05:12.661] I 1 MpegtsProvider | mpegts_provider.cpp:160 | MPEGTSProvider is listening on 0.0.0.0:4001 for [#default#app/stream_4001]
[2020-11-25 06:05:12.661] I 1 MpegtsProvider | mpegts_provider.cpp:160 | MPEGTSProvider is listening on 0.0.0.0:4002 for [#default#app/stream_4002]
[2020-11-25 06:05:12.661] I 1 MpegtsProvider | mpegts_provider.cpp:160 | MPEGTSProvider is listening on 0.0.0.0:4003 for [#default#app/stream_4003]
[2020-11-25 06:05:12.661] I 1 MpegtsProvider | mpegts_provider.cpp:160 | MPEGTSProvider is listening on 0.0.0.0:4004 for [#default#app/stream_4004]
[2020-11-25 06:05:12.662] I 1 MpegtsProvider | mpegts_provider.cpp:160 | MPEGTSProvider is listening on 0.0.0.0:4005 for [#default#app/stream_4005]
[2020-11-25 06:05:12.662] I 1 Provider | provider.cpp:37 | MPEGTSProvider has been started.
[2020-11-25 06:05:12.662] I 1 OvenMediaEngine | main.cpp:119 | Trying to create a RTMP Provider module
[2020-11-25 06:05:12.664] I 1 RTMPProvider | rtmp_provider.cpp:72 | RTMPProvider is listening on 0.0.0.0:1935
[2020-11-25 06:05:12.665] I 1 Provider | provider.cpp:37 | RTMPProvider has been started.
[2020-11-25 06:05:12.665] I 1 OvenMediaEngine | main.cpp:120 | Trying to create a OVT Provider module
[2020-11-25 06:05:12.665] I 1 Provider | provider.cpp:37 | OVTProvider has been started.
[2020-11-25 06:05:12.665] I 1 OvenMediaEngine | main.cpp:121 | Trying to create a RTSPC Provider module
[2020-11-25 06:05:12.665] I 1 Provider | provider.cpp:37 | RTSPCProvider has been started.
[2020-11-25 06:05:12.665] I 1 OvenMediaEngine | main.cpp:124 | All modules are initialized successfully
[2020-11-25 06:05:12.665] I 1 Monitor | monitoring.cpp:43 | Create HostMetrics(default) for monitoring
[2020-11-25 06:05:12.665] I 1 Orchestrator | orchestrator_internal.cpp:608 | Trying to create an application: [#default#app]
[2020-11-25 06:05:12.665] I 1 Monitor | host_metrics.cpp:52 | Create ApplicationMetrics(#default#app) for monitoring
[2020-11-25 06:05:12.666] I 1 MediaRouter.App | mediarouter_application.cpp:34 | Created media route application. application id(0), (#default#app)
[2020-11-25 06:05:12.666] I 1 MediaRouter | mediarouter.cpp:71 | MediaRouter has created [#default#app] application
[2020-11-25 06:05:12.669] I 1 Publisher | application.cpp:30 | WebRTC Publisher Application/#default#app/0 ApplicationWorker has been created
[2020-11-25 06:05:12.669] I 1 Publisher | application.cpp:192 | WebRTC Publisher Application has created [#default#app] application
[2020-11-25 06:05:12.669] I 1 Publisher | application.cpp:30 | HLS Publisher Application/#default#app/0 ApplicationWorker has been created
[2020-11-25 06:05:12.669] I 1 Publisher | application.cpp:192 | HLS Publisher Application has created [#default#app] application
[2020-11-25 06:05:12.669] I 1 Publisher | application.cpp:30 | DASH Publisher Application/#default#app/0 ApplicationWorker has been created
[2020-11-25 06:05:12.670] I 1 Publisher | application.cpp:192 | DASH Publisher Application has created [#default#app] application
[2020-11-25 06:05:12.670] I 1 Publisher | application.cpp:30 | LLDASH Publisher Application/#default#app/0 ApplicationWorker has been created
[2020-11-25 06:05:12.670] I 1 Publisher | application.cpp:192 | LLDASH Publisher Application has created [#default#app] application
[2020-11-25 06:05:12.670] I 1 Publisher | application.cpp:30 | OVTPublisher Application/#default#app/0 ApplicationWorker has been created
[2020-11-25 06:05:12.670] I 1 Publisher | application.cpp:192 | OVTPublisher Application has created [#default#app] application
[2020-11-25 06:05:12.670] I 1 Publisher | publisher.cpp:65 | File publisher is disabled in #default#app application, so it was not created
[2020-11-25 06:05:12.670] I 1 Publisher | publisher.cpp:65 | RTMPPush publisher is disabled in #default#app application, so it was not created
[2020-11-25 06:05:12.670] I 1 Transcoder | transcoder.cpp:73 | Transcoder has created [config][#default#app] application
[2020-11-25 06:05:12.671] I 1 Provider | application.cpp:46 | MPEGTSProvider has created [#default#app] application
[2020-11-25 06:05:12.671] I 1 Provider | application.cpp:46 | RTMPProvider has created [#default#app] application
[2020-11-25 06:05:12.671] I 1 Provider | application.cpp:46 | OVTProvider has created [#default#app] application
[2020-11-25 06:05:12.671] I 1 Provider | application.cpp:46 | RTSPCProvider has created [#default#app] application
[2020-11-25 06:07:28.335] I 106 Provider | stream.cpp:49 | Unknown/(35) has been started stream
[2020-11-25 06:07:28.335] I 106 RTMPProvider | rtmp_provider.cpp:105 | A RTMP client has connected from 35 - <ClientSocket: 0x7fbaa8000b90, #35, state: 4, TCP, 172.17.0.1:33796>
[2020-11-25 06:07:29.489] I 93 MediaRouter.App | mediarouter_application.cpp:182 | Trying to create a stream: [#default#app/stream(35)]
[2020-11-25 06:07:29.489] I 93 MediaRouter.App | mediarouter_application.cpp:183 |
[Stream Info]
id(35), output(stream), SourceType(Rtmp), Created Time (Wed Nov 25 06:07:28 2020)

Video Track #0: Bypass(false) Bitrate(2.50Mb) codec(1, H264) resolution(1192x746) framerate(30.00fps) timebase(1/1000)
Audio Track #1: Bypass(false) Bitrate(160.00Kb) codec(6, AAC) samplerate(48.0K) format(s16, 16) channel(stereo, 2) timebase(1/1000)

[2020-11-25 06:07:29.490] I 93 MediaRouter.Stream | mediarouter_stream.cpp:59 | Trying to create media route stream: name(stream) id(35)
[2020-11-25 06:07:29.490] I 93 Monitor | application_metrics.cpp:56 | Create StreamMetrics(stream) for monitoring
[2020-11-25 06:07:29.490] I 93 TranscodeStream | transcode_stream.cpp:502 | [#default#app/stream(35)] -> [#default#app/stream(2497608496)] Output stream has been created.
[2020-11-25 06:07:29.494] I 93 MediaRouter.App | mediarouter_application.cpp:182 | Trying to create a stream: [#default#app/stream(2497608496)]
[2020-11-25 06:07:29.494] I 93 MediaRouter.App | mediarouter_application.cpp:183 |
[Stream Info]
id(2497608496), output(stream), SourceType(Transcoder), Created Time (Wed Nov 25 06:07:29 2020)
>> Origin Stream Info
id(35), output(stream), SourceType(Rtmp), Created Time (Wed Nov 25 06:07:28 2020)

Video Track #0: Bypass(true) Bitrate(2.50Mb) codec(1, H264) resolution(1192x746) framerate(30.00fps) timebase(1/1000)
Audio Track #1: Bypass(true) Bitrate(160.00Kb) codec(6, AAC) samplerate(1.0K) format(s16, 16) channel(stereo, 2) timebase(1/1000)
Audio Track #2: Bypass(false) Bitrate(128.00Kb) codec(8, OPUS) samplerate(48.0K) format(s16, 16) channel(stereo, 2) timebase(1/48000)

[2020-11-25 06:07:29.494] I 93 MediaRouter.Stream | mediarouter_stream.cpp:59 | Trying to create media route stream: name(stream) id(2497608496)
[2020-11-25 06:07:29.494] I 93 Monitor | application_metrics.cpp:56 | Create StreamMetrics(stream) for monitoring
[2020-11-25 06:07:29.495] I 93 WebRTC | rtc_stream.cpp:259 | Unsupported codec(Audio/AAC) is being input from media track
[2020-11-25 06:07:29.496] I 93 Publisher | stream.cpp:180 | WebRTC Publisher Application application has started [stream(2497608496)] stream
[2020-11-25 06:07:29.497] I 93 Publisher | stream.cpp:180 | HLS Publisher Application application has started [stream(2497608496)] stream
[2020-11-25 06:07:29.498] I 93 Publisher | stream.cpp:180 | DASH Publisher Application application has started [stream(2497608496)] stream
[2020-11-25 06:07:29.498] I 93 Publisher | stream.cpp:180 | LLDASH Publisher Application application has started [stream(2497608496)] stream
[2020-11-25 06:07:29.498] I 93 Publisher | stream.cpp:180 | OVTPublisher Application application has started [stream(2497608496)] stream
[2020-11-25 06:07:29.499] I 93 TranscodeStream | transcode_stream.cpp:127 | [#default#app/stream(35)] Transcoder input stream has been started. Status : (1) Decoders, (1) Encoders
[2020-11-25 06:07:29.611] I 113 TranscodeCodec | transcode_codec_dec_aac.cpp:49 | [#default#app/stream(35)] input stream information: [audio] aac (LC), 48000 Hz, stereo, fltp, 117 kbps, timebase: 1/1000, frame_size: 1024
[2020-11-25 06:07:37.945] I 111 DASH | dash_packetizer.cpp:956 | [0x7fbaac0674f0] LLDASH segment is ready to stream [#default#app/stream], segment duration: 5.000000s, count: 1
[2020-11-25 06:07:46.262] I 110 DASH | dash_packetizer.cpp:956 | [0x7fbaac066bf0] DASH segment is ready to stream [#default#app/stream], segment duration: 5.000000s, count: 3
[2020-11-25 06:07:54.605] I 109 HLS | hls_packetizer.cpp:292 | HLS segment is ready for stream [#default#app/stream], segment duration: 5.000000s, count: 3

The ovenplayer is trying to connect to ws://127.0.0.1:3333/app/stream but never starts the video :(

That's are the logs:

[2020-11-25 06:13:14.297] I 11 Signalling | rtc_signalling_server.cpp:81 | New client is connected: <ClientSocket: 0x7fba30000b90, #36, state: 4, TCP, 172.17.0.1:37080>
[2020-11-25 06:13:14.373] I 11 Monitor | stream_metrics.cpp:119 | A new session has started playing #default#app/stream on the WebRTC publihser. WebRTC(1)/Stream total(1)/App total(1)
[2020-11-25 06:13:32.557] I 11 Monitor | stream_metrics.cpp:144 | A session has been stopped playing #default#app/stream on the WebRTC publihser. Concurrent Viewers[WebRTC(0)/Stream total(0)/App total(0)]
[2020-11-25 06:13:32.557] W 11 Ice | ice_port.cpp:270 | Could not find session: 101
[2020-11-25 06:13:32.557] I 11 Signalling | rtc_signalling_server.cpp:218 | Client is disconnected: <WebSocketClient: 0x7fba24002550, <ClientSocket: 0x7fba30000b90, #36, state: 4, TCP, 172.17.0.1:37080>> (#default#app / stream, ufrag: local: UgD3Hj, remote: 2lC6)
[2020-11-25 06:13:35.685] I 11 Signalling | rtc_signalling_server.cpp:81 | New client is connected: <ClientSocket: 0x7fba30001cf0, #36, state: 4, TCP, 172.17.0.1:37084>
[2020-11-25 06:13:35.725] I 11 Monitor | stream_metrics.cpp:119 | A new session has started playing #default#app/stream on the WebRTC publihser. WebRTC(1)/Stream total(1)/App total(1)
[2020-11-25 06:13:39.974] W 11 Ice | ice_port.cpp:270 | Could not find session: 102
[2020-11-25 06:13:39.974] I 11 Monitor | stream_metrics.cpp:144 | A session has been stopped playing #default#app/stream on the WebRTC publihser. Concurrent Viewers[WebRTC(0)/Stream total(0)/App total(0)]
[2020-11-25 06:13:39.974] I 11 Signalling | rtc_signalling_server.cpp:218 | Client is disconnected: <WebSocketClient: 0x7fba24002060, <ClientSocket: 0x7fba30001cf0, #36, state: 4, TCP, 172.17.0.1:37084>> (#default#app / stream, ufrag: local: SiO2sV, remote: BoXp)
[2020-11-25 06:13:44.770] E 25 Publisher | stream.cpp:293 | Cannot find session : 101
[2020-11-25 06:13:44.770] I 25 Monitor | stream_metrics.cpp:144 | A session has been stopped playing #default#app/stream on the WebRTC publihser. Concurrent Viewers[WebRTC(0)/Stream total(0)/App total(0)]
[2020-11-25 06:14:05.773] E 25 Publisher | stream.cpp:293 | Cannot find session : 102
[2020-11-25 06:14:05.774] I 25 Monitor | stream_metrics.cpp:144 | A session has been stopped playing #default#app/stream on the WebRTC publihser. Concurrent Viewers[WebRTC(0)/Stream total(0)/App total(0)]

I do not have any firewall configured, all the ports are opened. Is my laptop (Macbook pro).

Thanks in advance.

@getroot
Copy link
Member

getroot commented Nov 25, 2020

Please let me know your OBS settings. The default setting of OME is set to pass through H.264 of the input stream.
It seems to be related to the support of the H.264 profile in the Safari browser. Due to codec restrictions of Safari browser, options such as Keyframe Interval = 1, Profile = main, bframes=0 must be set as required.

Please refer to the URL below.

https://airensoft.gitbook.io/ovenmediaengine/getting-started#example-of-using-obs-encoder

@Juanfree
Copy link
Author

Juanfree commented Nov 25, 2020

I am emitting with this config:

Screenshot 2020-11-25 at 09 30 05

@getroot
Copy link
Member

getroot commented Nov 25, 2020

I have never used "Apple VT H264 Hardware Encoder" with OBS. Maybe that encoder's H.264 output is not compatible with the browser. Set Profile to "base" or "main" and test. If that doesn't work, try changing the Encoder setting to x264 (if it exists in your OBS) and testing.

@Juanfree
Copy link
Author

Hi,

I am making another test, I deployed OME on AWS and ran the following docker.

docker run -d
-p 1935:1935 -p 4000-4005:4000-4005/udp -p 3333:3333 -p 8080:8080 -p 9000:9000 -p 10000-10010:10000-10010/udp
airensoft/ovenmediaengine:latest

All the ports are open on the EC2.

I am emitting with OvenStreamEncode to AWS.

Here, I think everything it's ok.

[2020-11-26 12:57:24.932] I 106 TranscodeStream | transcode_stream.cpp:1158 | [#default#app/stream(34)] -> [#default#app/stream(2434615091)] Transcoder output stream has been deleted.
[2020-11-26 12:57:24.932] I 106 MediaRouter.App | mediarouter_application.cpp:345 | Trying to delete a stream: [#default#app/stream(2434615091)]
[2020-11-26 12:57:24.932] I 106 Monitor | application_metrics.cpp:68 | Delete StreamMetrics(stream) for monitoring
[2020-11-26 12:57:24.932] I 106 Monitor | stream_metrics.cpp:31 |
[Stream Info]
id(2434615091), output(stream), SourceType(Transcoder), Created Time (Thu Nov 26 12:55:13 2020)
>> Origin Stream Info
id(34), output(stream), SourceType(Rtmp), Created Time (Thu Nov 26 12:55:12 2020)

Video Track #0: Bypass(true) Bitrate(683.00Kb) codec(1, H264) resolution(720x1280) framerate(30.00fps) timebase(1/1000)
Audio Track #1: Bypass(true) Bitrate(62.00Kb) codec(6, AAC) samplerate(48.0K) format(s16, 16) channel(stereo, 2) timebase(1/1000)
Audio Track #2: Bypass(false) Bitrate(128.00Kb) codec(8, OPUS) samplerate(48.0K) format(s16, 16) channel(stereo, 2) timebase(1/48000)

>> Statistics
Last update time : Thu Nov 26 12:56:00 2020, Last sent time : Thu Nov 26 12:56:00 2020
Bytes in : 0B, Bytes out : 9.83MB, Concurrent connections : 0, Max connections : 1 (Thu Nov 26 12:55:15 2020)

	>>>> By publisher
	- Unknown : Bytes out(0B) Concurrent Connections (0)
	- WebRTC : Bytes out(9.83MB) Concurrent Connections (0)
	- RTMP : Bytes out(0B) Concurrent Connections (0)
	- RTMPPush : Bytes out(0B) Concurrent Connections (0)
	- HLS : Bytes out(0B) Concurrent Connections (0)
	- DASH : Bytes out(0B) Concurrent Connections (0)
	- LLDASH : Bytes out(0B) Concurrent Connections (0)
	- OVT : Bytes out(0B) Concurrent Connections (0)
	- File : Bytes out(0B) Concurrent Connections (0)

[2020-11-26 12:57:24.932] I 106 Publisher | stream.cpp:244 | [stream(2434615091)] WebRTC Publisher Application stream has been stopped
[2020-11-26 12:57:24.942] I 106 Publisher | stream.cpp:244 | [stream(2434615091)] HLS Publisher Application stream has been stopped
[2020-11-26 12:57:24.942] I 106 Publisher | stream.cpp:244 | [stream(2434615091)] DASH Publisher Application stream has been stopped
[2020-11-26 12:57:24.943] I 106 Publisher | stream.cpp:244 | [stream(2434615091)] LLDASH Publisher Application stream has been stopped
[2020-11-26 12:57:24.943] I 106 Publisher | stream.cpp:244 | [stream(2434615091)] OVTPublisher Application stream has been stopped
[2020-11-26 12:57:24.943] I 106 MediaRouter.Stream | mediarouter_stream.cpp:79 | Delete media route stream name(stream) id(2434615091)
[2020-11-26 12:57:24.943] I 106 TranscodeStream | transcode_stream.cpp:171 | [#default#app/stream(34)] Transcoder input stream has been stopped.
[2020-11-26 12:57:24.944] I 106 MediaRouter.Stream | mediarouter_stream.cpp:79 | Delete media route stream name(stream) id(34)
[2020-11-26 12:57:26.282] I 106 Provider | stream.cpp:49 | Unknown/(34) has been started stream
[2020-11-26 12:57:26.282] I 106 RTMPProvider | rtmp_provider.cpp:105 | A RTMP client has connected from 34 - <ClientSocket: 0x7f14280139f0, #34, state: 4, TCP, 37.223.45.141:40800>
[2020-11-26 12:57:26.918] I 106 RTMPProvider | rtmp_provider.cpp:130 | The RTMP client has disconnected: [Unknown/], remote: <ClientSocket: 0x7f14280139f0, #34, state: 4, TCP, 37.223.45.141:40800>

But I am trying to watch the stream on OvenPlayer but I am having the same issue. I cannot reproduce the stream.

Could be the docker image?

@getroot
Copy link
Member

getroot commented Nov 26, 2020

Which browser are you using?
Aren't you testing at https://demo.ovenplayer.com? Keep in mind that if you haven't applied TLS to OME, you should test it at http://demo.ovenplayer.com.

Looking at your log, OME did WebRTC output. But you are not able to play it in your browser. Do you have audio output? Capture and upload your player, is the player just blackout? Or is it still loading?

I am not sure yet what you did wrong. I need more information.

@Juanfree
Copy link
Author

Juanfree commented Nov 26, 2020

I tested with Chrome and Firefox.

My browser when I make the test is loading and is not stopped never, but I cannot watch anything.

can connect but for some reason I cannot see anything, as I said I made the last test with OvenStreamEncode, it's weird

On the other hand, I can watch perfectly either https://demo.ovenplayer.com/ or https://demo.ovenplayer.com/

@getroot
Copy link
Member

getroot commented Nov 26, 2020

Sorry. I didn't really understand what you mean.

What does the sentence below mean? Have you succeeded in playing?

"I can watch perfectly either https://demo.ovenplayer.com/ or https://demo.ovenplayer.com/"

Try testing it at the URL below. The URL below uses the OME we have already installed. Here it works perfectly. Send to rtmp://dev2.airensoft.com/app/stream with OBS or OvenStreamEncoder and click the Reload Player button If it doesn't play here, there seems to be a problem with your network or browser.

http://demo.ovenplayer.com/ome_demo.html

@Juanfree
Copy link
Author

Juanfree commented Nov 26, 2020

It works! Only works for Firefox, I have to check why on Chrome is not working.

TBH, now I do not understand nothing because I made the same test that you have on your web, but with docker.

I will check again.

Another question, Are you using docker too?

@getroot
Copy link
Member

getroot commented Nov 27, 2020

The dev2.airensoft.com server is not running as a docker container. However, we are providing services as docker containers in the commercial environment of other companies. No problems with airensoft/ovenmediaengine:latest have been found in our environment yet.

Are you using a Mac? We don't have enough experience in docker environment on Mac. Mac's docker may require some other configuration.

If Firefox is working and Chrome doesn't work, try to suspect the codec. Chrome prefers VP8. Windows' chrome supports H.264 well, but other OS's may not.

Please refer to the url below to add the VP8 encoding option.

https://airensoft.gitbook.io/ovenmediaengine/transcoding

<OutputProfiles>
	<OutputProfile>
		<Name>bypass_stream</Name>
		<OutputStreamName>${OriginStreamName}_bypass</OutputStreamName>
		<Encodes>
			<Video>
				<Codec>vp8</Codec>
				<Width>1280</Width>
				<Height>720</Height>
				<Bitrate>2000000</Bitrate>
				<Framerate>30.0</Framerate>
			</Video>
			<Video>
				<Codec>h264</Codec>
				<Width>1280</Width>
				<Height>720</Height>
				<Bitrate>2000000</Bitrate>
				<Framerate>30.0</Framerate>
			</Video>
			<Audio>
				<Codec>opus</Codec>
				<Bitrate>128000</Bitrate>
				<Samplerate>48000</Samplerate>
				<Channel>2</Channel>
			</Audio>
		</Encodes>
	</OutputProfile>
</OutputProfiles>

@Juanfree
Copy link
Author

Juanfree commented Nov 27, 2020

But it is weird, because yesterday i could watch with Mac + Firefox the video that I streamed on the URL that you provided me.

Now I am testing this config with the docker-compose that you have on this repo, but I am having the issue, I cannot reproduce the video :(

@getroot
Copy link
Member

getroot commented Nov 27, 2020

Let's check one by one. So far, I haven't gotten any feedback from you about what I've been guiding you to. Please answer this one by one. Only if you do that I can find your problem.

Probably it is a problem with the setting of the Encoder (OBS).

  1. In the past, your OBS H.264 Profile was set to None. Did you change it to Base? Do this first. Still can't play?
    Keep in mind, most browsers do not support H.264 high profile in WebRTC, so the default setting of OME will pass-through H.264 as it is, so if you set the profile to None in OBS, it could be a problem. This will continue to be set as base for all tests. (If you don't like this, you can set OME to re-encode H.264)

  2. Select x264 instead of Apple Hardware Encoder in OBS, then set up and try our manual.

  3. Put the VP8 encoding settings in OME.

I just saw you testing at http://demo.ovenplayer.com/ome_demo.html. This is a problem with the encoder's codec configuration. Maybe you're broadcasting on a high profile. X264, and do it with the settings in our manual!

@getroot
Copy link
Member

getroot commented Nov 27, 2020

image

Try playing with HLS like this. If it plays in HLS, but it doesn't work with WebRTC, your browser's WebRTC doesn't support that codec. Change the encoder settings, or change the encoding profile in OME (bypass to vp8 or H264 encoding)

@Juanfree
Copy link
Author

Juanfree commented Nov 27, 2020

I am making the test again, answering your questions:

  1. Did you change it to Base? Yes, I changed to base and still cannot play :(
  2. Set up and tried the manual but the same result.
  3. I configured and I am having issues too.

For all the tests I am following the manual.

That's the configuration which I am emitting:
Screenshot 2020-11-27 at 17 40 18

Now I am trying with your platform:

I can emit to rtmp://dev2.airensoft.com/app/stream but I do not know why I cannot watch the video now on http://demo.ovenplayer.com/ome_demo.html.

Apologyze for all the time that your are spending on my case.

@Juanfree
Copy link
Author

Testing now.

Screenshot 2020-11-27 at 17 49 56

@getroot
Copy link
Member

getroot commented Nov 30, 2020

What version of Mac OS are you using? We are going to test it out.

Your last capture is a network error. This is probably not a problem with OME or OvenPlayer. (Maybe it's a DNS problem.) Please try again and let me know the result.

@Juanfree
Copy link
Author

I starting to emit, that's the configuration:

Screenshot 2020-11-30 at 09 48 21

@getroot
Copy link
Member

getroot commented Nov 30, 2020

Are you now sending the stream to /app/livestream?
Send it to /app/stream.

@getroot
Copy link
Member

getroot commented Nov 30, 2020

image
Is it your stream?

@Juanfree
Copy link
Author

Yes, it's working for me too, but only in Firefox I have to check why not in Chrome.

I am going to test with the docker-compose which is on the OME Github repo.

Thanks a lot ;)

@getroot
Copy link
Member

getroot commented Nov 30, 2020

Please tell me your mac os version. We will check why MAC's chrome cannot play webrtc with OME.

@Juanfree
Copy link
Author

Screenshot 2020-11-30 at 10 15 33

@Juanfree
Copy link
Author

Juanfree commented Nov 30, 2020

Another question, it's possible to know which is the architecture/configuration that you have behind of http://demo.ovenplayer.com/ome_demo.html.

Do you have origin/edge servers? in cluster?

Could you provided me the Server.xml for this demo server? Because I want to test in my local environment (docker-compose in my local machine).

Thanks a lot

@Juanfree
Copy link
Author

As a information, I am making the same test in local, with same configuration that I used to emit to rtmp://dev2.airensoft.com/app/stream and I having the same issue, I cannot reproduce the video.

I am making the test with:
docker: docker run -d
-p 1935:1935 -p 3333:3333 -p 8080:8080 -p 9000:9000 -p 4000-4005:4000-4005/udp -p 10006-10010:10006-10010/udp
airensoft/ovenmediaengine:latest

Emitting with the same config in OBS that I shared above.

And trying to watch with ovenPlayer.

@getroot
Copy link
Member

getroot commented Nov 30, 2020

dev2.airensoft.com is using blow configuration.

What do you use with RTMP URLs? And what do you use with WEBRTC URL?

Paste your full URL here.

<?xml version="1.0" encoding="UTF-8" ?>

<Server version="8">
        <Name>OvenMediaEngine</Name>
        <!-- Host type (origin/edge) -->
        <Type>origin</Type>
        <!-- Specify IP address to bind (* means all IPs) -->
        <IP>*</IP>

        <Bind>
                <Providers>
                        <RTMP>
                                <Port>1935</Port>
                        </RTMP>
                        <MPEGTS>
                                <Port>4000-4005/udp</Port>
                        </MPEGTS>
                </Providers>

                <Publishers>
                        <OVT>
                                <Port>9000</Port>
                        </OVT>
                        <HLS>
                                <Port>80</Port>
                                <TLSPort>443</TLSPort>
                        </HLS>
                        <DASH>
                                <Port>80</Port>
                                <TLSPort>443</TLSPort>
                        </DASH>
                        <WebRTC>
                                <Signalling>
                                        <Port>3332</Port>
                                        <TLSPort>3333</TLSPort>
                                </Signalling>
                                <IceCandidates>
                                        <IceCandidate>*:10000-10005/udp</IceCandidate>
                                </IceCandidates>
                        </WebRTC>
                </Publishers>
        </Bind>


        <!-- P2P works only in WebRTC -->
        <!--
        <P2P>
                <MaxClientPeersPerHostPeer>2</MaxClientPeersPerHostPeer>
        </P2P>
        -->

        <!-- Enable this configuration if you want to use API Server -->
        <!--
        <Managers>
                <Host>
                        <Names>
                                <Name>*</Name>
                        </Names>
                        <TLS>
                                <CertPath>path/to/file.crt</CertPath>
                                <KeyPath>path/to/file.key</KeyPath>
                                <ChainCertPath>path/to/file.crt</ChainCertPath>
                        </TLS>
                </Host>
                <API>
                        <AccessToken>ome-access-token</AccessToken>
                </API>
        </Managers>
        -->

        <VirtualHosts>
                <!-- You can use wildcard like this to include multiple XMLs -->
                <VirtualHost include="VHost*.xml" />
                <VirtualHost>
                        <Name>default</Name>
                        <Host>
                                <Names>
                                        <Name>*.airensoft.com</Name>
                                </Names>
                                <TLS>
                                        <CertPath>/etc/pki/tls/private/_airensoft_com.crt</CertPath>
                                        <ChainCertPath>/etc/pki/tls/private/_airensoft_com_chain.crt</ChainCertPath>
                                        <KeyPath>/etc/pki/tls/private/_airensoft_com.key</KeyPath>
                                </TLS>
                        </Host>

                        <!-- Refer https://airensoft.gitbook.io/ovenmediaengine/signedpolicy

                        <SignedPolicy>
                                <PolicyQueryKeyName>policy</PolicyQueryKeyName>
                                <SignatureQueryKeyName>signature</SignatureQueryKeyName>
                                <SecretKey>aKq#1kj</SecretKey>

                                <Enables>
                                        <Providers>rtmp</Providers>
                                        <Publishers>webrtc,hls,dash,lldash</Publishers>
                                </Enables>
                        </SignedPolicy>
                        -->

                        <!--
                        <Origins>

                                <Origin>
                                        <Location>/app/stream</Location>
                                        <Pass>
                                                <Scheme>ovt</Scheme>
                                                <Urls><Url>origin.com:9000/app/stream_720p</Url></Urls>
                                        </Pass>
                                </Origin>
                                <Origin>
                                        <Location>/app/</Location>
                                        <Pass>
                                                <Scheme>ovt</Scheme>
                                                <Urls><Url>origin.com:9000/app/</Url></Urls>
                                        </Pass>
                                </Origin>
                                <Origin>
                                        <Location>/edge/</Location>
                                        <Pass>
                                                <Scheme>ovt</Scheme>
                                                <Urls><Url>origin.com:9000/app/</Url></Urls>
                                        </Pass>
                                </Origin>
                        </Origins>
                        -->
                        <!-- Settings for applications -->
                        <Applications>
                                <Application>
                                        <Name>app</Name>
                                        <!-- Application type (live/vod) -->
                                        <Type>live</Type>
                                        <OutputProfiles>
                                                <OutputProfile>
                                                        <Name>bypass_stream</Name>
                                                        <OutputStreamName>${OriginStreamName}_o</OutputStreamName>
                                                        <Encodes>
                                                                <Audio>
                                                                        <Bypass>true</Bypass>
                                                                </Audio>
                                                                <Video>
                                                                        <Bypass>true</Bypass>
                                                                </Video>
                                                                <Audio>
                                                                        <Codec>opus</Codec>
                                                                        <Bitrate>128000</Bitrate>
                                                                        <Samplerate>48000</Samplerate>
                                                                        <Channel>2</Channel>
                                                                </Audio>
                                                                <!--
                                                                <Video>
                                                                        <Codec>vp8</Codec>
                                                                        <Bitrate>1024000</Bitrate>
                                                                        <Framerate>30</Framerate>
                                                                        <Width>1280</Width>
                                                                        <Height>720</Height>
                                                                </Video>
                                                                -->
                                                        </Encodes>
                                                </OutputProfile>
                                        </OutputProfiles>
                                        <Providers>
                                                <OVT />
                                                <RTMP />
                                                <MPEGTS>
                                                        <StreamMap>
                                                                <!--
                                                                        Set the stream name of the client connected to the port to "stream_${Port}"
                                                                        For example, if a client connets to port 4000, OME creates a "stream_4000" stream
                                                                -->
                                                                <Stream>
                                                                        <Name>stream_${Port}</Name>
                                                                        <Port>4000,4001-4004</Port>
                                                                </Stream>
                                                                <Stream>
                                                                        <Name>stream_4005</Name>
                                                                        <Port>4005</Port>
                                                                </Stream>
                                                        </StreamMap>
                                                </MPEGTS>
                                                <RTSPPull />
                                        </Providers>
                                        <Publishers>
                                                <SessionLoadBalancingThreadCount>8</SessionLoadBalancingThreadCount>
                                                <OVT />
                                                <WebRTC>
                                                        <Timeout>30000</Timeout>
                                                </WebRTC>
                                                <HLS>
                                                        <SegmentDuration>5</SegmentDuration>
                                                        <SegmentCount>3</SegmentCount>
                                                        <CrossDomains>
                                                                <Url>*</Url>
                                                        </CrossDomains>
                                                </HLS>
                                                <DASH>
                                                        <SegmentDuration>5</SegmentDuration>
                                                        <SegmentCount>3</SegmentCount>
                                                        <CrossDomains>
                                                                <Url>*</Url>
                                                        </CrossDomains>
                                                </DASH>
                                                <LLDASH>
                                                        <SegmentDuration>5</SegmentDuration>
                                                        <CrossDomains>
                                                                <Url>*</Url>
                                                        </CrossDomains>
                                                </LLDASH>
                                        </Publishers>
                                </Application>
                        </Applications>
                </VirtualHost>
        </VirtualHosts>
</Server>

@Juanfree
Copy link
Author

When I make the tests with docker-compose.yml my config is:

Edge:

OvenMediaEngine edge *
<!-- Settings for the ports to bind -->
<Bind>
	<Providers>
		<!-- Currently, OME doesn't support using the specified port for OVT Provider -->
		<OVT>
			<Port>9001</Port>
		</OVT>
	</Providers>

	<Publishers>
		<HLS>
			<Port>${env:OME_HLS_STREAM_PORT:8090}</Port>
			<!-- If you want to use TLS, specify the TLS port -->
			<!-- <TLSPort>8443</TLSPort> -->
		</HLS>
		<DASH>
			<Port>${env:OME_DASH_STREAM_PORT:8090}</Port>
			<!-- If you want to use TLS, specify the TLS port -->
			<!-- <TLSPort>8443</TLSPort> -->
		</DASH>
		<WebRTC>
			<Signalling>
				<Port>${env:OME_SIGNALLING_PORT:3334}</Port>
				<!-- If you want to use TLS, specify the TLS port -->
				<!-- <TLSPort>5556</TLSPort> -->
			</Signalling>
			<IceCandidates>
				<IceCandidate>${env:OME_ICE_CANDIDATES:*:10000-10005/udp}</IceCandidate>
			</IceCandidates>
		</WebRTC>
	</Publishers>
</Bind>

<!-- P2P works only in WebRTC -->
<!--
<P2P>
	<MaxClientPeersPerHostPeer>2</MaxClientPeersPerHostPeer>
</P2P>
-->

<VirtualHosts>
	<!-- You can use wildcard like this to include multiple XMLs -->
	<VirtualHost include="VHost*.xml" />
	<VirtualHost>
		<Name>default</Name>

		<!-- Settings for multi ip/domain and TLS -->
		<Host>
			<Names>
				<!-- Host names
					<Name>stream1.airensoft.com</Name>
					<Name>stream2.airensoft.com</Name>
					<Name>*.sub.airensoft.com</Name>
					<Name>192.168.0.1</Name>
				-->
				<Name>*</Name>
			</Names>
			<!--
			<TLS>
				<CertPath>path/to/file.crt</CertPath>
				<KeyPath>path/to/file.key</KeyPath>
				<ChainCertPath>path/to/file.crt</ChainCertPath>
			</TLS>
			-->
		</Host>
		
		<!-- Refer https://airensoft.gitbook.io/ovenmediaengine/signedpolicy

		<SignedPolicy>
			<PolicyQueryKeyName>${env:SIGNED_POLICY_POLICY_QUERY_KEY:policy}</PolicyQueryKeyName>
			<SignatureQueryKeyName>${env:SIGNED_POLICY_SIGNATURE_QUERY_KEY:signature}</SignatureQueryKeyName>
			<SecretKey>${env:SIGNED_URL_CRYPTO_KEY:aKq#1kj}</SecretKey>

			<Enables>
				<Providers>rtmp</Providers>
				<Publishers>webrtc,hls,dash,lldash</Publishers>
			</Enables>
		</SignedPolicy>
		-->

		<!-- Settings for ProxyPass (It can specify origin for each path) -->
		<Origins>
			<!--
				<Origin>
				<Location>/app/stream</Location>
				<Pass>
					<Scheme>ovt</Scheme>
					<Urls>
						<Url>origin.com:9000/app/stream_720p</Url>
					</Urls>
				</Pass>
			</Origin>
			<Origin>
				<Location>/app/</Location>
				<Pass>
					<Scheme>ovt</Scheme>
					<Urls>
						<Url>origin.com:9000/app/</Url>
					</Urls>
				</Pass>
			</Origin>
			-->
			<Origin>
				<Location>/</Location>
				<Pass>
					<Scheme>ovt</Scheme>
					<Urls>
						<Url>${env:DEFAULT_ORIGIN_SERVER:}:${env:DEFAULT_ORIGIN_PORT:9000}/</Url>
					</Urls>
				</Pass>
			</Origin>
		</Origins>
	</VirtualHost>
</VirtualHosts>

Origin:

OvenMediaEngine origin *
<!-- Settings for the ports to bind -->
<Bind>
	<Providers>
		<RTMP>
			<Port>${env:OME_RTMP_PROV_PORT:1935}</Port>
		</RTMP>
		<MPEGTS>
			<!--
				Listen on port 4000,4001,4004,4005
				This is just a demonstration to show that you can configure the port in several ways
			-->
			<Port>${env:OME_MPEGTS_PROV_PORT:4000-4003,4004,4005/udp}</Port>
		</MPEGTS>
	</Providers>

	<Publishers>
		<!-- The OVT is protocol for ORIGIN-EDGE -->
		<OVT>
			<Port>${env:OME_ORIGIN_PORT:9000}</Port>
		</OVT>
		<HLS>
			<Port>${env:OME_HLS_STREAM_PORT:8080}</Port>
			<!-- If you want to use TLS, specify the TLS port -->
			<!-- <TLSPort>443</TLSPort> -->
		</HLS>
		<DASH>
			<Port>${env:OME_DASH_STREAM_PORT:8080}</Port>
			<!-- If you want to use TLS, specify the TLS port -->
			<!-- <TLSPort>443</TLSPort> -->
		</DASH>
		<WebRTC>
			<Signalling>
				<Port>${env:OME_SIGNALLING_PORT:3333}</Port>
				<!-- If you want to use TLS, specify the TLS port -->
				<!-- <TLSPort>3334</TLSPort> -->
			</Signalling>
			<IceCandidates>
				<IceCandidate>${env:OME_ICE_CANDIDATES:*:10006-10010/udp}</IceCandidate>
			</IceCandidates>
		</WebRTC>
	</Publishers>
</Bind>

<VirtualHosts>
	<!--
		You can include multiple XML files by doing the following:
		<VirtualHost include="sites-enabled/*.xml" />
	-->
	<VirtualHost include="VHost*.xml" />
	<VirtualHost>
		<Name>default</Name>

		<!-- Settings for multi ip/domain and TLS -->
		<Host>
			<Names>
				<!-- Host names
					<Name>stream1.airensoft.com</Name>
					<Name>stream2.airensoft.com</Name>
					<Name>*.sub.airensoft.com</Name>
					<Name>192.168.0.1</Name>
				-->
				<Name>*</Name>
			</Names>
			<!--
			<TLS>
				<CertPath>path/to/file.crt</CertPath>
				<KeyPath>path/to/file.key</KeyPath>
				<ChainCertPath>path/to/file.crt</ChainCertPath>
			</TLS>
			-->
		</Host>

		<!-- Settings for applications -->
		<Applications>
			<Application>
				<Name>app</Name>
				<!-- Application type (live/vod) -->
				<Type>live</Type>
				<OutputProfiles>
					<OutputProfile>
						<Name>bypass_stream</Name>
						<OutputStreamName>${OriginStreamName}_stream</OutputStreamName>
						<Encodes>
							<Video>
								<Codec>vp8</Codec>
								<Width>1280</Width>
								<Height>720</Height>
								<Bitrate>2000000</Bitrate>
								<Framerate>30.0</Framerate>
							</Video>
							<Video>
								<Codec>h264</Codec>
								<Width>1280</Width>
								<Height>720</Height>
								<Bitrate>2000000</Bitrate>
								<Framerate>30.0</Framerate>
							</Video>
							<Audio>
								<Codec>opus</Codec>
								<Bitrate>128000</Bitrate>
								<Samplerate>48000</Samplerate>
								<Channel>2</Channel>
							</Audio>
						</Encodes>
					</OutputProfile>
				</OutputProfiles>
				<Providers>
					<OVT />
					<RTMP />
					<RTSPPull />
					<MPEGTS>
						<StreamMap>
							<!--
								Set the stream name of the client connected to the port to "stream_${Port}"
								For example, if a client connets to port 4000, OME creates a "stream_4000" stream
							-->
							<Stream>
								<Name>stream_${Port}</Name>
								<Port>4000,4001-4004</Port>
							</Stream>
							<Stream>
								<Name>stream_4005</Name>
								<Port>4005</Port>
							</Stream>
						</StreamMap>
					</MPEGTS>
				</Providers>
				<Publishers>
					<SessionLoadBalancingThreadCount>8</SessionLoadBalancingThreadCount>
					<OVT />
					<WebRTC>
						<Timeout>30000</Timeout>
					</WebRTC>
					<HLS>
						<SegmentDuration>5</SegmentDuration>
						<SegmentCount>3</SegmentCount>
						<CrossDomains>
							<Url>*</Url>
						</CrossDomains>
					</HLS>
					<DASH>
						<SegmentDuration>5</SegmentDuration>
						<SegmentCount>3</SegmentCount>
						<CrossDomains>
							<Url>*</Url>
						</CrossDomains>
					</DASH>
					<LLDASH>
						<SegmentDuration>5</SegmentDuration>
						<CrossDomains>
							<Url>*</Url>
						</CrossDomains>
					</LLDASH>
				</Publishers>
			</Application>
		</Applications>
	</VirtualHost>
</VirtualHosts>

I made a little change in my docker-compose (In bold below, check DEFAULT_ORIGIN_SERVER environment var for the edge server):
version: '3.7'

services:
origin:
build:
context: .
image: airensoft/ovenmediaengine:latest
ports:
- "1935:1935/tcp"
- "3333:3333/tcp"
- "8080:8080/tcp"
- "9000:9000/tcp"
- "4000-4005:4000-4005/udp"
- "10006-10010:10006-10010/udp"
environment:
- OME_ORIGIN_PORT=9000
- OME_RTMP_PROV_PORT=1935
- OME_HLS_STREAM_PORT=8080
- OME_DASH_STREAM_PORT=8080
- OME_SIGNALLING_PORT=3333
- OME_MPEGTS_PROV_PORT=4000-4005/udp
- OME_ICE_CANDIDATES=*:10006-10010/udp
command: /opt/ovenmediaengine/bin/OvenMediaEngine -c origin_conf

edge:
build:
context: .
image: airensoft/ovenmediaengine:latest
ports:
- "3334:3334/tcp"
- "8090:8090/tcp"
- "10000-10005:10000-10005/udp"
environment:
- DEFAULT_ORIGIN_SERVER=origin
- OME_HLS_STREAM_PORT=8090
- OME_DASH_STREAM_PORT=8090
- OME_SIGNALLING_PORT=3334
- OME_ICE_CANDIDATES=*:10000-10005/udp
command: /opt/ovenmediaengine/bin/OvenMediaEngine -c edge_conf

@Juanfree
Copy link
Author

Juanfree commented Nov 30, 2020

Now I am using the OvenMediaPlayer, emitting to your demo environment.

Screenshot 2020-11-30 at 11 12 05

Browser: Firefox

I tested with the port 3334 also.

I cannot watch the video, could be I am doing when I run the OvenPlayer?

@getroot
Copy link
Member

getroot commented Nov 30, 2020

3334 is not open on dev2.airensoft.com

you must enter "ws://dev2.airensoft.com:3332/app/stream_o" or "wss://dev2.airensoft.com:3333/app/stream_o"

Please read our manual..

@getroot
Copy link
Member

getroot commented Nov 30, 2020

And "- DEFAULT_ORIGIN_SERVER=origin" is wrong. you have to input your origin's IP address.
First of all, you should test with only origin mode, I think ORIGIN-EDGE mode is next step

@getroot
Copy link
Member

getroot commented Nov 30, 2020

When running with docker on your local, what URLs did you use for RTMP and WebRTC,
let me know, it seems there is an error.

I will ask you again,
What do you use with RTMP URLs? And what do you use with WEBRTC URL?

@Juanfree
Copy link
Author

3334 is not open on dev2.airensoft.com

you must enter "ws://dev2.airensoft.com:3332/app/stream_o" or "wss://dev2.airensoft.com:3333/app/stream_o"

Please read our manual..

That ws://dev2.airensoft.com:3332/app/stream_o works

@Juanfree
Copy link
Author

Juanfree commented Nov 30, 2020

When running with docker on your local, what URLs did you use for RTMP and WebRTC,
let me know, it seems there is an error.

I will ask you again,
What do you use with RTMP URLs? And what do you use with WEBRTC URL?

Testing with docker (Docker desktop for Mac):

docker run -d
-p 1935:1935 -p 3333:3333 -p 8080:8080 -p 9000:9000 -p 4000-4005:4000-4005/udp -p 10006-10010:10006-10010/udp
airensoft/ovenmediaengine:latest

OBS:
Screenshot 2020-11-30 at 11 22 14

OvenMedia player:
Screenshot 2020-11-30 at 11 23 08

@getroot
Copy link
Member

getroot commented Nov 30, 2020

I think this is related to the MAC docker and Ice Candidate. I haven't used mac's docker desktop yet. I will try to reproduce this soon as soon as I get an environment like you
And I'm going to analyze Chrome's on MAC as well, let us know if you get more info.

@getroot
Copy link
Member

getroot commented Nov 30, 2020

If you can analyze this problem further with us, please send the Console log of Chrome's Developer Tools (F12) as follows: It will help us more quickly analyze the problem.

image

@Juanfree
Copy link
Author

Juanfree commented Nov 30, 2020

If you can analyze this problem further with us, please send the Console log of Chrome's Developer Tools (F12) as follows: It will help us more quickly analyze the problem.

image

For this test I am emitting to rtmp://dev2.airensoft.com/app and trying to watch the video in my local environment using Oven player.

That's are my Chrome logs:

Screenshot 2020-11-30 at 18 59 54

@Juanfree
Copy link
Author

I think this is related to the MAC docker and Ice Candidate. I haven't used mac's docker desktop yet. I will try to reproduce this soon as soon as I get an environment like you
And I'm going to analyze Chrome's on MAC as well, let us know if you get more info.

Sure, I am gonna try to see which/where is the problem. If you want we could schedule some call/meeting in order to try to fix with pair programming or some another practice, ok?

Let me know.

Thanks a lot for your time.

@getroot
Copy link
Member

getroot commented Nov 30, 2020

When you open the chrome console and reproduce the error, you will get a lot of messages. I want that messages.

@getroot
Copy link
Member

getroot commented Nov 30, 2020

Well... if you want to play your local, you have to send it to your local with obs. Sending to dev2 and playing local will of course not work. And capture the entire browser. I also need to see the player status.

@Juanfree
Copy link
Author

Juanfree commented Dec 1, 2020

When you open the chrome console and reproduce the error, you will get a lot of messages. I want that messages.

Scenario:

I am testing against your demo environment

I added a console.log to the code:

`
$( document ).ready(function() {

        var player = OvenPlayer.create("player", {
            image : "docs/lib/thumbnail.png",
            title : "OvenPlayer Demo",
            sources: defaultSources,
            tracks : tracks

        });
        player.on("ready", function(data){
            **console.log(data);**
        });
        player.on("error", function(error){
            console.log(error);
        });

    });

`

That's are the errors, I don't see anything here:

Screenshot 2020-12-01 at 08 34 47

@getroot
Copy link
Member

getroot commented Dec 1, 2020

  1. Send the stream to rtmp://dev2.airensoft.com/app/stream with OBS.

  2. Connect to http://demo.ovenplayer.com with Chrome and play ws://dev2.airensoft.com:3332/app/stream_o. Alternatively, you can access the following URL.

http://demo.ovenplayer.com/#sources=%5B%7B%22id%22%3A0%2C%22file%22%3A%22ws%3A%2F%2Fdev2.airensoft.com%3A3332%2Fapp%2Fstream_o% 22%2C%22type%22%3A%22webrtc%22%7D%5D&lowLatency=false&liveDelay=false

Click the play button.

  1. This should work properly. (It works fine in my environment.) But you said playback fails in your environment. So I want to see the log and player status of failures in your environment.

Turn on Chrome's Devtools and refresh the page. Then, capture and upload all the screens as follows.

image

@Juanfree
Copy link
Author

Juanfree commented Dec 1, 2020

As I said, that's are my logs:

Screenshot 2020-12-01 at 10 42 26

Accessing to:
Screenshot 2020-12-01 at 10 44 14

@getroot
Copy link
Member

getroot commented Dec 1, 2020

Ok! It seems to be related to the h.264 codec option, we will analyze it soon. If you can configure VP8 on OME as I said before, please test it.

@Juanfree
Copy link
Author

Juanfree commented Dec 1, 2020

Ok! It seems to be related to the h.264 codec option, we will analyze it soon. If you can configure VP8 on OME as I said before, please test it.

What do you mean about VP8? Test with the docker that you provided but adding the configuration related to this link?

Or with the docker-compose but only against the origin?

@getroot
Copy link
Member

getroot commented Dec 1, 2020

Yes you can of course modify Server.xml inside docker container.

You can mount the path of the container as a host... You can do it in a variety of ways, such as entering the docker container directly, modifying and rerunning ome, rebuilding docker, etc.

If you are not familiar with docker I have added the vp8 codec to dev2.airensoft.com. Could you test it again at http://demo.ovenplayer.com/ome_demo.html?

@Juanfree
Copy link
Author

Juanfree commented Dec 1, 2020

Yes you can of course modify Server.xml inside docker container.

You can mount the path of the container as a host... You can do it in a variety of ways, such as entering the docker container directly, modifying and rerunning ome, rebuilding docker, etc.

If you are not familiar with docker I have added the vp8 codec to dev2.airensoft.com. Could you test it again at http://demo.ovenplayer.com/ome_demo.html?

The same issue:

Screenshot 2020-12-01 at 17 11 14

@getroot
Copy link
Member

getroot commented Dec 2, 2020

Can you do the same test at dev2.airensoft.com, and then enter chrome://webrtc-internals in the chrome address bar, and capture and upload RTCInboundRTPVideoStream?

image

@Juanfree
Copy link
Author

Juanfree commented Dec 2, 2020

Can you do the same test at dev2.airensoft.com, and then enter chrome://webrtc-internals in the chrome address bar, and capture and upload RTCInboundRTPVideoStream?

image

Screenshot 2020-12-02 at 08 16 07
Screenshot 2020-12-02 at 08 16 29

@getroot
Copy link
Member

getroot commented Dec 2, 2020

Oh my god, your chrome or device is not receiving udp packets at all. (It's probably not a problem with your device as you said that firefox is working fine.) Is there a possibility to block udp somewhere? Do you have a proxy set up in Chrome?

Anyway, since this problem is not a problem with OME or Player, it seems that I cannot analyze it anymore. Thank you very much for helping with the various analysis! If you can figure out the cause of this problem, I would be very grateful to let me know again about that.

@Juanfree
Copy link
Author

Juanfree commented Dec 2, 2020

Oh my god, your chrome or device is not receiving udp packets at all. (It's probably not a problem with your device as you said that firefox is working fine.) Is there a possibility to block udp somewhere? Do you have a proxy set up in Chrome?

Anyway, since this problem is not a problem with OME or Player, it seems that I cannot analyze it anymore. Thank you very much for helping with the various analysis! If you can figure out the cause of this problem, I would be very grateful to let me know again about that.

Tested now in Safari, and it works!

Ok, then should be something with my Chrome I am gonna investigate and let you know How can solve the issue with Chrome.

On the other hand, could we try to make it works OME in docker? Could you help me? Because in local does not works either FF or Chrome.

@Juanfree
Copy link
Author

Juanfree commented Dec 2, 2020

As a information, I am testing the docker that you provided on your documentation. (in local)

But today I am testing with safari, and It works!

I will check why is not working on FF and Chrome, but Safari is working!!

@getroot
Copy link
Member

getroot commented Dec 2, 2020

That's good news. Please let me know if you find out what in your environment caused the playback to fail. Thank you.

@Juanfree
Copy link
Author

Juanfree commented Dec 2, 2020

That's good news. Please let me know if you find out what in your environment caused the playback to fail. Thank you.

Sure ;) thanks a lot @getroot

@getroot
Copy link
Member

getroot commented Dec 4, 2020

I close this issue.
If you know what is causing your problem, please comment here.

@getroot getroot closed this as completed Dec 4, 2020
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

3 participants