-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Switching WebRTC streams #89
Comments
I think it's a player issue. |
Yes, it does take several seconds the first time. What is the recommended server configuration and player configuration for this? |
Server.xml OvenMediaEngine default * 9000 1935 81 81 *:10000-10005/udp 3333
In the webpage.
{
|
I am not sure of this problem, but I think there is probably a performance problem with the server. Live transcoding is very expensive. I recommend you to monitor the server's status. |
Its a 32 core machine(hence 32 threads) with a GPU. Its using a tiny fraction of the cycles available and i dont see any come maxing out. Is there some configuration that I should use? |
If the server is not using the maximum CPU, it is probably not the cause. Could you lower Publisher's ThreadCount to 8 and try it again? Too many threads may be the problem. 8If this doesn't work, give me more information. Do you use OME at dev branch? and how about DASH playback? |
Hi, Reducing the threads didnt help. I am using version fd40dd5 of the player. I am using Chrome on F27. This is from the log file: |
Using the MPEG-DASH streams it seems to switch much faster but the latency is very long. Is it possible to switch fast and have ultra low latency? |
Ah! |
We are merging the Dev branch to the Master branch next week and this is the new version of the manual. https://airensoft.gitbook.io/ovenmediaengine/v/0.9.5/ |
Ill switch to the dev branch of OME and let you know - I was using release 0.9.1 |
I am now on the dev branch of OME and I am on master of the player. I dont see changes. To be able to switch quickly should I have several encoder profiles and have different streams using them or should I have just one stream with all the encode variants(as commented out above)? |
It is very difficult to analyze this problem. Because it doesn't happen to me. Isn't the packet loss caused by your network too slow? If you are using chrome, you can also enter chrome: // webrtc-internals in the address bar and view detailed statistics. I tested it with the exact same settings as you. (Latest DEV) And I saw the stream switching complete within 1 second and start playing and I used http://demo.ovenplayer.com as player to play this. My configuration of server are: <?xml version="1.0" encoding="UTF-8" ?>
<Server version="5">
<Name>OvenMediaEngine</Name>
<!-- Host type (origin/edge) -->
<Type>origin</Type>
<!-- Specify IP address to bind (* means all IPs) -->
<IP>*</IP>
<!-- Settings for the ports to bind -->
<Bind>
<Providers>
<RTMP><Port>${env:OME_RTMP_PROV_PORT:1935}</Port></RTMP>
</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></HLS>
<DASH><Port>${env:OME_DASH_STREAM_PORT:8080}</Port></DASH>
<WebRTC>
<Signalling><Port>${env:OME_SIGNALLING_PORT:3333}</Port></Signalling>
<IceCandidates>
<IceCandidate>${env:OME_ICE_CANDIDATES:*:10000-10005/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 domain and TLS -->
<Domain>
<Names>
<!-- Domain names
<Name>stream1.airensoft.com</Name>
<Name>stream2.airensoft.com</Name>
<Name>*.sub.airensoft.com</Name>
-->
<Name>*</Name>
</Names>
<!--
<TLS>
<CertPath>path/to/file.crt</CertPath>
<KeyPath>path/to/file.key</KeyPath>
<ChainCertPath>path/to/file.crt</ChainCertPath>
</TLS>
-->
</Domain>
<Applications>
<Application>
<Name>app</Name>
<Type>live</Type>
<Encodes>
<Encode>
<Name>VP8_low</Name>
<Audio>
<Codec>opus</Codec>
<Bitrate>48000</Bitrate>
<Samplerate>48000</Samplerate>
<Channel>2</Channel>
</Audio>
<Video>
<Codec>vp8</Codec>
<Width>640</Width>
<Height>360</Height>
<Bitrate>350000</Bitrate>
<Framerate>30.0</Framerate>
</Video>
</Encode>
<Encode>
<Name>H264_low</Name>
<Audio>
<Codec>aac</Codec>
<Bitrate>48000</Bitrate>
<Samplerate>48000</Samplerate>
<Channel>2</Channel>
</Audio>
<Video>
<Codec>h264</Codec>
<Width>640</Width>
<Height>360</Height>
<Bitrate>350000</Bitrate>
<Framerate>30.0</Framerate>
</Video>
</Encode>
<Encode>
<Name>VP8_medium</Name>
<Audio>
<Codec>opus</Codec>
<Bitrate>48000</Bitrate>
<Samplerate>48000</Samplerate>
<Channel>2</Channel>
</Audio>
<Video>
<Codec>vp8</Codec>
<Width>640</Width>
<Height>360</Height>
<Bitrate>700000</Bitrate>
<Framerate>30.0</Framerate>
</Video>
</Encode>
<Encode>
<Name>H264_medium</Name>
<Audio>
<Codec>aac</Codec>
<Bitrate>48000</Bitrate>
<Samplerate>48000</Samplerate>
<Channel>2</Channel>
</Audio>
<Video>
<Codec>h264</Codec>
<Width>640</Width>
<Height>360</Height>
<Bitrate>700000</Bitrate>
<Framerate>30.0</Framerate>
</Video>
</Encode>
<Encode>
<Name>VP8_high</Name>
<Audio>
<Codec>opus</Codec>
<Bitrate>64000</Bitrate>
<Samplerate>48000</Samplerate>
<Channel>2</Channel>
</Audio>
<Video>
<Codec>vp8</Codec>
<Width>640</Width>
<Height>360</Height>
<Bitrate>1500000</Bitrate>
<Framerate>30.0</Framerate>
</Video>
</Encode>
<Encode>
<Name>H264_high</Name>
<Audio>
<Codec>aac</Codec>
<Bitrate>64000</Bitrate>
<Samplerate>48000</Samplerate>
<Channel>2</Channel>
</Audio>
<Video>
<Codec>h264</Codec>
<Width>640</Width>
<Height>360</Height>
<Bitrate>1500000</Bitrate>
<Framerate>30.0</Framerate>
</Video>
</Encode>
</Encodes>
<Streams>
<Stream>
<Name>${OriginStreamName}_low_o</Name>
<Profiles>
<Profile>VP8_low</Profile>
<Profile>H264_low</Profile>
</Profiles>
</Stream>
<Stream>
<Name>${OriginStreamName}_medium_o</Name>
<Profiles>
<Profile>VP8_medium</Profile>
<Profile>H264_medium</Profile>
</Profiles>
</Stream>
<Stream>
<Name>${OriginStreamName}_high_o</Name>
<Profiles>
<Profile>VP8_high</Profile>
<Profile>H264_high</Profile>
</Profiles>
</Stream>
</Streams>
<Providers>
<RTMP />
</Providers>
<Publishers>
<ThreadCount>8</ThreadCount>
<HLS>
<SegmentDuration>5</SegmentDuration>
<SegmentCount>3</SegmentCount>
<CrossDomain>
<Url>*</Url>
</CrossDomain>
</HLS>
<DASH>
<SegmentDuration>5</SegmentDuration>
<SegmentCount>3</SegmentCount>
<CrossDomain>
<Url>*</Url>
</CrossDomain>
</DASH>
<WebRTC>
<Timeout>30000</Timeout>
</WebRTC>
</Publishers>
</Application>
</Applications>
</VirtualHost>
</VirtualHosts>
</Server> |
Could you upload ovenmediaengine.log file generated by the dev branch version? |
So, I think we have different expectations and there is no problem. From an email from you I understand that I can switch streams in 1 frame - how do we achieve this? |
Because you said "several seconds", I misunderstood the exact meaning of what you said. The ability to switch streams by 1Frame difference must be fully supported by the player. HLS and DASH support ABR in Player, so we will add this feature to OME soon. We will add ABR to Playlist (Manifest, M3U8) by putting multiple However, we have a lot of discussion about WebRTC's ABR. This is, as far as I know, not yet an exact standard. (Please tell me if you know.) There is a Simulcast, but this is not for seamless swtiching. Another method we are considering is changing the bitrate at the server's RTP level and sending it. But this requires a lot of proof to be used commercially. If there are any changes to ABR, we will notify you through this site. |
To be clear, you cant switch stream in 1 frame with OvenMediaEngine and OvenPlayer but you plan to add support for ABR HLS and DASH streams in the OvenMediaEngine - right? How soon do you think that will happen? |
I am not sure how long that feature will be added, but we will try to add ABR feature in 2 months. (Because we are usually busy with commercial projects.) |
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. |
@getroot I was looking at this issue to figure out how to configure OME to stream various quality over webrtc, and your example of a server configuration seems helpful. However, I think it is now outdated as from what I could figure, |
Hi,
How do you have different streams at different bitrates then have the player switch between them seamlessly?
I have configured my server to encode two streams at different bitrates, in the frontend I use player.setCurrentSource to switch the streams, autoStart is true(when I create the player) and its taking several seconds to start playing av.
Best Regards,
Ian
The text was updated successfully, but these errors were encountered: