mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
i give up lol
This commit is contained in:
@@ -107,10 +107,12 @@ function buildArgs(source) {
|
|||||||
PREVIEW_TRANSPORT === 'rtsp'
|
PREVIEW_TRANSPORT === 'rtsp'
|
||||||
? ['-f', 'rtsp', '-rtsp_transport', 'tcp']
|
? ['-f', 'rtsp', '-rtsp_transport', 'tcp']
|
||||||
: ['-f', 'mpegts'];
|
: ['-f', 'mpegts'];
|
||||||
return [
|
return {
|
||||||
'-hide_banner',
|
outputUrl,
|
||||||
'-loglevel',
|
args: [
|
||||||
'info',
|
'-hide_banner',
|
||||||
|
'-loglevel',
|
||||||
|
'info',
|
||||||
'-fflags',
|
'-fflags',
|
||||||
'nobuffer',
|
'nobuffer',
|
||||||
'-flags',
|
'-flags',
|
||||||
@@ -137,15 +139,23 @@ function buildArgs(source) {
|
|||||||
`${bufsize}k`,
|
`${bufsize}k`,
|
||||||
'-pix_fmt',
|
'-pix_fmt',
|
||||||
'yuv420p',
|
'yuv420p',
|
||||||
...outputArgs,
|
...outputArgs,
|
||||||
outputUrl,
|
outputUrl,
|
||||||
];
|
],
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function spawnRecorder(source) {
|
function spawnRecorder(source) {
|
||||||
const key = buildKey(source);
|
const key = buildKey(source);
|
||||||
if (recorders.has(key)) return;
|
if (recorders.has(key)) return;
|
||||||
const args = buildArgs(source);
|
const { args, outputUrl } = buildArgs(source);
|
||||||
|
logger.info('Preview transcoder starting', {
|
||||||
|
key,
|
||||||
|
transport: PREVIEW_TRANSPORT,
|
||||||
|
codec: PREVIEW_CODEC,
|
||||||
|
inputUrl: source.inputUrl,
|
||||||
|
outputUrl,
|
||||||
|
});
|
||||||
const proc = spawn(FFMPEG_BIN, args, { stdio: ['ignore', 'ignore', 'pipe'] });
|
const proc = spawn(FFMPEG_BIN, args, { stdio: ['ignore', 'ignore', 'pipe'] });
|
||||||
const stderrChunks = [];
|
const stderrChunks = [];
|
||||||
let stderrSize = 0;
|
let stderrSize = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user