JamesKyburz/youtube-audio-stream

FFMPEG timeout

Closed this issue · 2 comments

fluent-ffmpeg has a default timeout of 30 seconds. I had some downloads that went really slow and exceeded 30 seconds, and there was no way to tell when the timeout occurred.

fluent-ffmpeg's writeToStream() takes a function as second argument, which is called on complete, and can be used to determine if a timeout occurred, however, I don't really see why you would want to have a timeout at all.

https://github.com/schaermu/node-fluent-ffmpeg/blob/master/README.md#setting-an-optional-processing-timeout (this seems a little off, though; retcode is not defined)

Sorry for the delay. I agree the timeout doesn't make sense when all I want to do is to stream...

When I tested fluent-ffmpeg with a timeout of Infinity or Number.MAX_VALUE it didn't pipe any data.

To be continued.....

I doubt the timeout is fluent-ffmpeg related, have no proof though.

Without changing anything I did some tests with curl through a proxy.

The throttle speed was in the 1980's ;)

curl --proxy http://127.0.0.1:8888 http://localhost:3000/youtube.com/watch\?v\=s-mOy8VUEBk -o test.mp3

I took minutes but still worked.

What were you piping the stream to?