Posts

Showing posts from November, 2018

Getting mplayer status from a bash script

Have you ever wanted to query mplayer for playback information? How does one go about querying mplayer for things like the time elapsed, pause state, volume level, mute state and more? If you just want my script sans-details of how it came about, click here . I'm currently working on a project that is basically a modern-day version of those old read-along audiobooks, the kind where you listen to a cassette/CD while you look at the book, turning the page whenever you hear a chime. When (if) I get it all put together, it will get its own dedicated post, but for now, let me just describe my mplayer dilemma and fix. I decided pretty early on that I did not want to hard-code the chime sound for page turns into the audio files. There are two reasons for this. First of all, I want to be able to change out the chime sound, and second, I want to be able to control the volume of the chime sound independently from the audiobook so that chimes can be completely muted if desired. This means...