puppeteer-stream icon indicating copy to clipboard operation
puppeteer-stream copied to clipboard

ffmpeg - no output file

Open akhfaern opened this issue 4 years ago • 7 comments

I've tried to run ffmpeg example but getting this error.

node:events:368 throw er; // Unhandled 'error' event ^

Error: write EOF at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:98:16) Emitted 'error' event on Socket instance at: at Socket.onerror (node:internal/streams/readable:773:14) at Socket.emit (node:events:390:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -4095, code: 'EOF', syscall: 'write' }

akhfaern avatar Jan 26 '22 12:01 akhfaern

Do you have ffmpeg installed globally?

samuelscheit avatar Jan 26 '22 23:01 samuelscheit

yeah it was but i think t got messed up after uninstall and reinstall it just worked but although it didnt give an error, it didnt create an output file either. am i missing something?

akhfaern avatar Jan 27 '22 07:01 akhfaern

Are you sure it didn't create one? from what directory are you executing the program?

samuelscheit avatar Jan 27 '22 09:01 samuelscheit

here is the console output D:\nodejs\puppeteer-stream-test>node ffmpeg.js recording

[main 2022-01-27T18:59:18.760Z] update#setState idle [main 2022-01-27T18:59:18.979Z] ExtensionHostStarterWorker created [main 2022-01-27T18:59:20.322Z] Starting extension host with pid 2680 (fork() took 40 ms). finished [main 2022-01-27T18:59:48.776Z] update#setState checking for updates [main 2022-01-27T18:59:48.841Z] update#setState idle

D:\nodejs\puppeteer-stream-test>node --version v16.13.2

akhfaern avatar Jan 27 '22 19:01 akhfaern

I'm seeing the same issue

Jackgreiner91 avatar Mar 02 '22 18:03 Jackgreiner91

Use this to end the stream instaead of stream.destroy

await stream.unpipe(ffmpeg);
ffmpeg.kill();

I also removed

ffmpeg.stderr.on("data", (chunk) => {
		console.log(chunk.toString());
	});

codeAshu avatar Mar 12 '22 03:03 codeAshu

@codeAshu great, I'll update the example script 👍

samuelscheit avatar Mar 12 '22 12:03 samuelscheit