Open asaphaaning opened 3 years ago
This does NOT work
async function* test(stream) { for await (const chunk of stream) { console.log(chunk) yield chunk } } const pt = new PassThrough() ffmpeg(SOURCE) .outputFPS(FPS) .size(`${WIDTH}x${HEIGHT}`) .videoCodec('ppm') .withNoAudio() .outputFormat('image2pipe') .stream(pt, { end: true }) pipeline( pt, test, err => console.log(err) )
This DOES work
const pt = new PassThrough() ffmpeg(SOURCE) .outputFPS(FPS) .size(`${WIDTH}x${HEIGHT}`) .videoCodec('ppm') .withNoAudio() .outputFormat('image2pipe') .stream(pt, { end: true }) pt.pipe(new Transform({transform(chunk, encoding, callback) { console.log(chunk); callback(); }}))
Should remain piped to child process. Even with backpressure applied. Instead, the stream ends abruptly after a second or two.
Does not unless the chain is constructed using pipe
pipe
pipeline does seem to work fine with PCM transcoding so I'm not sure what the problem is exactly.
pipeline
Version information
Code to reproduce
This does NOT work
This DOES work
Expected results
Should remain piped to child process. Even with backpressure applied. Instead, the stream ends abruptly after a second or two.
Observed results
Does not unless the chain is constructed using
pipe
pipeline
does seem to work fine with PCM transcoding so I'm not sure what the problem is exactly.Checklist