Manevolent / ts3j

An open-source Java Teamspeak 3 client library using the TS3 full client protocol
Apache License 2.0
107 stars 15 forks source link

Youtube music playing is crashing after time. #11

Closed Pieprzyk closed 4 years ago

Pieprzyk commented 4 years ago

While player is running by getting music from youtube it reset connection after about 2 minuts of playing any of music from youtube.

Used clear gihub code runne by command: !v https://www.youtube.com/watch?v=Z55vLecXdCs

dec 03, 2019 10:09:38 PM com.github.manevolent.ffmpeg4j.FFmpegIO$1 call WARNING: Problem in FFmpeg IO read id=0 javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection reset at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1541) at sun.security.ssl.AppInputStream.read(AppInputStream.java:95) at java.io.BufferedInputStream.read1(BufferedInputStream.java:284) at java.io.BufferedInputStream.read(BufferedInputStream.java:345) at sun.net.www.MeteredStream.read(MeteredStream.java:134) at java.io.FilterInputStream.read(FilterInputStream.java:133) at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3336) at com.github.manevolent.ffmpeg4j.FFmpegIO$1.call(FFmpegIO.java:139) at org.bytedeco.javacpp.avformat.av_read_frame(Native Method) at com.github.manevolent.ffmpeg4j.stream.source.FFmpegSourceStream.readPacket(FFmpegSourceStream.java:131) at com.github.manevolent.ffmpeg4j.source.FFmpegAudioSourceSubstream.read(FFmpegAudioSourceSubstream.java:105) at com.github.manevolent.ffmpeg4j.source.MediaSourceSubstream.next(MediaSourceSubstream.java:63) at com.github.manevolent.ts3j.musicbot.audio.player.FFmpegAudioPlayer.processBuffer(FFmpegAudioPlayer.java:70) at com.github.manevolent.ts3j.musicbot.audio.player.FFmpegAudioPlayer.read(FFmpegAudioPlayer.java:44) at com.github.manevolent.ts3j.musicbot.audio.AudioBuffer.write(AudioBuffer.java:37) at com.github.manevolent.ts3j.musicbot.audio.player.ResampledAudioPlayer.processBuffer(ResampledAudioPlayer.java:49) at com.github.manevolent.ts3j.musicbot.audio.player.BufferedAudioPlayer.read(BufferedAudioPlayer.java:41) at com.github.manevolent.ts3j.musicbot.audio.mixer.BufferedMixer.processBuffer(BufferedMixer.java:58) at com.github.manevolent.ts3j.musicbot.audio.mixer.MixerProcessTask.run(MixerProcessTask.java:29) at java.lang.Thread.run(Thread.java:745) Caused by: javax.net.ssl.SSLException: java.net.SocketException: Connection reset at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1906) at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1870) at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1815) at sun.security.ssl.AppInputStream.read(AppInputStream.java:116) ... 18 more Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:209) at java.net.SocketInputStream.read(SocketInputStream.java:141) at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) at sun.security.ssl.InputRecord.read(InputRecord.java:503) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973) at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930) at sun.security.ssl.AppInputStream.read(AppInputStream.java:105) ... 18 more

dec 03, 2019 10:09:38 PM com.github.manevolent.ts3j.musicbot.audio.mixer.AbstractMixer setRunning INFO: Stopping mixer...

Manevolent commented 4 years ago
  1. I think you meant to put this issue on the project: https://github.com/manevolent/ts3j-musicbot. TS3j itself does not expose/utilize ffmpeg4j, but both my projects manebot-ts3 and ts3j-musicbot do.
  2. This is something I am aware of and am also experiencing, but I would appreciate if you made this ticket on the project where you are experiencing the problem. It it quite possibly due to YouTube's CDN, actually.