Piping streams through a shell program (ffmpeg) and writing the output to a file
I've been trying to use
The examples on the website don't quite capture my use case (the example shows piping output, but I can't get the magic combination to pipe in input that doesn't make it choke.
I've got it working fine if I save the uploaded file to filesystem first and then pass its path to ffmpeg, but that's a hack, surely I can do this with just the streams?
Part of this is just me trying to understand the difference between
Literally following the example from the web eg:
This results in
and creates an empty output file.
However this file gets processed fine if passed as a file path...
What am I missing/misunderstanding?
ffmpeg on the backend of my super simple audio-uploading app. I can save the files as-uploaded, but after getting a Reader for the uploaded file I can't figure out how to pipe it into Deno.Command. The examples on the website don't quite capture my use case (the example shows piping output, but I can't get the magic combination to pipe in input that doesn't make it choke.
I've got it working fine if I save the uploaded file to filesystem first and then pass its path to ffmpeg, but that's a hack, surely I can do this with just the streams?
Part of this is just me trying to understand the difference between
command.output() and command.spawn() and then accessing the stdi/o streams.Literally following the example from the web eg:
This results in
pipe:: Invalid data found when processing inputand creates an empty output file.
However this file gets processed fine if passed as a file path...
What am I missing/misunderstanding?