-
Notifications
You must be signed in to change notification settings - Fork 18
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
Comments
Can you make it to play next song? |
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! |
That would be perfect if implement auto play next video
The text was updated successfully, but these errors were encountered: