AirenSoft / OvenMediaEngine

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

HLS DASH AND LLDASH not loading on edge side - update maybe a BUG #501

Closed alnux closed 3 years ago

alnux commented 3 years ago

Hi im mounting a edge side of my server but HLS DASH and LLDASH does not load, webrtc and webrtc-tcp works fine

here i show my Origin and Edge config, it will some helpfully if you enlighten me.

Origen

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

<Server version="8">
    <Name>OvenMediaEngine</Name>
    <Type>origin</Type>
    <IP>*</IP>
    <StunServer>stun.l.google.com:19302</StunServer>
    <Bind>
        <Providers>
            <RTMP>
                <Port>1935</Port>
            </RTMP>
            <SRT>
                <Port>9999</Port>
            </SRT>
        </Providers>

        <Publishers>
            <OVT>
                <Port>9010</Port>
            </OVT>
            <HLS>
                <Port>8080</Port>
                <TLSPort>4443</TLSPort>
            </HLS>
            <DASH>
                <Port>8080</Port>
                <TLSPort>4443</TLSPort>
            </DASH>
            <WebRTC>
                <Signalling>
                    <Port>3333</Port>
                    <TLSPort>3334</TLSPort>
                </Signalling>

                <IceCandidates>
                    <TcpRelay>*:3478</TcpRelay>
                    <IceCandidate>*:10000-10010/udp</IceCandidate>
                </IceCandidates>
            </WebRTC>
        </Publishers>
    </Bind>

    <VirtualHosts>
        <VirtualHost include="VHost*.xml" />
        <VirtualHost>
            <Name>stream.tribu510.com</Name>
            <Host>
                <Names>
                    <Name>stream.tribu510.com</Name>
                </Names>
                <TLS>
                                        <CertPath>/home/admin/conf/web/stream.tribu510.com/ssl/stream.tribu510.com.crt</CertPath>
                                        <KeyPath>/home/admin/conf/web/stream.tribu510.com/ssl/stream.tribu510.com.key</KeyPath>
                                        <ChainCertPath>/home/admin/conf/web/stream.tribu510.com/ssl/stream.tribu510.com.crt</ChainCertPath>
                                </TLS>
            </Host>
            <Applications>
                <Application>
                    <Name>endirecto</Name>
                    <Type>live</Type>
                    <OutputProfiles>
                        <OutputProfile>
                            <Name>bypass_stream</Name>
                            <OutputStreamName>${OriginStreamName}</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>
                            </Encodes>
                        </OutputProfile>
                    </OutputProfiles>
                    <Providers>
                        <RTMP />
                        <SRT />
                    </Providers>
                    <Publishers>
                        <SessionLoadBalancingThreadCount>6</SessionLoadBalancingThreadCount>
                        <OVT />
                        <WebRTC>
                            <Timeout>30000</Timeout>
                            <Rtx>true</Rtx>
                            <Ulpfec>true</Ulpfec>
                        </WebRTC>
                        <HLS>
                            <SegmentDuration>5</SegmentDuration>
                            <SegmentCount>3</SegmentCount>
                            <CrossDomains>
                                <Url>*</Url>
                            </CrossDomains>
                        </HLS>
                        <DASH>
                            <SegmentDuration>5</SegmentDuration>
                            <SegmentCount>3</SegmentCount>
                            <CrossDomains>
                                <Url>*</Url>
                            </CrossDomains>
                            <UTCTiming>
                                <Scheme>urn:mpeg:dash:utc:http-xsdate:2014</Scheme>
                                <Value>/time?iso&amp;ms</Value>
                            </UTCTiming>
                        </DASH>
                        <LLDASH>
                            <SegmentDuration>5</SegmentDuration>
                            <CrossDomains>
                                <Url>*</Url>
                            </CrossDomains>
                            <UTCTiming />
                        </LLDASH>
                    </Publishers>
                </Application>
            </Applications>
        </VirtualHost>
    </VirtualHosts>
</Server>

Edge

<Name>OvenMediaEngine</Name>
<Type>edge</Type>
<IP>*</IP>
<StunServer>stun.l.google.com:19302</StunServer>

<Bind>

    <Providers>
        <OVT>
            <Port>9010</Port>
        </OVT>
    </Providers>

    <Publishers>
        <HLS>
            <Port>8088</Port>
            <TLSPort>4443</TLSPort>
        </HLS>
        <DASH>
            <Port>8088</Port>
            <TLSPort>4443</TLSPort>
        </DASH>
        <WebRTC>
            <Signalling>
                <Port>3333</Port>
                <TLSPort>3334</TLSPort>
            </Signalling>

            <IceCandidates>
                <TcpRelay>*:3478</TcpRelay>
                <IceCandidate>*:10000-10010/udp</IceCandidate>
            </IceCandidates>
        </WebRTC>
    </Publishers>
</Bind>

<VirtualHosts>
    <VirtualHost include="VHost*.xml" />
    <VirtualHost>
        <Name>pccls01.tribu510.com</Name>

        <!-- Settings for multi ip/domain and TLS -->
        <Host>
            <Names>
                <Name>pccls01.tribu510.com</Name>
            </Names>
            <TLS>
                                    <CertPath>/home/admin/conf/web/pccls01.tribu510.com/ssl/pccls01.tribu510.com.crt</CertPath>
                                    <KeyPath>/home/admin/conf/web/pccls01.tribu510.com/ssl/pccls01.tribu510.com.key</KeyPath>
                                    <ChainCertPath>/home/admin/conf/web/pccls01.tribu510.com/ssl/pccls01.tribu510.com.crt</ChainCertPath>
                            </TLS>
        </Host>
        <Origins>

            <Origin>
                <Location>/endirecto/</Location>
                <Pass>
                    <Scheme>OVT</Scheme>
                    <Urls><Url>stream.tribu510.com:9010/endirecto/</Url></Urls>
                </Pass>
            </Origin>
        </Origins>

        <Applications>
            <Application>
                <Name>endirecto</Name>
                <Type>live</Type>
                <OutputProfiles>
                    <OutputProfile>
                        <Name>bypass_stream</Name>
                        <OutputStreamName>${OriginStreamName}</OutputStreamName>
                        <Encodes>
                            <Audio>
                                <Bypass>true</Bypass>
                            </Audio>
                            <Video>
                                <Bypass>true</Bypass>
                            </Video>
                        </Encodes>
                    </OutputProfile>
                </OutputProfiles>
                <Providers>
                    <OVT />
                </Providers>
                <Publishers>
                    <SessionLoadBalancingThreadCount>6</SessionLoadBalancingThreadCount>
                    <WebRTC>
                        <Timeout>30000</Timeout>
                        <Rtx>true</Rtx>
                        <Ulpfec>true</Ulpfec>
                    </WebRTC>
                    <HLS>
                        <SegmentDuration>5</SegmentDuration>
                        <SegmentCount>3</SegmentCount>
                        <CrossDomains>
                            <Url>*</Url>
                        </CrossDomains>
                    </HLS>
                    <DASH>
                        <SegmentDuration>5</SegmentDuration>
                        <SegmentCount>3</SegmentCount>
                        <CrossDomains>
                            <Url>*</Url>
                        </CrossDomains>
                        <UTCTiming>
                            <Scheme>urn:mpeg:dash:utc:http-xsdate:2014</Scheme>
                            <Value>/time?iso&amp;ms</Value>
                        </UTCTiming>
                    </DASH>
                    <LLDASH>
                        <SegmentDuration>5</SegmentDuration>
                        <CrossDomains>
                            <Url>*</Url>
                        </CrossDomains>
                        <UTCTiming />
                    </LLDASH>
                </Publishers>
            </Application>
        </Applications>
    </VirtualHost>
</VirtualHosts>

there is not log on OME logger (empty)

You could see a demo player link here and see the code, if you change de to HLS does not work to in DASH and LLDash. By the way on origen server all work normally

alnux commented 3 years ago

hi, Maybe it is a bug, the EDGE it connects and disconnects after each request to .ts files while at the ORIGEN it creates the session only once and then requests for .ts. here the logs of both the ORIGEN and the EDGE

ORIGEN (Good working)

[2021-09-04 09:34:13.597] I [SegWorker:32498] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#stream.tribu510.com#endirecto/stream/595.ts) from 200.87.93.211:1234 : Segment number : 595 Duration : 6
[2021-09-04 09:34:13.597] I [SegWorker:32498] Monitor | stream_metrics.cpp:116  | A new session has started playing #stream.tribu510.com#endirecto/stream on the HLS publisher. HLS(1)/Stream total(2)/App total(2)
[2021-09-04 09:34:16.789] I [SegWorker:32498] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#stream.tribu510.com#endirecto/stream/596.ts) from 200.87.93.211:47933 : Segment number : 596 Duration : 6
[2021-09-04 09:34:19.502] I [SegWorker:32498] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#stream.tribu510.com#endirecto/stream/597.ts) from 200.87.93.211:62541 : Segment number : 597 Duration : 6
[2021-09-04 09:34:22.211] I [SegWorker:32498] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#stream.tribu510.com#endirecto/stream/598.ts) from 200.87.93.211:49515 : Segment number : 598 Duration : 6
[2021-09-04 09:34:24.909] I [SegWorker:32498] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#stream.tribu510.com#endirecto/stream/599.ts) from 200.87.93.211:35085 : Segment number : 599 Duration : 6
[2021-09-04 09:34:29.081] I [SegWorker:32498] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#stream.tribu510.com#endirecto/stream/600.ts) from 200.87.93.211:24875 : Segment number : 600 Duration : 6
[2021-09-04 09:34:32.551] I [SPRtcSignalling:32481] WebRTC Publisher | webrtc_publisher.cpp:605  | Stop commnad received : #stream.tribu510.com#endirecto/stream/115

Edge(Has problems) it shoes webrtc logs too, becouse the player 0.10.2 auto go to next source but before it the player sometime show flashing images and appear the dot red (direct signal)

HLS

[2021-09-04 09:35:16.360] I [SegWorker:3628] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#pccls01.tribu510.com#endirecto/stream/597.ts) from 200.87.93.211:58418 : Segment number : 597 Duration : 6
[2021-09-04 09:35:16.360] I [SegWorker:3628] Monitor | stream_metrics.cpp:116  | A new session has started playing #pccls01.tribu510.com#endirecto/stream on the HLS publisher. HLS(1)/Stream total(3)/App total(3)
[2021-09-04 09:35:18.099] I [SegWorker:3626] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#pccls01.tribu510.com#endirecto/stream/597.ts) from 200.87.93.211:27138 : Segment number : 597 Duration : 6
[2021-09-04 09:35:18.099] I [SegWorker:3626] Monitor | stream_metrics.cpp:116  | A new session has started playing #pccls01.tribu510.com#endirecto/stream on the HLS publisher. HLS(2)/Stream total(4)/App total(4)
[2021-09-04 09:35:20.086] I [SPRtcSignalling:3593] Signalling | rtc_signalling_server.cpp:184  | New client is connected: <ClientSocket: 0x7f81e800c790, #4, Connected, TCP, Nonblocking, 200.87.93.211:19218>
[2021-09-04 09:35:21.398] I [SPRtcSignalling:3593] Monitor | stream_metrics.cpp:116  | A new session has started playing #pccls01.tribu510.com#endirecto/stream on the WebRTC publisher. WebRTC(3)/Stream total(5)/App total(5)
[2021-09-04 09:35:21.835] I [SPRtcSignalling:3592] Signalling | rtc_signalling_server.cpp:184  | New client is connected: <ClientSocket: 0x7f81e80c9b70, #62, Connected, TCP, Nonblocking, 200.87.93.211:24610>
[2021-09-04 09:35:22.269] I [SPRtcSignalling:3592] Monitor | stream_metrics.cpp:116  | A new session has started playing #pccls01.tribu510.com#endirecto/stream on the WebRTC publisher. WebRTC(4)/Stream total(6)/App total(6)
[2021-09-04 09:35:22.434] I [SPICE:3597] Ice | ice_port.cpp:920  | Add the client to the port list: 200.87.93.211:15916

DASH

[2021-09-04 09:53:10.321] I [SPRtcSignalling:3592] Monitor | stream_metrics.cpp:116  | A new session has started playing #pccls01.tribu510.com#endire
cto/stream on the WebRTC publisher. WebRTC(2)/Stream total(2)/App total(2)
[2021-09-04 09:53:14.131] I [SegWorker:3631] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#pccls01.tribu510.com#endirecto/stream/init_video.m4s) from 200.87.93.211:43985 : Segment number : 0 Duration : 0
[2021-09-04 09:53:14.134] I [SegWorker:3632] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#pccls01.tribu510.com#endirecto/stream/init_audio.m4s) from 200.87.93.211:22458 : Segment number : 0 Duration : 0
[2021-09-04 09:53:14.755] I [SegWorker:3633] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#pccls01.tribu510.com#endirecto/stream/930_video.m4s) from 200.87.93.211:24605 : Segment number : 930 Duration : 6
[2021-09-04 09:53:14.755] I [SegWorker:3633] Monitor | stream_metrics.cpp:116  | A new session has started playing #pccls01.tribu510.com#endirecto/stream on the DASH publisher. DASH(1)/Stream total(3)/App total(3)
[2021-09-04 09:53:14.760] I [SegWorker:3630] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#pccls01.tribu510.com#endirecto/stream/930_audio.m4s) from 200.87.93.211:44760 : Segment number : 930 Duration : 5
[2021-09-04 09:53:16.051] I [SegWorker:3631] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#pccls01.tribu510.com#endirecto/stream/931_audio.m4s) from 200.87.93.211:62538 : Segment number : 931 Duration : 4
[2021-09-04 09:53:17.321] I [SegWorker:3632] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#pccls01.tribu510.com#endirecto/stream/932_audio.m4s) from 200.87.93.211:2015 : Segment number : 932 Duration : 4
[2021-09-04 09:53:17.487] I [SegWorker:3633] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#pccls01.tribu510.com#endirecto/stream/930_video.m4s) from 200.87.93.211:56979 : Segment number : 930 Duration : 6
[2021-09-04 09:53:17.487] I [SegWorker:3633] Monitor | stream_metrics.cpp:116  | A new session has started playing #pccls01.tribu510.com#endirecto/stream on the DASH publisher. DASH(2)/Stream total(4)/App total(4)
[2021-09-04 09:53:18.598] I [SegWorker:3630] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#pccls01.tribu510.com#endirecto/stream/933_audio.m4s) from 200.87.93.211:2551 : Segment number : 933 Duration : 5
[2021-09-04 09:53:19.888] I [SegWorker:3631] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#pccls01.tribu510.com#endirecto/stream/934_audio.m4s) from 200.87.93.211:51232 : Segment number : 934 Duration : 4
[2021-09-04 09:53:20.186] I [SegWorker:3632] HTTPPublisher | segment_publisher.cpp:188  | Segment requested (#pccls01.tribu510.com#endirecto/stream/930_video.m4s) from 200.87.93.211:58694 : Segment number : 930 Duration : 6
getroot commented 3 years ago

Please tell me the codec information of the input stream. And please post the full log. I'm so busy these days I don't have time to look at this right now. I'll look into this soon. (You don't need to create two issues. Close one and post it here as a comment.)

alnux commented 3 years ago

Hi, i updated to OME 0.12.4 and the LLDASH does not work, header Browser show error 404 on _audio_ll.m4s and _video_ll.m4s

im on ubuntu 18.4

getroot commented 3 years ago

I tried to reproduce this problem, but couldn't. Does it also reproduce with 0.10.6? If it does, please post the entire Server.xml and OvenMediaEngine.log so I can reproduce this issue.

getroot commented 3 years ago

We are serving WebRTC and HLS well in commercial media services with 0.12.7. If your issue still recurs, please reopen the issue. Note that both Origin and Edge must work with version 0.12.7. (Please note that DASH and LLDASH do not work well in some browsers yet.)