cli: add ffplay filter args

This commit is contained in:
Koushik Dutta
2023-08-26 21:31:31 -07:00
parent 8f6bedd9d8
commit 3a62d9cd31
4 changed files with 12 additions and 9 deletions

View File

@@ -19,11 +19,11 @@
"-r",
"ts-node/register"
],
"preLaunchTask": "npm: build",
"args": [
"ffplay",
"Kitchen",
"getRecordingStream",
"{\"startTime\":1677699495709}"
"Baby Camera@192.168.2.109",
"getVideoStream",
],
"sourceMaps": true,
"resolveSourceMapLocations": [
@@ -35,4 +35,4 @@
],
},
]
}
}

View File

@@ -1,12 +1,12 @@
{
"name": "scrypted",
"version": "1.0.67",
"version": "1.0.69",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "scrypted",
"version": "1.0.67",
"version": "1.0.69",
"license": "ISC",
"dependencies": {
"@scrypted/client": "^1.1.43",

View File

@@ -1,6 +1,6 @@
{
"name": "scrypted",
"version": "1.0.67",
"version": "1.0.69",
"description": "",
"main": "./dist/main.js",
"bin": {

View File

@@ -172,8 +172,11 @@ async function main() {
ffmpegInput.inputArguments = ffmpegInput.inputArguments.map(i => i === ffmpegInput.url ? ffmpegInput.urls?.[0] : i);
}
}
console.log('ffplay', ...ffmpegInput.inputArguments);
child_process.spawn('ffplay', ffmpegInput.inputArguments, {
const args = [...ffmpegInput.inputArguments];
if (ffmpegInput.h264FilterArguments)
args.push(...ffmpegInput.h264FilterArguments);
console.log('ffplay', ...args);
child_process.spawn('ffplay', args, {
stdio: 'inherit',
});
sdk.disconnect();