N
N
nezzard2018-02-10 17:34:08
fmpeg
nezzard, 2018-02-10 17:34:08

How to prevent stream recording break with ffmpeg?

Good afternoon, please tell me how to prevent the stream recording from being interrupted when there is buffering or second lags on the stream?
Recording with

var captureProcess = childProcess.spawn('ffmpeg', [
    '-hide_banner',
    '-v',
    'fatal',
    '-i',
    url,
    '-c',
    'copy',
    '-vsync',
    '2',
    '-r',
    '60',
    '-b:v',
    '500k',
    'processing/' + filename + '.ts'
  ]);

And I monitor using captureProcess.on('close', () => { do something })
Sometimes it happens that there is a delay of a couple of seconds on the stream, and the process stops.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question