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.58k stars 1.06k forks source link

Origin Server HLS Publisher not respecting SegmentDuration and SegmentCount settings #280

Closed belthesar closed 3 years ago

belthesar commented 3 years ago

Describe the bug Hey folks:

Currently, I'm using the docker-compose pattern to set up a lab OME setup with Origin and Edge configuration. I'm attempting to get LL-HLS working by adjusting the HLS publisher segment duration and count settings. However, the settings do not seem to be respected when the HLS playlist file is created, instead creating the default segment count of 3 and duration of 5. It appears that the config is loaded by the server, as the logs see that I've set the

To Reproduce Steps to reproduce the behavior:

  1. Adjust the HLS publisher on the Origin config to use a smaller segment duration, segment count, or both. Example:
                                       <Publishers>
                        <SessionLoadBalancingThreadCount>8</SessionLoadBalancingThreadCount>
                        <OVT />
                        <WebRTC>
                            <Timeout>30000</Timeout>
                        </WebRTC>
                        <HLS>
                            <SegmentDuration>1</SegmentDuration>
                            <SegmentCount>2</SegmentCount>
                            <CrossDomains>
                                <Url>*</Url>
                            </CrossDomains>
                        </HLS>
                                               ...
                    </Publishers>
                                       ...
  2. Start/restart your OME Origin server to pick up the changes.

Expected behavior ts segments should be of 1 seconds, with 2 segments, with the corresponding playlist.m3u8 file looking something like:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:2
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:2
#EXTINF:1
1.ts
#EXTINF:1
2.ts

Logs Origin: https://gist.github.com/belthesar/a13e36fdb11f74ca468898a719ad5890 Edge: https://gist.github.com/belthesar/224f05583e29b1811be9a47291b2c6f5

Server (please complete the following information):

Player (please complete the following information):

Additional context I have verified that the file inside the docker container is indeed my adjusted server configuration file. I'm using a bind mount to load the config rather than building the container each time to bake in the file.

getroot commented 3 years ago

HLS edge in OME is a method of renewing packaging at the edge, not an HTTP reverse proxy method. Change the setting of edge.

dbContext commented 3 years ago

As @getroot suggested, you'll need to update the configuration on the server that is actually serving the HLS segment to the viewer, in your setup that is the edge server.

belthesar commented 3 years ago

Gotcha. This had seemed backwards to me, but hey, the example defined everything on the origin, so I big ol' shrug emoji'd and went on. This makes sense though. Thanks folks!

basisbit commented 3 years ago

Is the documentation somewhere in a public repository, so that the community can create Pull Requests to help improve it? Would like to update the samples and explain them a bit more, as well as update the live-streaming samples and add a tutorial how to set up the typical use cases form OBS up to OvenMediaPlayer. That should also reduce the amounts of question issues.

getroot commented 3 years ago

@basisbit We are using gitbook for manuals and can invite you as a writer. Please provide your email address. We will send you an invitation. Thanks for your contribution.

basisbit commented 3 years ago

according to the website of gitbook, they support syncing the markdown files with a github repository. Could you maybe enable that for https://github.com/AirenSoft/Docs ?

getroot commented 3 years ago

@basisbit thank you for telling me. Gitbook forcibly creates a branch in an existing project, so I created a separate project. https://github.com/AirenSoft/OvenMediaEngineDocs Thanks for the contribution.

getroot commented 3 years ago

This issue has not been updated for a long time, so I close the issue. If you would like to continue discussing this issue, please reopen it.