mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
removing old node relay
This commit is contained in:
parent
4596ada801
commit
700f25abc3
11
Makefile
11
Makefile
@ -8,9 +8,6 @@ version:
|
||||
web:
|
||||
docker build --tag frigate-web --file docker/Dockerfile.web web/
|
||||
|
||||
jsmpeg:
|
||||
docker build --tag frigate-jsmpeg --file docker/Dockerfile.jsmpeg jsmpeg/
|
||||
|
||||
amd64_wheels:
|
||||
docker build --tag blakeblackshear/frigate-wheels:1.0.3-amd64 --file docker/Dockerfile.wheels .
|
||||
|
||||
@ -20,7 +17,7 @@ amd64_ffmpeg:
|
||||
nginx_frigate:
|
||||
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag blakeblackshear/frigate-nginx:1.0.0 --file docker/Dockerfile.nginx .
|
||||
|
||||
amd64_frigate: version web jsmpeg
|
||||
amd64_frigate: version web
|
||||
docker build --tag frigate-base --build-arg ARCH=amd64 --build-arg FFMPEG_VERSION=1.1.0 --build-arg WHEELS_VERSION=1.0.3 --build-arg NGINX_VERSION=1.0.0 --file docker/Dockerfile.base .
|
||||
docker build --tag frigate --file docker/Dockerfile.amd64 .
|
||||
|
||||
@ -32,7 +29,7 @@ amd64nvidia_wheels:
|
||||
amd64nvidia_ffmpeg:
|
||||
docker build --tag blakeblackshear/frigate-ffmpeg:1.0.0-amd64nvidia --file docker/Dockerfile.ffmpeg.amd64nvidia .
|
||||
|
||||
amd64nvidia_frigate: version web jsmpeg
|
||||
amd64nvidia_frigate: version web
|
||||
docker build --tag frigate-base --build-arg ARCH=amd64nvidia --build-arg FFMPEG_VERSION=1.0.0 --build-arg WHEELS_VERSION=1.0.3 --build-arg NGINX_VERSION=1.0.0 --file docker/Dockerfile.base .
|
||||
docker build --tag frigate --file docker/Dockerfile.amd64nvidia .
|
||||
|
||||
@ -44,7 +41,7 @@ aarch64_wheels:
|
||||
aarch64_ffmpeg:
|
||||
docker build --tag blakeblackshear/frigate-ffmpeg:1.0.0-aarch64 --file docker/Dockerfile.ffmpeg.aarch64 .
|
||||
|
||||
aarch64_frigate: version web jsmpeg
|
||||
aarch64_frigate: version web
|
||||
docker build --tag frigate-base --build-arg ARCH=aarch64 --build-arg FFMPEG_VERSION=1.0.0 --build-arg WHEELS_VERSION=1.0.3 --build-arg NGINX_VERSION=1.0.0 --file docker/Dockerfile.base .
|
||||
docker build --tag frigate --file docker/Dockerfile.aarch64 .
|
||||
|
||||
@ -56,7 +53,7 @@ armv7_wheels:
|
||||
armv7_ffmpeg:
|
||||
docker build --tag blakeblackshear/frigate-ffmpeg:1.0.0-armv7 --file docker/Dockerfile.ffmpeg.armv7 .
|
||||
|
||||
armv7_frigate: version web jsmpeg
|
||||
armv7_frigate: version web
|
||||
docker build --tag frigate-base --build-arg ARCH=armv7 --build-arg FFMPEG_VERSION=1.0.0 --build-arg WHEELS_VERSION=1.0.3 --build-arg NGINX_VERSION=1.0.0 --file docker/Dockerfile.base .
|
||||
docker build --tag frigate --file docker/Dockerfile.armv7 .
|
||||
|
||||
|
@ -6,7 +6,6 @@ FROM blakeblackshear/frigate-wheels:${WHEELS_VERSION}-${ARCH} as wheels
|
||||
FROM blakeblackshear/frigate-ffmpeg:${FFMPEG_VERSION}-${ARCH} as ffmpeg
|
||||
FROM blakeblackshear/frigate-nginx:${NGINX_VERSION} as nginx
|
||||
FROM frigate-web as web
|
||||
FROM frigate-jsmpeg as jsmpeg
|
||||
|
||||
FROM ubuntu:20.04
|
||||
LABEL maintainer "blakeb@blakeshome.com"
|
||||
@ -41,7 +40,8 @@ RUN pip3 install \
|
||||
voluptuous\
|
||||
Flask-Sockets \
|
||||
gevent \
|
||||
gevent-websocket
|
||||
gevent-websocket \
|
||||
ws4py
|
||||
|
||||
COPY --from=nginx /usr/local/nginx/ /usr/local/nginx/
|
||||
|
||||
@ -56,9 +56,6 @@ ADD migrations migrations/
|
||||
|
||||
COPY --from=web /opt/frigate/build web/
|
||||
|
||||
COPY --from=jsmpeg /opt/build jsmpeg/
|
||||
COPY --from=jsmpeg /usr/local/bin/node /usr/local/bin/node
|
||||
|
||||
COPY docker/rootfs/ /
|
||||
|
||||
EXPOSE 5000
|
||||
|
@ -1,10 +0,0 @@
|
||||
ARG NODE_VERSION=14.16
|
||||
|
||||
FROM node:${NODE_VERSION}
|
||||
|
||||
WORKDIR /opt/build
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm install --no-progress && \
|
||||
npm prune --production --ignore-scripts --prefer-offline
|
1
jsmpeg/.gitignore
vendored
1
jsmpeg/.gitignore
vendored
@ -1 +0,0 @@
|
||||
node_modules
|
13
jsmpeg/package-lock.json
generated
13
jsmpeg/package-lock.json
generated
@ -1,13 +0,0 @@
|
||||
{
|
||||
"name": "jsmpeg",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"ws": {
|
||||
"version": "7.4.3",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.3.tgz",
|
||||
"integrity": "sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA=="
|
||||
}
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "jsmpeg",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "relay.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ws": "^7.4.3"
|
||||
}
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
// Use the websocket-relay to serve a raw MPEG-TS over WebSockets. You can use
|
||||
// ffmpeg to feed the relay. ffmpeg -> websocket-relay -> browser
|
||||
// Example:
|
||||
// node relay 8081 8082
|
||||
// ffmpeg -i <some input> -f mpegts http://localhost:8081/streamName
|
||||
|
||||
var http = require('http'),
|
||||
WebSocket = require('ws');
|
||||
|
||||
var STREAM_PORT = process.argv[2] || 8081,
|
||||
WEBSOCKET_PORT = process.argv[3] || 8082;
|
||||
|
||||
// Websocket Server
|
||||
var socketServer = new WebSocket.Server({ port: WEBSOCKET_PORT, perMessageDeflate: false });
|
||||
|
||||
socketServer.on('connection', function (socket, request) {
|
||||
var streamName = request.url.substr(1).split('/')[0];
|
||||
|
||||
socket.stream = streamName;
|
||||
|
||||
console.log(
|
||||
'New WebSocket connection for: ',
|
||||
streamName
|
||||
);
|
||||
});
|
||||
|
||||
socketServer.broadcast = function(data, streamName) {
|
||||
socketServer.clients.forEach(function each(client) {
|
||||
if (client.readyState === WebSocket.OPEN && client.stream === streamName) {
|
||||
client.send(data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// HTTP Server to accept incoming MPEG-TS Stream from ffmpeg
|
||||
var streamServer = http.createServer( function(request, response) {
|
||||
var streamName = request.url.substr(1).split('/')[0];
|
||||
|
||||
response.connection.setTimeout(0);
|
||||
console.log(
|
||||
'Stream Connected: ',
|
||||
streamName
|
||||
);
|
||||
request.on('data', function(data){
|
||||
socketServer.broadcast(data, streamName);
|
||||
});
|
||||
})
|
||||
|
||||
// Keep the socket open for streaming
|
||||
streamServer.headersTimeout = 0;
|
||||
streamServer.listen(STREAM_PORT);
|
||||
|
||||
console.log('Listening for incoming MPEG-TS Stream on http://127.0.0.1:'+STREAM_PORT+'/<streamName>');
|
||||
console.log('Awaiting WebSocket connections on ws://127.0.0.1:'+WEBSOCKET_PORT+'/');
|
Loading…
Reference in New Issue
Block a user