Former-commit-id: d4eb47d9cc48908519511451bdc997a100c0a897 Former-commit-id: 00db9511a4bc15d026689464dbe87493a0dcc36cTSXN
parent
4363f65772
commit
467da466bc
@ -0,0 +1,6 @@
|
|||||||
|
[program:frp]
|
||||||
|
directory=/root/publish/apps/frp/
|
||||||
|
command=/root/publish/apps/frp/frps -c /root/publish/apps/frp/frps.ini
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
user=root
|
@ -1,36 +1,65 @@
|
|||||||
# main config for srs.
|
listen 1935;
|
||||||
# @see full.conf for detail config.
|
max_connections 1000;
|
||||||
|
srs_log_tank file;
|
||||||
listen 1935;
|
srs_log_file ./objs/log/srs.log;
|
||||||
daemon off;
|
daemon off;
|
||||||
max_connections 1000;
|
|
||||||
srs_log_tank file;
|
|
||||||
srs_log_file ./objs/srs.log;
|
|
||||||
http_api {
|
http_api {
|
||||||
enabled on;
|
enabled on;
|
||||||
listen 1985;
|
listen 1985;
|
||||||
|
raw_api {
|
||||||
|
enabled on;
|
||||||
|
allow_reload on;
|
||||||
|
allow_query on;
|
||||||
|
allow_update on;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
http_server {
|
http_server {
|
||||||
enabled on;
|
enabled on;
|
||||||
listen 8080;
|
listen 8080;
|
||||||
dir ./objs/nginx/html;
|
dir ./objs/nginx/html;
|
||||||
}
|
}
|
||||||
stats {
|
stats {
|
||||||
network 0;
|
network 0;
|
||||||
disk sda sdb xvda xvdb;
|
disk sda sdb xvda xvdb;
|
||||||
}
|
}
|
||||||
vhost __defaultVhost__ {
|
vhost __defaultVhost__ {
|
||||||
|
transcode live {
|
||||||
|
enabled off;
|
||||||
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||||
|
engine snapshot {
|
||||||
|
enabled on;
|
||||||
|
iformat flv;
|
||||||
|
vfilter {
|
||||||
|
vf fps=1;
|
||||||
|
}
|
||||||
|
vcodec png;
|
||||||
|
vparams {
|
||||||
|
vframes 1;
|
||||||
|
}
|
||||||
|
acodec an;
|
||||||
|
oformat image2;
|
||||||
|
output ./objs/nginx/html/[app]/[stream].png;
|
||||||
|
}
|
||||||
|
}
|
||||||
http_remux {
|
http_remux {
|
||||||
enabled on;
|
enabled on;
|
||||||
mount [vhost]/[app]/[stream].flv;
|
mount [vhost]/[app]/[stream].flv;
|
||||||
hstrs on;
|
|
||||||
}
|
}
|
||||||
hls {
|
hls {
|
||||||
enabled on;
|
enabled on;
|
||||||
hls_fragment 3;
|
hls_fragment 3;
|
||||||
hls_window 10;
|
hls_window 10;
|
||||||
hls_path ./objs/nginx/html;
|
hls_path ./objs/nginx/html;
|
||||||
hls_m3u8_file [app]/[stream].m3u8;
|
hls_m3u8_file [app]/[stream].m3u8;
|
||||||
hls_ts_file [app]/[stream]-[seq].ts;
|
hls_ts_file [app]/[stream]-[seq].ts;
|
||||||
|
}
|
||||||
|
dvr {
|
||||||
|
enabled on;
|
||||||
|
dvr_apply none;
|
||||||
|
dvr_path ./objs/nginx/html/video/[app].[stream].[timestamp].mp4;
|
||||||
|
}
|
||||||
|
http_hooks {
|
||||||
|
enabled on;
|
||||||
|
on_dvr http://localhost:8002/api/v1/Srs/OnDvr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -0,0 +1,48 @@
|
|||||||
|
<html>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div style="margin: 0 auto;width: 1000px;text-align:center;">
|
||||||
|
<input type="text" id="url" value="http://192.168.1.3:8080/live/test.flv"
|
||||||
|
style="box-sizing: border-box;width: 600px;margin: 0;">
|
||||||
|
<button id="btn" style="box-sizing: border-box;width: 40px;margin: 0;">load</button>
|
||||||
|
<br>
|
||||||
|
<video id="videoElement" controls muted autoplay style="width: 640px;height: 480px;"></video>
|
||||||
|
</div>
|
||||||
|
<script src="flv.min.js"></script>
|
||||||
|
<script>
|
||||||
|
var flvPlayer;
|
||||||
|
document.getElementById("btn").addEventListener('click', function () {
|
||||||
|
if (flvPlayer) {
|
||||||
|
try {
|
||||||
|
flvPlayer.pause();
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
flvPlayer.unload();
|
||||||
|
flvPlayer.detachMediaElement();
|
||||||
|
try {
|
||||||
|
flvPlayer.destroy();
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
flvPlayer = null;
|
||||||
|
}
|
||||||
|
flvPlayer = flvjs.createPlayer({
|
||||||
|
type: 'flv',
|
||||||
|
url: document.getElementById("url").value,
|
||||||
|
isLive: true,
|
||||||
|
cors: true
|
||||||
|
}, {
|
||||||
|
enableWorker: true,
|
||||||
|
enableStashBuffer: false,
|
||||||
|
stashInitialSize: 1,
|
||||||
|
fixAudioTimestampGap: false
|
||||||
|
});
|
||||||
|
flvPlayer.attachMediaElement(document.getElementById("videoElement"));
|
||||||
|
flvPlayer.load();
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
Binary file not shown.
@ -0,0 +1,6 @@
|
|||||||
|
[program:srs]
|
||||||
|
directory=/root/publish/apps/srs
|
||||||
|
command=/root/publish/apps/srs/objs/srs -c /root/publish/apps/srs/conf/srs.conf
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
user=root
|
@ -0,0 +1,22 @@
|
|||||||
|
version: "3.8"
|
||||||
|
services:
|
||||||
|
ubuntu:
|
||||||
|
image: ubuntu:16.04
|
||||||
|
working_dir: /root
|
||||||
|
command: bash -c "
|
||||||
|
apt-get update
|
||||||
|
&&apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
|
||||||
|
&&apt-get install -y sudo
|
||||||
|
&&apt-get install -y python
|
||||||
|
&&apt-get upgrade -y
|
||||||
|
&&apt-get install -y git
|
||||||
|
&&rm -rf /root/srs/
|
||||||
|
&&git clone https://gitee.com/winlinvip/srs.oschina.git srs
|
||||||
|
&&cd srs/trunk
|
||||||
|
&& git remote set-url origin https://github.com/ossrs/srs.git
|
||||||
|
&& git pull
|
||||||
|
&&./configure --arm --cc=arm-linux-gnueabihf-gcc --cxx=arm-linux-gnueabihf-g++ --ar=arm-linux-gnueabihf-ar --ld=arm-linux-gnueabihf-ld --randlib=arm-linux-gnueabihf-randlib
|
||||||
|
&& make"
|
||||||
|
volumes:
|
||||||
|
- ./sources.list:/etc/apt/sources.list
|
||||||
|
- ./srs:/root
|
Loading…
Reference in new issue