-
Notifications
You must be signed in to change notification settings - Fork 397
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
Changed Player from VLC to MPV or MPG123 #50
Changed Player from VLC to MPV or MPG123 #50
Conversation
added files for different player support
…settings fixed rfid_trigger_play.sh to new folder playout_controls.sh new linked to new folder
to the installer documentation
HI @Luegengladiator |
I started with MPV and it was up and running with a socket in the background (MPG_playout_controls and rfid_trigger_play). But there is a 8 Second startup delay on RPi 1. MPG123 is a fast console mpeg audio decoder/player. Build for audio only. The Phonie is not designed to play Videos so it's not necessary to use a heavyweight Videoplayer like VLC or MPV. |
Ok, got it. And a very elegant solution to use MPG123. Good work. Plus: I totally understand the impatience issue :) my daughter needed the stop chip tied on a string to the box to stop when she wants, immediately, otherwise she unplugged the power supply - which cost me a few SD cards :) I remember now you once asked if there could be an event triggered when removing the RFID chip. So this is the idea: you swipe the card a second time and the audio will stop / store the current position in a file and/or playlist, swipe another time: the playout continues exactly where it started. Without having looked at the code in detail (yet):
And: could you take a look at this and give me some feedback? (I will ping @Bockiii here as well, because I think there is an overlap in thinking) The pull requests are related, I haven't tested this for VLC yet either. Not sure if this seeks the position within a file, too. Or just jumps to the last file in the playlist. I will need to do some conflict resolution and do some cherry picking to your pull request(s). Great work, thank you for the contribution. |
At the moment I focused on mpg123 because all parts are there. The Scripts checks on RFID-trigger. If the RFID corresponds to the running process it send a "stop" command. If it's a different one, it stops the actual one, storing the position and starts the new one. Conplay writes a comment to the m3u like I did not check the mpg123 on podcasts but got NDR2 (local radio broadcast here) livestream running with it. |
Play/Pause/Continue seems to be a bigger thing. #47 and #31 are working on it. And my first approach with MPV was looking for a solution too. I think only the User can decide which player is the best for the things he wants to do. |
I'm working on the "podcast-Problem" planing to name the Audiofolder like A_PutYourNameHere for Audiobooks, M_PutYourNameHere for Musik, Y_PutYourNameHere for youtube, P for Podcast .... @MiczFlor Is it possible to update the PullRequest or should I wait for the finished merge? |
thanks for getting in touch about this, I was thinking about that, too. Right now I have too little time to really get my hands dirty with a task to implement your solution, but I am very happy to be your "rubber duck" for the task (see: https://en.wikipedia.org/wiki/Rubber_duck_debugging ) As the maintainer, what I would like to see ideally is that you approach this in stages, each of which becomes a pull request. (and that would mean that I would like to close this pull request and invite you to start creating a new one based on the latest code base, because there are so many conflicts by now...). Breaking this down into smaller steps for a roadmap will make it easier for others to chip in as well and help to debug each new feature. Regarding the podcast problem (as you describe it), I am also thinking about how to handle this best to have a minimum impact on the users. The more complicated the software gets, the less people will use it and contribute to it. It might be best if we have a brief chat about this? You seem to be based in the German language area, based on your username, so please mail me micz.flor KLAMMERAFFE web.de and we can arrange a call? The stages I want to suggest would be: 1: Adding MPG123 as alternative playerThis as an option in settings would be great to have. I like the solution and I assume it will be battery saving and responding faster. For now, I would drop 2: Adding 'resume play' for MPG123While you might think this could be all in one, I think it should be a separate step, because it adds a separate script. This would be the solution you already have done: #50 (your description at the top) 3: Adding 'resume play' for VLCThis is summarized here: #47 4: Support of EAN Scanner#65 The apt-get install phoniebox is for the future, I think features are the present. What do you think? I suggest we find a time to talk soon and spread tasks between us, and discuss approaches to make it feature rich and dumb to use. All the best, micz |
agreed. Let's line up and coordinate the merge on an actual Version of the Jukebox |
Splitted the scripts to use Settings directory and created dedicated scripts for VLC, MPV and MPG123.
To send keystrokes async to MPG123 I used Terminal Multiplexer TMUX.
Additional I renamed the running process of VLC/MPV/MPG123 with exec -a RPi-Jukebox-Player to identify the running process without knowing the underlaying player.
So it's possible to get the correct running Process and kill/stop it.
With the PID of the RPi-Jukebox it's now possible to get the Playlist from /proc and stop the running Playback on second read of the same RFID.
MPG123 has a Problem storing the Position in the Track. So I used Conplay from the mpg123 project
https://github.com/nadult/mpg123/blob/master/scripts/conplay
So Position of the Track is saved inside the m3u.
Creating the m3u always new is now a Problem so I fixed that too. Create only if not existing.
Actual missing: Possibility to remove the m3u or at least the comment inside to restart the Playlist from beginning