Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YouTube playback always stops a few seconds before the end of the video/song #327

Open
ThomasTheGerman opened this issue Apr 19, 2019 · 9 comments

Comments

@ThomasTheGerman
Copy link

The plugin consistently cuts off the last bit of anything I try to play

@aiomaster
Copy link
Contributor

I think it is exactly this problem: fent/node-ytdl-core#402
Maybe we could workaround by downloading the file from youtube and feed the downloaded file to mpd instead of the youtube stream itself.
Or does anyone know, if there is an option for mpd to just reconnect if connection was closed?

@aiomaster
Copy link
Contributor

There is some effort at mpd to integrate youtube-dl in mpd see MusicPlayerDaemon/MPD#223
Maybe we should just wait for that and hope that this will fix these stream termination problems.
The whole volumio youtube plugin could be made a lot simpler than.
I don't know if updating mpd is a big thing in volumio, because I did not understand the build chain und wonder why volumio does not use the current version of mpd. Has anyone a hint how this works?

@patrickkfkan
Copy link
Contributor

We should probably close this as the issue is related to MPD and not the plugin itself. The youtube-dl node module is used for fetching metadata from the YouTube streams, but the actual playback is done by MPD. The version of MPD that Volumio comes with is outdated and does not handle the streams properly, resulting in cutoffs. You might want to try the version I have uploaded here as an interim solution until Volumio delivers a new release based on Debian Buster (x86 version is in progress, although no ETA).

@ThomasTheGerman
Copy link
Author

ah, so the issue is debian coming with broken packages for the sake of "stability"

@patrickkfkan
Copy link
Contributor

No, at least not in this context. The issue is with Volumio sticking to an old version of Debian. The current version of Volumio is still based on Debian 8 Jessie, which was released 4 years ago. Debian is now at version 10 ("Buster") and the MPD package has already been updated to a recent version. Volumio, with its outdated Debian base, naturally hasn't got the updated MPD.

@aiomaster
Copy link
Contributor

Yeah patrickkfkan is right. The corresponding issue is this volumio/Build#388
But maybe it could be workarounded in two ways atm:

  1. compile a newer mpd for jessie (Can you give some hints, how you had done it @patrickkfkan ?)
  2. Download the file with youtube-dl and feed the downloaded file to mpd and not the stream directly

I don't know which one would be more work.
At least we could wait for the buster upgrade, but waiting did not help much in the past.

@patrickkfkan
Copy link
Contributor

patrickkfkan commented Jan 9, 2020

  1. You can download the MPD binaries I compiled (v0.21.16) in the link given above (instructions on activating the newer MPD also provided). Build scripts can be found in my github.

  2. This will likely work but users will notice a delay in playback of YouTube streams, particularly lengthy ones, so I wouldn't recommend it.

"waiting did not help much in the past." - I have that feeling as well....

@volumio
Copy link
Owner

volumio commented Jan 9, 2020

@patrickkfkan I tried to recompile latest mpd on Jessie, but with no avail. Would you be willing to help to produce an updated mpd package that we can integrate in current Jessie ?

@patrickkfkan
Copy link
Contributor

@patrickkfkan I tried to recompile latest mpd on Jessie, but with no avail. Would you be willing to help to produce an updated mpd package that we can integrate in current Jessie ?

I made the MPD build for community testing, since I've tested only certain aspects of it and I'm not certain if is compatible with other parts of Volumio (e.g. Qobuz / Tidal...). If it is to make its way into the official builds, then it ought to have been tested well enough...so it is your call whether to proceed on this basis.

For compiling recent MPD, did you use the build scripts on my git? FYI I made my builds by running the scripts in a Debian Buster chroot. I'd be interested in knowing what issues you have in your build attempts. On the other hand, is there a reason not to use the binaries I provided?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants