Closed JahzyB closed 1 year ago
Try ws://192.168.1.102:3333/app/stream not wss://192.168.1.102:3333/app/stream
When I try that I just get "Can not play due to unknown reasons" and nothing at all in the logs.
upload your entire log file /var/log/ovenmediaengine/ovenmediaengine.log
log
docker run
-d
--name='ovenmediaengine'
--net='bridge'
-e TZ="America/New_York"
-e HOST_OS="Unraid"
-e HOST_HOSTNAME="host"
-e HOST_CONTAINERNAME="ovenmediaengine"
-l net.unraid.docker.managed=dockerman
-l net.unraid.docker.icon='https://www.gitbook.com/cdn-cgi/image/width=40,height=40,fit=contain,dpr=1,format=auto/https%3A%2F%2F3312312173-files.gitbook.io%2F~%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-Lcd00MyPtgKKaEeNUki%252Favatar-1606304387707.png%3Fgeneration%3D1606304387898170%26alt%3Dmedia'
-p '1935:1935/tcp'
-p '3333:3333/tcp'
-p '3334:3334/tcp'
-p '3478:3478/tcp'
-p '9000:9000/tcp'
-p '9999:9999/udp'
-p '4000:4000/udp'
-v '/mnt/user/appdata/ovenmediaengine/origin_conf':'/opt/ovenmediaengine/bin/origin_conf':'rw'
-v '/mnt/user/appdata/ovenmediaengine/edge_conf':'/opt/ovenmediaengine/bin/edge_conf':'rw'
-v '/mnt/user/appdata/ovenmediaengine/logs':'/opt/ovenmediaengine/bin/logs':'rw' 'airensoft/ovenmediaengine'
I think I may be doing something dumb with my nginx config. I have 443 in my nginx docker container mapped to 444 on the host and 80 in the container to 83 on the host. Then I've got this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>test</title>
</head>
<body>
<!-- OvenPlayer will be initialized inside this element. -->
<div id="player_id"></div>
<!-- Load OvenPlayer via CDN -->
<script src="https://cdn.jsdelivr.net/npm/ovenplayer/dist/ovenplayer.js"></script>
<script>
// Initialize OvenPlayer
const player = OvenPlayer.create('player_id', {
sources: [
{
label: 'label_for_webrtc',
// Set the type to 'webrtc'
type: 'webrtc',
// Set the file to WebRTC Signaling URL with OvenMediaEngine
file: 'ws://192.168.1.102:3333/app/stream'
}
]
});
</script>
</body>
</html>
set up in my /config/www in the nginx container. In the nginx config I've got traffic redirect to https set up so I assumed that if I go to the host's IP:444 I should get the stream. When I go there I see OvenPlayer with "Can not play due to unknown reasons" and have got nothing showing in the logs.
Now if I change file: 'ws://192.168.1.102:3333/app/stream'
to file: 'wss://192.168.1.102:3333/app/stream'
or file: 'wss://192.168.1.102:3334/app/stream'
then I do see something in the logs. I get what I posted up above:
file: 'wss://192.168.1.102:3333/app/stream' - [2023-02-02 19:12:56.699] E [SPRtcSig-T3333:10] HttpServer | http_transaction.cpp:163 | Invalid parse status: 400
file: 'wss://192.168.1.102:3334/app/stream' - [2023-02-02 19:13:21.455] E [SPRtcSig-T3334:12] OpenSSL | tls.cpp:193 | An error occurred while accept SSL connection: [OpenSSL] error:0A000412:SSL routines::sslv3 alert bad certificate (167773202)
The end state I'm looking for here is for me to be able to stream from OBS on my PC to the server I have set up on a separate host locally and then be able to access the stream externally by going to my public domain.
You should use a URL like this:
ws://192.168.1.102:3333/app/stream
or
wss://domain:3334/app/stream
(domain must be associated with certificate)
I don't understand your nginx related explanation.
Does the problem reproduce on demo.ovenplayer.com? If playback works fine on demo.ovenplayer.com, try the following.
Try replacing <Bind><Publishers><WebRTC><IceCandidates><TcpRelay>*:3478
to <Bind><Publishers><WebRTC><IceCandidates><TcpRelay>192.168.1.102:3478
in the Server.xml.
Now I'm actually seeing a connection in the logs being formed when I go to mydomain.com. I'm not actually seeing anything playing in the player, though. In the Firefox console I see WebRTC: ICE failed, add a STUN server and see about:webrtc for more details.
. When I go there it looks like it tried to connect to one of the ICE ports 10000-10005 and it failed. I'm seeing "IcePort is disconnected" in the logs.
I see when I start the server that it does resolve the public IP address from the STUN server so I'm not sure what the issue is now. I checked in Edge and Chrome and it's just a black screen as well but in those browsers it shows the red circle and "Sub-Second Latency Streaming" by the play button. When I stop streaming from OBS the log does show in the statistics that bytes were sent out. I'm just seeing a black screen, though.
Current config:
<?xml version="1.0" encoding="UTF-8"?>
<Server version="8">
<Name>OvenMediaEngine</Name>
<Type>origin</Type>
<IP>*</IP>
<PrivacyProtection>false</PrivacyProtection>
<StunServer>stun.l.google.com:19302</StunServer>
<Modules>
<HTTP2>
<Enable>true</Enable>
</HTTP2>
<LLHLS>
<Enable>false</Enable>
</LLHLS>
<P2P>
<Enable>false</Enable>
<MaxClientPeersPerHostPeer>2</MaxClientPeersPerHostPeer>
</P2P>
</Modules>
<Bind>
<Providers>
<RTMP>
<Port>1935</Port>
<WorkerCount>1</WorkerCount>
</RTMP>
<WebRTC>
<Signalling>
<Port>3333</Port>
<TLSPort>3334</TLSPort>
<WorkerCount>1</WorkerCount>
</Signalling>
<IceCandidates>
<TcpRelay>*:3478</TcpRelay>
<IceCandidate>*:10000-10005/udp</IceCandidate>
<TcpForce>false</TcpForce>
<TcpRelayWorkerCount>1</TcpRelayWorkerCount>
</IceCandidates>
</WebRTC>
</Providers>
<Publishers>
<WebRTC>
<Signalling>
<Port>3333</Port>
<TLSPort>3334</TLSPort>
<WorkerCount>1</WorkerCount>
</Signalling>
<IceCandidates>
<IceCandidate>*:10000-10005/udp</IceCandidate>
<TcpRelay>*:3478</TcpRelay>
<TcpForce>false</TcpForce>
<TcpRelayWorkerCount>1</TcpRelayWorkerCount>
</IceCandidates>
</WebRTC>
</Publishers>
</Bind>
<VirtualHosts>
<VirtualHost>
<Name>mydomain.com</Name>
<Distribution>mydomain.com</Distribution>
<Host>
<Names>
<Name>mydomain.com</Name>
<Name>www.mydomain.com</Name>
</Names>
<TLS>
<CertPath>/opt/ovenmediaengine/bin/certs/letsencrypt/live/mydomain.com/cert.pem</CertPath>
<KeyPath>/opt/ovenmediaengine/bin/certs/letsencrypt/live/mydomain.com/privkey.pem</KeyPath>
<ChainCertPath>/opt/ovenmediaengine/bin/certs/letsencrypt/live/mydomain.com/priv-fullchain-bundle.pem</ChainCertPath>
</TLS>
</Host>
<Applications>
<Application>
<Name>app</Name>
<Type>live</Type>
<OutputProfiles>
<HardwareAcceleration>false</HardwareAcceleration>
<OutputProfile>
<Name>bypass_stream</Name>
<OutputStreamName>${OriginStreamName}</OutputStreamName>
<Encodes>
<Video>
<Bypass>true</Bypass>
</Video>
<Audio>
<Bypass>true</Bypass>
</Audio>
</Encodes>
</OutputProfile>
</OutputProfiles>
<Providers>
<OVT />
<WebRTC />
<RTMP />
<SRT />
<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>
</Publishers>
</Application>
</Applications>
</VirtualHost>
</VirtualHosts>
</Server>
<Publishers><WebRTC><IceCandidates><TcpForce>
to true.
- Add -p 10000-10005:10000-10005/udp parameter when running docker, or
That did it! Finally got it working. Thanks for all your help.
Actually it worked for just a little bit and now it's back to just showing a black screen with a play button. I didn't change anything outside of your recommendation and it stopped working after a couple of viewers went to the stream. Anything that could make it suddenly just black screen like that after working properly?
Try with WebRTC/tcp as well. You can choose either 2 or 3. You should upload a log file after such a problem occurs so we can further analyze your problem. Problems like yours have never been reported other than network issues.
I attached logs from around when it happened. I just tried the tcpforce option and it didn't resolve the issue.
This is obviously the player not being able to connect to your server 108.xxx.xxx.xx2:3478 or 108.xxx.xxx.xx2:10000/udp. Check the firewall or network side. Can external players access your 108.xxx.xxx.xx2:3478?
Okay, I just messed up some settings in my firewall. Thanks for all your help! Could you possibly delete your screenshot above since it contains my domain that I had not intended on publicizing at this time? I appreciate it!
I'm trying to stream locally from OME to OvenPlayer and I can't get it to work. I'm pretty lost and am just trying different things. If I set the file to
file: 'wss://192.168.1.102:3333/app/stream'
in the config for OvenPlayer and try to play I get this error:[2023-02-02 19:12:56.699] E [SPRtcSig-T3333:10] HttpServer | http_transaction.cpp:163 | Invalid parse status: 400
. If I tryfile: 'wss://192.168.1.102:3334/app/stream'
in the player config I get[2023-02-02 19:13:21.455] E [SPRtcSig-T3334:12] OpenSSL | tls.cpp:193 | An error occurred while accept SSL connection: [OpenSSL] error:0A000412:SSL routines::sslv3 alert bad certificate (167773202)
.Server.xml: