DV8FromTheWorld / JDA-Player

Extension library for JDA (or D4J) that provides an Java wrapping of Youtube-dl, FFmpeg and FFprobe for use as an AudioProvider.
Apache License 2.0
14 stars 5 forks source link

Console Warnings when playing Videos #20

Open robot-rover opened 7 years ago

robot-rover commented 7 years ago

It seems random but around 50% of the time when I play a video JDA-Player throws a Warning into the console: [15:35:05] [Warning] [JDAPlayer]: ERR YTDL: ERROR: unable to download video data: [WinError 2] The system cannot find the file specified: '-' Then it plays the previous video instead of playing the one I queued. Here is my code:

try {
            LOG.info(link[2]);
            Playlist playlist = Playlist.getPlaylist(link[2]);
            List<AudioSource> sources = new LinkedList<>(playlist.getSources());
            final MusicPlayer fPlayer = player;
            if (sources.size()==1) {
                AudioSource source = sources.get(0);
                AudioInfo info = source.getInfo();
                List<AudioSource> queue = fPlayer.getAudioQueue();
                if (info.getError() == null) {
                    queue.add(source);
                    if (fPlayer.isStopped())
                        fPlayer.play();
                } else {
                    LOG.info(info.getError());
                }
            }
        } catch (NullPointerException ex) {
            throw new InternalError("Error finding Rekt Video", ex);
        }

and here are the logs:

15:31:25.892 [WebSocketClient@1442396881-54] INFO  s.b.d.Discord4J - Connected to the Discord Voice websocket.
[15:31:53] [Warning] [JDAPlayer]: ERR YTDL: ERROR: unable to download video data: [WinError 2] The system cannot find the file specified: '-'

15:34:41.286 [Event Dispatch Thread] INFO  r.i.c.Command - Chosen never "get **REEEEKT**" https://youtu.be/YxCiFXXVqSw
15:34:41.287 [Event Dispatch Thread] INFO  r.i.c.Command - https://youtu.be/YxCiFXXVqSw
[15:35:05] [Warning] [JDAPlayer]: ERR YTDL: ERROR: unable to download video data: [WinError 2] The system cannot find the file specified: '-'

15:38:23.005 [Event Dispatch Thread] INFO  r.i.c.Command - Chosen scope "**NOSCOOOOOOPED!!!**" https://youtu.be/RP5P7zuKkpM
15:38:29.140 [Event Dispatch Thread] INFO  r.i.c.Command - https://youtu.be/RP5P7zuKkpM
15:39:07.503 [Event Dispatch Thread] INFO  r.i.c.Command - Chosen wrong "SIIIIIKKE, thats the **WRONG NUMBER!!!**" https://youtu.be/0WBGONGLOpA
15:39:07.503 [Event Dispatch Thread] INFO  r.i.c.Command - https://youtu.be/0WBGONGLOpA
[15:39:16] [Warning] [JDAPlayer]: ERR YTDL: ERROR: unable to download video data: [WinError 2] The system cannot find the file specified: '-'

[15:39:37] [Warning] [JDAPlayer]: ERR YTDL: ERROR: unable to download video data: [WinError 2] The system cannot find the file specified: '-'

Update: I have found files in the home directory of the project using JDA-Player: --Init, --Seg0, --Seg1, --Seg2, --Seg3, --Seg4 I don't know how to open them but they are intellegible when opened as text.

DV8FromTheWorld commented 7 years ago

What version of JDA-Player are you using? What version of windows are you using? What version of python are you using? Are you using the python version of youtube-dl or the Youtube-dl.exe? Have you updated youtube-dl?

The error itself is being output from youtube-dl. It states that it can't file the file -. - is used to represent the stdout pipe, so the fact that it can't find it? Odd.

The --X files are known. Delete them if you see them. We are still researching why YT-DL ouputs these files.

robot-rover commented 7 years ago

I will download the newest version of Youtubedl and see if that solves it. I am using d4j-player version 0.2.3_24 Windows 10 Python 3.5 Python Version of youtubedl