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

Auto play next video in the list #5

Open
d0uub opened this issue Oct 30, 2017 · 2 comments
Open

Auto play next video in the list #5

d0uub opened this issue Oct 30, 2017 · 2 comments

Comments

@d0uub
Copy link

d0uub commented Oct 30, 2017

That would be perfect if implement auto play next video

@pera14
Copy link

pera14 commented Mar 13, 2018

Can you make it to play next song?

@cbix
Copy link
Owner

cbix commented Aug 22, 2018

Currently this is not trivial to implement because gotubecast only communicates one way, from the YT API to the output stream (which is read by e.g. a shell script which passes commands to a video player). So gotubecast can't know the exact current position in the video, especially when the script uses youtube-dl, which takes a long time to analyze the stream URL.

To make this possible I need to implement two way communication first, so the player can give commands to gotubecast (when the playback is finished, play/pause/volume commands from the player). Maybe input stream commands (or a simple FIFO pipe/unix socket) are sufficient here, but for larger applications (kodi extension etc.) it might make sense to write a separate library for the YT TV API (preferably in python) so the app can coordinate playback between API and player.

However, I could implement a simple playtime estimation based on the video length so gotubecast assumes the end of the video playback and triggers the next video playback to the API. This would be inaccurate so sometimes the next video would start too early or late...

UPDATE: actually I see a lot of potential in integrating https://github.com/subogero/omxd. If anyone comes up with a nice shell script solution leveraging omxd for autoplay or playlist management in general together with gotubecast, don't hesitate to create a PR here so we can add it to the other examples!

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

3 participants