Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Embedding jwplayer for stream in local network without internet connection


i need to install this player to my server in local network without internet connection.

i have:
Ubuntu Server 16.04.2 LTS + mc + ngin 1.12.0 + nginx-rtmp-module 1.1.4 + some other programs + no firewalls on *nix/Windows PCs
local network 1000Mbit/s whithout internet
WindowsPC with vMix software (for streaming and videomix)

I need:
to embed jwplayer to simple web-page (index.html) and watch stream from local network over web brouser

I can watch stream with vlc-plater (Open URL -> rtmp://10.0.0.157/live )
On web page i have error: Error loading stream: Could not connect to server
All ports are open (i check it via telnet)

My configs:


# /usr/share/nginx/html/index.html

<!DOCTYPE html>
<html>
<head>
<script src="//10.0.0.157/jwplayer.js"></script>
<script>jwplayer.key="[my key]";</script>
<title>Welcome to STREAM-Server!</title>
<style>
</style>
</head>
<body>
<h1>Welcome to STREAM-Server!</h1>
<div id="myElement">Player is loading...</div>
<script type="text/javascript">
jwplayer("myElement").setup({
width: "75%",
height: "75%",
file: 'rtmp://10.0.0.157/live',
image: 'http://10.0.0.157/offline.jpg',
aspectratio: '16:9'
});
</script>

<p><em>Thank you for using our server.</em></p>
<p><em>Powered by nginx.</em></p>
</body>
</html>


# /etc/nginx/nginx.conf

user nginx;
rtmp_auto_push on;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;

#gzip on;
include /etc/nginx/conf.d/*.conf;
}
rtmp {
server {
listen 1935;
application live {
live on;
}
}
}


Where is my problem/error?

3 Community Answers

Donni

JW Player Support Agent  
0 rated :

Use the following URL scheme when playing back an RTMP stream with our player:

rtmp://example.com/vod/mp4:myFolder/myVideo.mp4

d...

User  
0 rated :

I use live stream - not VOD

I tried to change config:

<div id="myElement">Player is loading...</div>
<script type="text/javascript">
jwplayer("myElement").setup({
width: "75%",
height: "75%",
file: 'rtmp://10.0.0.157/live/flv:live.flv',
image: 'http://10.0.0.157/offline.jpg',
aspectratio: '16:9'
});
</script>

In IE/Firefox I have an error:
Error loading player: No playable sources found

Donni

JW Player Support Agent  
0 rated :

If it’s a live stream try one of the following:

rtmp://example.com/vod/flv:myFolder/myVideo.flv
rtmp://example.com/live/flv:myFolder/myLiveStream

This question has received the maximum number of answers.