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

Unable to troubleshoot stream #40

Closed AllanLeeJR closed 4 years ago

AllanLeeJR commented 5 years ago

Hi guys,

I have successfully installed Oven Media Engine on CentOS 7.6. However when I try to use VLC to stream the rtmp publish link it fails to load. I am unsure how to trouble shoot from here.

In my previous camera server I've setup the stream works via "rtmp:///live/326897D0CE54_1"

Here are the list of links I have tried to use rtmp:///app/326897D0CE54_1 rtmp://:1935/app/326897D0CE54_1

Here is my server file server.txt

Any help is much appreciated.

dimiden commented 5 years ago

Hi, AllanLeeJR.

I understand that you played the RTMP URL in VLC, but currently the OME does not support RTMP output. This feature will be added later, until then play with WebRTC, DASH or HLS.

AllanLeeJR commented 5 years ago

Hi @dimiden ,

Thank you for your prompt response and assistance. I have also tried the webrtc link on http://demo.ovenplayer.com/ but it did not seem to stream as well. It says connection with Low Latency Server failed.

my rtmp input is rtmp://IP:1935/app/326897D0CE54_1

webrtc url is ws://IP:3333/app/326897D0CE54_1_o

dimiden commented 5 years ago

@AllanLeeJR Thank you for your answer.

Please make sure your server is not turned on in the firewall. If the firewall is not turned on and it still does not play, there is a high probability that there is a problem with the ICE.

Please attach the /var/log/ovenmediaengine/venmediaengine.log file and a capture of your browser's console window.

AllanLeeJR commented 5 years ago

Hi @dimiden

the ovenmediaengine.log file does show some clues like

[2019-08-23 15:54:39.479] W 29537 RtmpProvider | rtmp_chunk_stream.cpp:1102 | Rtmp input stream init meessage count over - stream(app/326897D0CE54_2) size(225:100) [2019-08-23 17:47:06.455] I 1258 Ice | ice_port.cpp:88 | ICE port is bounded on [v4] 0.0.0.0:10000/UDP

my server does not have a firewall turned on. I have also followed the steps for the firewall to allow access on the various ports in the "getting started" section. Here are my log files. browser console logs.txt ovenmediaengine.log

Also is there a way I can print ome logs in the command window on runtime?

dimiden commented 5 years ago

@AllanLeeJR Thank you for the information!

Based on the logs you provided, that's a problem because the RTMP input is video only. OME currently does not support video only for RTMP input, so please set the audio stream to be sent and try again.

And if you want to see some log in real time, you can use the following command.

$ tail -f /var/log/ovenmediaengine/ovenmediaengine.log

Alternatively, there is another way to view the log. It's to run OME directly rather than in service mode using this commands:

$ sudo service ovenmediaengine stop
$ cd /usr/share/ovenmediaengine
$./OvenMediaEngine
AllanLeeJR commented 5 years ago

@dimiden thank you so much for the live support. Unfortunately I may not be able to stream the audio, Is there any way I can stream the rtmp video only?

dimiden commented 5 years ago

@AllanLeeJR

I'm sorry, but there's no way you can do it now. I'm going to solve this problem later, and I'll talk to you about it again.

AllanLeeJR commented 5 years ago

Alright thank you so much for the help @dimiden.

naderaa commented 4 years ago

Hi guys,

I also have successfully installed Oven Media Engine on CentOS 7.6. I can push input using OBS, but i can't play via webrtc link on http://demo.ovenplayer.com/ . It says connection with Low Latency Server failed.

my rtmp input is rtmp://IP:1935/app/ stream key : stream

webrtc url is ws://ip:3333/app/stream_o/1875697873

Here is my log file ovenmediaengine.log

hls url is http://ip/app/stream_o/1875697873.m3u8

when i play via hls, ovenmediaengine.log says : [2019-09-27 03:25:43.940] I 1592 HttpServer | http_server.cpp:109 | Client(<ClientSocket: 0x7f567c002510, #26, state: 4, TCP, [v4] 182.253.121.26:62838>) is connected on [v4] 0.0.0.0:80 but i still can't demo via http://demo.ovenplayer.com/

Thanks for your help

getroot commented 4 years ago

@naderaa Hi, the webrtc url is "ws://ip:3333/app/stream_o". remove "/1875697873". and also the hls url is "http://ip/app/stream_o/playlist.m3u8".

This manual(https://airensoft.gitbook.io/ovenmediaengine/) will help you.

naderaa commented 4 years ago

Thank you so much @JehoenHan , i successfully play via hls url, but unfortunately i still can't play via webrtc.

getroot commented 4 years ago

First make sure that the firewalls on ports 3333/tcp and 10000-10005/udp are open. And then if that doesn't work, please provide the following details:

naderaa commented 4 years ago

Firewalls are has been open, but stream still can't play.

"Browser Type, Version" Google Chrome, Version 77.0.3865.90 (Official Build) (64-bit)

"Server CPU, Memory" spec. AuthenticAMD AMD EPYC 7571 2 Gb RAM cpu MHz : 2199.898 CentOS 7.7

"Server Log" tail -f /var/log/messages Sep 27 06:43:40 ip-10-0-2-7 dhclient[1011]: bound to 10.0.2.7 -- renewal in 1412 seconds. Sep 27 07:01:01 ip-10-0-2-7 systemd: Created slice User Slice of root. Sep 27 07:01:01 ip-10-0-2-7 systemd: Started Session 27 of user root. Sep 27 07:01:01 ip-10-0-2-7 systemd: Removed slice User Slice of root. Sep 27 07:07:12 ip-10-0-2-7 dhclient[1011]: DHCPREQUEST on ens5 to 10.0.2.1 port 67 (xid=0x3bca429) Sep 27 07:07:12 ip-10-0-2-7 dhclient[1011]: DHCPACK from 10.0.2.1 (xid=0x3bca429) Sep 27 07:07:14 ip-10-0-2-7 dhclient[1011]: bound to 10.0.2.7 -- renewal in 1738 seconds. Sep 27 07:36:12 ip-10-0-2-7 dhclient[1011]: DHCPREQUEST on ens5 to 10.0.2.1 port 67 (xid=0x3bca429) Sep 27 07:36:12 ip-10-0-2-7 dhclient[1011]: DHCPACK from 10.0.2.1 (xid=0x3bca429) Sep 27 07:36:14 ip-10-0-2-7 dhclient[1011]: bound to 10.0.2.7 -- renewal in 1632 seconds.

dimiden commented 4 years ago

@naderaa It would be more helpful if you also attach the OvenMediaEngine log. Please attach the OvenMediaEngine log in /var/log/ovenmediaengine Also, make sure there are no spaces in front of or behind the webrtc URL(ws://ip/app/stream_o) you entered.

naderaa commented 4 years ago

This is my ovenmediaengine.log

[2019-09-27 08:39:19.095] I 4503 WebRTC | rtc_stream.cpp:188 | Stream is created : stream_o/1871916417 [2019-09-27 08:39:19.129] I 4503 TranscodeCodec | transcode_codec_dec_aac.cpp:72 | Codec parameters: codec_type(1), codec_id(86018), codec_tag(0), extra(0), format(8), bit_rate(144358), bits_per_coded_sample(0), bits_per_raw_sample(0), profile(1), level(-99), sample_aspect_ratio(0/1) width(0), height(0) field_order(0) color_range(0) color_primaries(2) color_trc(2) color_space(2) chroma_location(0), channel_layout(3) channels(2) sample_rate(44100) block_align(0) frame_size(1024) [2019-09-27 08:39:19.137] I 4503 TranscodeCodec | transcode_decoder.cpp:200 | Codec parameters: codec_type(0) codec_id(28) codec_tag(0) extra(0) format(0) bit_rate(200000) bits_per_coded_sample(0) bits_per_raw_sample(8) profile(578) level(31) sample_aspect_ratio(0/1) width(728) height(410) field_order(1) color_range(0) color_primaries(2) color_trc(2) color_space(2) chroma_location(1) channel_layout(0) channels(0) sample_rate(0) block_align(0) frame_size(0) [2019-09-27 08:39:36.379] I 1598 Dash | dash_packetyzer.cpp:680 | Dash ready completed - prefix(stream_o) segment(5s/3) [2019-09-27 08:39:36.381] I 1593 Hls | hls_packetyzer.cpp:262 | Hls ready completed - prefix(stream_o) segment(5s/3)

and my stream play is : ws://ip:3333/app/stream_o http://ip/app/stream_o/manifest.mpd

when i play on demo player, google chrome says : ovenplayer.provider.WebRTCProvider-0.9.731.js:2 WebSocket connection to 'ws://18.138.254.124:3333/app/stream_o' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT

dash.all.min.js:27 GET http://118.128.254.124/app/stream_o/manifest.mpd net::ERR_CONNECTION_TIMED_OUT

both of webrtc and dash can't play

getroot commented 4 years ago

That is, the browser's websocket did not connect to the ovenmediaengine port 3333. Both WebRTC and DASH have never reached TCP connections from your PC to the OvenMediaEngine.

This may be due to a server internal firewall problem or to an external firewall (AWS) setting. Or did you change the port in 3333 / tcp in the server.conf of ovenmediaengine? Please check the following URL. https://airensoft.gitbook.io/ovenmediaengine/configuration#ports

naderaa commented 4 years ago

This is my Server.xml file Server.txt

getroot commented 4 years ago

This is not a problem with OvenMediaEngine. This is most likely a network issue. If you are using AWS, take a look at AWS's access control settings. In CentOS, stop the firewall with the command "sudo systemctl stop firewalld" and try again.

getroot commented 4 years ago

Here, OvenMediaEngine is installed by default setting for testing. https://ovenplayer.com/docs/ome_demo.html

Send it to the following address with OBS and you can see it playing on the player.

rtmp: //dev2.airensoft.com/app stream

It may be slow because it is installed in Seoul, Korea, but you can test it anyway. I hope this will help you.

naderaa commented 4 years ago

Alright, thanks for your help. Webrtc and hls is working, but dash still can't

getroot commented 4 years ago

The MASTER BRANCH version does not work properly with mpeg-dash. TEMP / CMAF BRANCH is relatively new, but our final code hasn't been committed yet. Please wait a little longer for the MPEG-DASH function. We are working on a final for low-latency MPEG-DASH based on CMAF.

What was wrong with WebRTC? Please share your experience for all of us.

naderaa commented 4 years ago

I'm using AWS, and i forgot add a port on AWS's access control settings. Now my WebRTC can stream successfully

getroot commented 4 years ago

This issue has been closed since it has been inactive for quite some time. If you want to continue discussing this issue, please feel free to reopen it.