2

I did a simple alert script in bash. On my RPi nclistens on some port. When somebody (some other RPi or PC) sends a message to this port, nc finishes and omxplayer plays a sound. Then the loop repeats. What have looked easy, appeared to be a problem when it should run many months without a hangup. I have solved a rare hangup of nc (by a timer with cyclic kill and restart nc within a script).

But what I cannot solve is that omxplayer rarely hangs when supposed to play a sound (approx. once a week) and kill -9 omxplayer.bin does not help. I tried mpg321 instead and I ended with the same problem, maybe a little more frequent.

One thing I observed - when I managed to kill the omxplayer.bin process (by killing the parent), all the sounds that were waiting (I mean that were sent to the soundcard after) were played immediately one by one.

1

i've had this problem, and solved it by adding the '--no-keys' option to the omxplayer commandline.

Not ideal (you lose kb control over the player), but at least it doesn't hang anymore...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.