Couldn't play from edge, PushApplication is disabled #1664
Answered
by
getroot
mauricioabreu
asked this question in
Help
-
Hello! I need some guidance while playing streaming from edge. EvidencesWhen I start an Origin and request the streaming straight from it, it works:
However, requesting it from an edge does not work:
One of the errors I see in the logs:
Relevant edge logs from edge container:
What am I missing? SetupDocker compose file:
Origin conf: <?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>
<PrivacyProtection>false</PrivacyProtection>
<!--
To get the public IP address(mapped address of stun) of the local server.
This is useful when OME cannot obtain a public IP from an interface, such as AWS or docker
environment.
If this is successful, you can use ${PublicIP} in your settings.
-->
<StunServer>stun.l.google.com:19302</StunServer>
<Modules>
<!--
Currently OME only supports h2 like all browsers do. Therefore, HTTP/2 only works on TLS ports.
-->
<HTTP2>
<Enable>true</Enable>
</HTTP2>
<LLHLS>
<Enable>true</Enable>
</LLHLS>
<!-- P2P works only in WebRTC and is experiment feature -->
<P2P>
<!-- disabled by default -->
<Enable>false</Enable>
<MaxClientPeersPerHostPeer>2</MaxClientPeersPerHostPeer>
</P2P>
</Modules>
<!-- Settings for the ports to bind -->
<Bind>
<Managers>
<API>
<Port>8081</Port>
<TLSPort>8082</TLSPort>
<WorkerCount>1</WorkerCount>
</API>
</Managers>
<Providers>
<!-- Pull providers -->
<RTSPC>
<WorkerCount>1</WorkerCount>
</RTSPC>
<OVT>
<WorkerCount>1</WorkerCount>
</OVT>
<!-- Push providers -->
<RTMP>
<Port>1935</Port>
<WorkerCount>1</WorkerCount>
</RTMP>
<SRT>
<Port>9999</Port>
<WorkerCount>1</WorkerCount>
</SRT>
<MPEGTS>
<!--
Listen on port 4000~4005 (<Port>4000-4004,4005/udp</Port>)
This is just a demonstration to show that you can configure the port in several ways
-->
<Port>4000/udp</Port>
</MPEGTS>
<WebRTC>
<Signalling>
<Port>3333</Port>
<TLSPort>3334</TLSPort>
<WorkerCount>1</WorkerCount>
</Signalling>
<IceCandidates>
<IceCandidate>*:10000/udp</IceCandidate>
<!--
If you want to stream WebRTC over TCP, specify IP:Port for TURN server.
This uses the TURN protocol, which delivers the stream from the built-in TURN server to the
player's TURN client over TCP.
For detailed information, refer
https://airensoft.gitbook.io/ovenmediaengine/streaming/webrtc-publishing#webrtc-over-tcp
-->
<TcpRelay>*:3478</TcpRelay>
<!-- TcpForce is an option to force the use of TCP rather than UDP in WebRTC
streaming. (You can omit ?transport=tcp accordingly.) If <TcpRelay> is not set,
playback may fail. -->
<TcpForce>true</TcpForce>
<TcpRelayWorkerCount>1</TcpRelayWorkerCount>
</IceCandidates>
</WebRTC>
</Providers>
<Publishers>
<OVT>
<Port>9000</Port>
<WorkerCount>1</WorkerCount>
</OVT>
<LLHLS>
<!--
OME only supports h2, so LLHLS works over HTTP/1.1 on non-TLS ports.
LLHLS works with higher performance over HTTP/2,
so it is recommended to use a TLS port.
-->
<Port>3333</Port>
<!-- If you want to use TLS, specify the TLS port -->
<TLSPort>3334</TLSPort>
<WorkerCount>1</WorkerCount>
</LLHLS>
<WebRTC>
<Signalling>
<Port>3333</Port>
<TLSPort>3334</TLSPort>
<WorkerCount>1</WorkerCount>
</Signalling>
<IceCandidates>
<IceCandidate>*:10000-10005/udp</IceCandidate>
<!--
If you want to stream WebRTC over TCP, specify IP:Port for TURN server.
This uses the TURN protocol, which delivers the stream from the built-in TURN server to the
player's TURN client over TCP.
For detailed information, refer
https://airensoft.gitbook.io/ovenmediaengine/streaming/webrtc-publishing#webrtc-over-tcp
-->
<TcpRelay>*:3478</TcpRelay>
<!-- TcpForce is an option to force the use of TCP rather than UDP in WebRTC
streaming. (You can omit ?transport=tcp accordingly.) If <TcpRelay> is not set,
playback may fail. -->
<TcpForce>true</TcpForce>
<TcpRelayWorkerCount>1</TcpRelayWorkerCount>
</IceCandidates>
</WebRTC>
</Publishers>
</Bind>
<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>llhls-token</AccessToken>
<CrossDomains>
<Url>*</Url>
</CrossDomains>
</API>
</Managers>
<VirtualHosts>
<!-- You can use wildcard like this to include multiple XMLs -->
<VirtualHost include="VHost*.xml" />
<VirtualHost>
<Name>default</Name>
<!--Distribution
is a value that can be used when grouping the same vhost distributed across multiple
servers. This value is output to the events log, so you can use it to aggregate
statistics. -->
<Distribution>ovenmediaengine.com</Distribution>
<!-- 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>policy</PolicyQueryKeyName>
<SignatureQueryKeyName>signature</SignatureQueryKeyName>
<SecretKey>aKq#1kj</SecretKey>
<Enables>
<Providers>rtmp,webrtc,srt</Providers>
<Publishers>webrtc,hls,llhls,dash,lldash</Publishers>
</Enables>
</SignedPolicy>
-->
<!--
<AdmissionWebhooks>
<ControlServerUrl></ControlServerUrl>
<SecretKey></SecretKey>
<Timeout>3000</Timeout>
<Enables>
<Providers>rtmp,webrtc,srt</Providers>
<Publishers>webrtc,hls,llhls,dash,lldash</Publishers>
</Enables>
</AdmissionWebhooks>
-->
<!-- Settings for applications -->
<Applications>
<Application>
<Name>app</Name>
<!-- Application type (live/vod) -->
<Type>live</Type>
<OutputProfiles>
<!-- Enable this configuration if you want to hardware acceleration using
GPU -->
<HardwareAcceleration>false</HardwareAcceleration>
<OutputProfile>
<Name>bypass_stream</Name>
<OutputStreamName>${OriginStreamName}</OutputStreamName>
<Playlist>
<Name>LLHLS</Name>
<FileName>llhls</FileName>
<Rendition>
<Name>360p</Name>
<Video>video_360p</Video>
<Audio>aac</Audio>
</Rendition>
<Rendition>
<Name>432p</Name>
<Video>video_432p</Video>
<Audio>aac</Audio>
</Rendition>
<Rendition>
<Name>720p_low</Name>
<Video>video_720p_low</Video>
<Audio>aac</Audio>
</Rendition>
<Rendition>
<Name>720p_high</Name>
<Video>video_720p_high</Video>
<Audio>aac</Audio>
</Rendition>
<Rendition>
<Name>1080p</Name>
<Video>video_1080p</Video>
<Audio>aac</Audio>
</Rendition>
</Playlist>
<Encodes>
<Audio>
<Name>aac</Name>
<Bypass>true</Bypass>
</Audio>
<Video>
<Name>bypass_video</Name>
<Bypass>true</Bypass>
</Video>
<Audio>
<Codec>opus</Codec>
<Bitrate>128000</Bitrate>
<Samplerate>48000</Samplerate>
<Channel>2</Channel>
</Audio>
<Video>
<Name>video_360p</Name>
<Codec>h264</Codec>
<Width>630</Width>
<Height>360</Height>
<Bitrate>1300000</Bitrate>
<Framerate>30</Framerate>
<KeyFrameInterval>30</KeyFrameInterval>
<Preset>fast</Preset>
<BFrames>0</BFrames>
<ThreadCount>4</ThreadCount>
</Video>
<Video>
<Name>video_432p</Name>
<Codec>h264</Codec>
<Width>768</Width>
<Height>432</Height>
<Bitrate>2000000</Bitrate>
<Framerate>30</Framerate>
<KeyFrameInterval>30</KeyFrameInterval>
<Preset>fast</Preset>
<BFrames>0</BFrames>
<ThreadCount>4</ThreadCount>
</Video>
<Video>
<Name>video_720p_low</Name>
<Codec>h264</Codec>
<Width>1280</Width>
<Height>720</Height>
<Bitrate>3200000</Bitrate>
<Framerate>30</Framerate>
<KeyFrameInterval>30</KeyFrameInterval>
<Preset>fast</Preset>
<BFrames>0</BFrames>
<ThreadCount>4</ThreadCount>
</Video>
<Video>
<Name>video_720p_high</Name>
<Codec>h264</Codec>
<Width>1280</Width>
<Height>720</Height>
<Bitrate>4800000</Bitrate>
<Framerate>30</Framerate>
<KeyFrameInterval>30</KeyFrameInterval>
<Preset>fast</Preset>
<BFrames>0</BFrames>
<ThreadCount>4</ThreadCount>
</Video>
<Video>
<Name>video_1080p</Name>
<Codec>h264</Codec>
<Width>1920</Width>
<Height>1080</Height>
<Bitrate>7000000</Bitrate>
<Framerate>30</Framerate>
<KeyFrameInterval>30</KeyFrameInterval>
<Preset>fast</Preset>
<BFrames>0</BFrames>
<ThreadCount>4</ThreadCount>
</Video>
</Encodes>
</OutputProfile>
</OutputProfiles>
<Providers>
<OVT />
<WebRTC />
<RTMP />
<SRT />
<MPEGTS>
<StreamMap>
<!--
Set the stream name of the client connected to the port to "stream_${Port}"
For example, if a client connects 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>
-->
<Stream>
<Name>stream_${Port}</Name>
<Port>4000</Port>
</Stream>
</StreamMap>
</MPEGTS>
<RTSPPull />
<WebRTC>
<Timeout>30000</Timeout>
</WebRTC>
</Providers>
<Publishers>
<AppWorkerCount>1</AppWorkerCount>
<StreamWorkerCount>8</StreamWorkerCount>
<OVT />
<WebRTC>
<Timeout>30000</Timeout>
<Rtx>false</Rtx>
<Ulpfec>false</Ulpfec>
<JitterBuffer>false</JitterBuffer>
</WebRTC>
<LLHLS>
<ChunkDuration>0.5</ChunkDuration>
<SegmentDuration>2</SegmentDuration>
<SegmentCount>10</SegmentCount>
<CrossDomains>
<Url>*</Url>
</CrossDomains>
</LLHLS>
</Publishers>
</Application>
</Applications>
</VirtualHost>
</VirtualHosts>
</Server> Edge conf: <?xml version="1.0" encoding="UTF-8"?>
<Server version="8">
<Name>OvenMediaEngine</Name>
<!-- Host type (origin/edge) -->
<Type>edge</Type>
<!-- Specify IP address to bind (* means all IPs) -->
<IP>*</IP>
<PrivacyProtection>false</PrivacyProtection>
<!--
To get the public IP address(mapped address of stun) of the local server.
This is useful when OME cannot obtain a public IP from an interface, such as AWS or docker environment.
If this is successful, you can use ${PublicIP} in your settings.
-->
<StunServer>stun.ovenmediaengine.com:13478</StunServer>
<Modules>
<!--
Currently OME only supports h2 like all browsers do. Therefore, HTTP/2 only works on TLS ports.
-->
<HTTP2>
<Enable>true</Enable>
</HTTP2>
<LLHLS>
<Enable>true</Enable>
</LLHLS>
<!-- P2P works only in WebRTC and is experiment feature -->
<P2P>
<!-- disabled by default -->
<Enable>false</Enable>
<MaxClientPeersPerHostPeer>2</MaxClientPeersPerHostPeer>
</P2P>
</Modules>
<!-- Settings for the ports to bind -->
<Bind>
<!-- Enable this configuration if you want to use API Server -->
<!--
<Managers>
<API>
<Port>${env:OME_API_PORT:8081}</Port>
<WorkerCount>1</WorkerCount>
</API>
</Managers>
-->
<Providers>
<!-- Pull providers -->
<OVT>
<WorkerCount>1</WorkerCount>
</OVT>
</Providers>
<Publishers>
<LLHLS>
<!--
OME only supports h2, so LLHLS works over HTTP/1.1 on non-TLS port.
Note that LLHLS runs higher performance over HTTP/2.
Therefore, it is recommended to use TLS Port.
-->
<Port>${env:OME_LLHLS_STREAM_PORT:3333}</Port>
<TLSPort>${env:OME_LLHLS_STREAM_TLS_PORT:3334}</TLSPort>
<WorkerCount>1</WorkerCount>
</LLHLS>
<WebRTC>
<Signalling>
<Port>${env:OME_SIGNALLING_PORT:3333}</Port>
<TLSPort>${env:OME_SIGNALLING_TLS_PORT:3334}</TLSPort>
<WorkerCount>1</WorkerCount>
</Signalling>
<IceCandidates>
<IceCandidate>${env:OME_HOST_IP:*}:${env:OME_WEBRTC_CANDIDATE_PORT:10005-10009/udp}</IceCandidate>
<TcpRelay>${env:OME_HOST_IP:*}:${env:OME_WEBRTC_TCP_RELAY_PORT:3478}</TcpRelay>
<TcpForce>true</TcpForce>
<TcpRelayWorkerCount>1</TcpRelayWorkerCount>
</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>
<!--Distribution is a value that can be used when grouping the same vhost distributed across multiple servers. This value is output to the events log, so you can use it to aggregate statistics. -->
<Distribution>ovenmediaengine.com</Distribution>
<!-- 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>./cert.crt</CertPath>
<KeyPath>./cert.key</KeyPath>
<ChainCertPath>./cert.ca-bundle</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,webrtc,srt</Providers>
<Publishers>webrtc,llhls</Publishers>
</Enables>
</SignedPolicy>
-->
<!-- Settings for ProxyPass (It can specify origin for each path) -->
<Origins>
<Properties>
<NoInputFailoverTimeout>3000</NoInputFailoverTimeout>
<UnusedStreamDeletionTimeout>60000</UnusedStreamDeletionTimeout>
</Properties>
<Origin>
<Location>/edge_app/</Location>
<Pass>
<Scheme>OVT</Scheme>
<Urls><Url>origin:9000/app/</Url></Urls>
</Pass>
</Origin>
</Origins>
<!--
When Edge tries to pull a stream, it looks first in <Origins> in local, and in OriginMapStore.
Therefore, it is recommended to disable Origins when using OriginMapStore.
<OriginMapStore>
In order to use OriginMap, you must enable OVT Publisher in Origin and OVT Provider in Edge.
<RedisServer>
<Host>192.168.0.160:6379</Host>
<Auth>!@#ovenmediaengine</Auth>
</RedisServer>
</OriginMapStore>
-->
<!-- Default CORS Settings -->
<CrossDomains>
<Url>*</Url>
</CrossDomains>
<Applications>
<Application>
<!--
Origins and OriginMapStore can dynamically create an application if no application exists
when creating a stream. They create a new application by copying the Application configuration
where <Name> is *.
In other words, an application with <Name> as * serves as a dynamic application template.
-->
<Name>*</Name>
<Type>live</Type>
<OutputProfiles>
<OutputProfile>
<Name>passthrough</Name>
<OutputStreamName>${OriginStreamName}</OutputStreamName>
<Encodes>
<Video>
<Bypass>true</Bypass>
</Video>
<Audio>
<Bypass>true</Bypass>
</Audio>
</Encodes>
</OutputProfile>
</OutputProfiles>
<Providers>
<OVT />
</Providers>
<Publishers>
<AppWorkerCount>1</AppWorkerCount>
<StreamWorkerCount>8</StreamWorkerCount>
<WebRTC>
<Timeout>30000</Timeout>
<Rtx>false</Rtx>
<Ulpfec>false</Ulpfec>
<JitterBuffer>false</JitterBuffer>
</WebRTC>
<LLHLS>
<ChunkDuration>0.5</ChunkDuration>
<SegmentDuration>6</SegmentDuration>
<SegmentCount>10</SegmentCount>
<CrossDomains>
<Url>*</Url>
</CrossDomains>
</LLHLS>
</Publishers>
</Application>
</Applications>
</VirtualHost>
</VirtualHosts>
</Server> Ingest script: ingest-srt:
ffmpeg -re -f lavfi -i testsrc=size=1280x720:rate=30 \
-vf "drawtext=fontsize=30:fontcolor=white:x=7:y=7:text='Time\: %{localtime\:%X}',format=yuv420p" \
-pix_fmt yuv420p -c:v libx264 -preset ultrafast \
-b:v 600k -max_muxing_queue_size 1024 -tune zerolatency \
-g 30 -f mpegts "srt://127.0.0.1:9999?streamid=srt://127.0.0.1:9999/app/llhls" |
Beta Was this translation helpful? Give feedback.
Answered by
getroot
Jul 16, 2024
Replies: 1 comment 1 reply
-
This is a regression bug in the latest release version. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mauricioabreu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a regression bug in the latest release version.
It can be fixed by setting
<Application><Name>*</Name>
in Edge to a real name instead of *, or by using the ovenmediaengine:dev docker image.