Sometime, EOF signal send before the stream end
I notice that sometime the EOF signal is sent before the video was done make the song lost a part of it's end
I am also having this issue, I believe with all streams coming from ytdl
Also getting the same issue - trying to debug to see why it's getting EOF before it should
To anyone having these problems, make sure you don't use a for loop containing a select -> this is deprecated/is no longer the right method. Also, check for EOF manually. I'm getting little to no EOF issues anymore by doing it this way. Try:
for err := range done {
// Something horrible happened...
if err != nil && err != io.EOF {
log.Println("FATA: An error occured", err)
}
// Hit EOF, cleanup & stop
if err == io.EOF {
// Clean up incase something happened and ffmpeg is still running
encodeSession.Cleanup()
break
}
}
To anyone having these problems, make sure you don't use a for loop containing a select -> this is deprecated/is no longer the right method. Also, check for EOF manually. I'm getting little to no EOF issues anymore by doing it this way. Try:
for err := range done { // Something horrible happened... if err != nil && err != io.EOF { log.Println("FATA: An error occured", err) } // Hit EOF, cleanup & stop if err == io.EOF { // Clean up incase something happened and ffmpeg is still running encodeSession.Cleanup() break } }
deprecated - issue seems fixed with the new usage in the readme.