Open Jakisundays opened 1 year ago
@Jakisundays I faced the same issue. I think it is related to the audioStream
as Readable. I fixed it by write it to a temp file using await Bun.write("temp.mp4", data)
then pass the temp.mp4 to ffmpeg as Input
What version of Bun is running?
1.0.1+31aec4ebe325982fc0ef27498984b0ad9969162b
What platform is your computer?
Darwin 21.4.0 x86_64 i386
What steps can reproduce the bug?
The processChunk function, which takes an audio chunk in the form of a Blob and an index i. This function processes the audio chunk and is expected to save it as an MP3 file in a specified public directory.
What is the expected behavior?
When executed within the Bun runtime environment, the Ffmpeg process should effectively process the audio chunk and seamlessly save it as an MP3 file in the root directory, mirroring its functionality in a Node.js environment.
What do you see instead?
In the Bun runtime environment, the Ffmpeg process starts without errors, but it doesn't complete. It neither downloads nor saves the audio file in the root directory. The process hangs and never triggers the expected end event. This is in contrast to the Node.js environment, where the code functions correctly, processing and saving the audio file as expected.
Additional information
The code was tested with a clean installation of Ffmpeg via Brew. The "fluent-ffmpeg" package is updated to the newest version ("^2.1.2").