Open UltronOne opened 3 months ago
It seems you piped the ytdl stream to a fs stream, so it is the fs stream that doesn't emit either 'finish' or 'end' event. If you'd like to attach an event handler to the fs stream, which is called when finishing the stream, you can listen 'close' event, rathar than 'finish' or 'end' iirc.
Description
I am experiencing an issue with the
ytdl-core
package where the readable stream does not emit the 'finish' or 'end' event, causing the code execution to hang and not terminate as expected.Details
I have used the
ytdl-core
for downloading the audio stream from a YouTube video and piping it to a writable stream to save as an MP3 file. However, it seems that the events ('finish' and 'end') that signify the completion of the streaming are not being emitted, leading to an indefinite wait state.Here's a minimal reproducible example:
Expected Behavior
Actual Behavior
Additional Information
I appreciate your help in resolving this issue.
Thank you!