From 3da606c8ddf9aa8ba2f243d576d1052c42d3b43a Mon Sep 17 00:00:00 2001 From: Jan Stabenow Date: Wed, 22 Feb 2023 12:08:27 +0100 Subject: [PATCH] Add avoid_negative_ts and http_proxy input options,updates npm dependencies --- CHANGELOG.md | 5 +++- Dockerfile | 4 +-- package.json | 50 +++++++++++++++---------------- src/views/Edit/Sources/Network.js | 36 ++++++++++++++++++++++ 4 files changed, 67 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47f9516..9b0f5b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,15 @@ ## v1.6.0 > x.x.x -- Add copyts, start_at_zero and use_wallclock_as_timestamps option +- Add avoid_negative_ts input option +- Add http_proxy input option ([#513](https://github.com/datarhei/restreamer/issues/513)) +- Add copyts, start_at_zero and use_wallclock_as_timestamps input options - Add heuristic to find core address if UI is proxied - Add Turkish translation (thanks to Ramazan Sancar) ([#22](https://github.com/datarhei/restreamer-ui/issues/22)) - Add Danish translation (Thanks to Filip Stadler and Info) - Add Slovenian translation (thanks to Grega) - Add Greek translation +- Mod updates npm dependencies - Fix positioning of the deinterlacing filter ([#465](https://github.com/datarhei/restreamer/issues/465)) ## v1.5.1 > v1.6.0 diff --git a/Dockerfile b/Dockerfile index 70f9264..5ffad00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -ARG NODE_IMAGE=node:19.0-alpine3.16 -ARG CADDY_IMAGE=caddy:2.6.2-alpine +ARG NODE_IMAGE=node:19.6-alpine3.16 +ARG CADDY_IMAGE=caddy:2.6.3-alpine FROM $NODE_IMAGE as builder diff --git a/package.json b/package.json index ef4f191..baec219 100644 --- a/package.json +++ b/package.json @@ -5,47 +5,47 @@ "private": false, "license": "Apache-2.0", "dependencies": { - "@auth0/auth0-spa-js": "^2.0.0", + "@auth0/auth0-spa-js": "^2.0.3", "@babel/plugin-syntax-flow": "^7.18.6", - "@babel/plugin-transform-react-jsx": "^7.19.0", + "@babel/plugin-transform-react-jsx": "^7.20.13", "@emotion/react": "^11.10.5", "@emotion/styled": "^11.10.5", - "@fontsource/dosis": "^4.5.10", + "@fontsource/dosis": "^4.5.11", "@fontsource/roboto": "^4.5.8", - "@fortawesome/fontawesome-svg-core": "^6.2.1", - "@fortawesome/free-brands-svg-icons": "^6.2.1", - "@fortawesome/free-solid-svg-icons": "^6.2.1", + "@fortawesome/fontawesome-svg-core": "^6.3.0", + "@fortawesome/free-brands-svg-icons": "^6.3.0", + "@fortawesome/free-solid-svg-icons": "^6.3.0", "@fortawesome/react-fontawesome": "^0.2.0", - "@lingui/core": "^3.15.0", - "@lingui/macro": "^3.15.0", - "@lingui/react": "^3.15.0", - "@mui/icons-material": "^5.10.15", - "@mui/lab": "^5.0.0-alpha.109", - "@mui/material": "^5.10.15", - "@mui/styles": "^5.10.15", - "@testing-library/dom": "^8.19.0", + "@lingui/core": "^3.17.1", + "@lingui/macro": "^3.17.1", + "@lingui/react": "^3.17.1", + "@mui/icons-material": "^5.11.9", + "@mui/lab": "^5.0.0-alpha.120", + "@mui/material": "^5.11.9", + "@mui/styles": "^5.11.9", + "@testing-library/dom": "^8.20.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^14.4.3", - "@types/react": "^18.0.25", + "@types/react": "^18.0.28", "babel-plugin-macros": "^3.1.0", - "eslint": "^8.28.0", + "eslint": "^8.34.0", "handlebars": "^4.7.7", "jwt-decode": "^3.1.2", "make-plural": "^7.2.0", "react": "^18.2.0", "react-colorful": "^5.6.1", - "react-device-detect": "^2.2.2", + "react-device-detect": "^2.2.3", "react-dom": "^18.2.0", - "react-markdown": "^8.0.3", - "react-router-dom": "^6.4.3", + "react-markdown": "^8.0.5", + "react-router-dom": "^6.8.1", "react-scripts": "5.0.1", "semver": "^7.3.8", - "typescript": "^4.9.3", + "typescript": "^4.9.5", "url-parse": "^1.5.10", "uuid": "^9.0.0", - "video.js": "^7.20.3", - "videojs-overlay": "^2.1.5" + "video.js": "^8.0.4", + "videojs-overlay": "^3.0.0" }, "scripts": { "start": "react-scripts start", @@ -83,11 +83,11 @@ ] }, "devDependencies": { - "@babel/core": "^7.20.2", - "@lingui/cli": "^3.15.0", + "@babel/core": "^7.20.12", + "@lingui/cli": "^3.17.1", "babel-core": "^7.0.0-bridge.0", "eslint-config-react-app": "^7.0.1", - "prettier": "^2.8.0", + "prettier": "^2.8.4", "react-error-overlay": "^6.0.11" }, "resolutions": {} diff --git a/src/views/Edit/Sources/Network.js b/src/views/Edit/Sources/Network.js index 8aed912..f224091 100644 --- a/src/views/Edit/Sources/Network.js +++ b/src/views/Edit/Sources/Network.js @@ -67,6 +67,7 @@ const initSettings = (initialSettings) => { forceFramerate: false, framerate: 25, userAgent: '', + http_proxy: '', ...settings.http, }; @@ -76,6 +77,7 @@ const initSettings = (initialSettings) => { copyts: false, start_at_zero: false, use_wallclock_as_timestamps: false, + avoid_negative_ts: 'auto', ...settings.general, }; @@ -195,6 +197,10 @@ const createInputs = (settings, config, skills) => { input.options.push('-use_wallclock_as_timestamps', '1'); } + if (ffmpeg_version === 5) { + input.options.push('-avoid_negative_ts', settings.general.avoid_negative_ts); + } + if (settings.mode === 'push') { if (settings.push.type === 'hls') { input.address = getLocalHLS(config); @@ -244,6 +250,10 @@ const createInputs = (settings, config, skills) => { if (settings.http.userAgent.length !== 0) { input.options.push('-user_agent', settings.http.userAgent); } + + if (settings.http.http_proxy.length !== 0) { + input.options.push('-http_proxy', settings.http.http_proxy); + } } } /* @@ -568,6 +578,16 @@ function Pull(props) { onChange={props.onChange('http', 'userAgent')} /> + + + )} @@ -622,6 +642,22 @@ function Pull(props) { onChange={props.onChange('general', 'use_wallclock_as_timestamps')} /> + + +