2

I'll try to make this brief initially, in hopes that someone knows off the bat that there is some limit in omxplayer that I'm hitting. If not, I can post the code and more details about what I've tried. It has me stumped, but maybe I'm missing something.

NB: Using Pi 3, with Stretch and all updates.

I have a python script that uses omxplayer running in a museum kiosk. It runs a looping attractor video until one of 4 buttons is pushed, then plays whichever video was selected until that ends, then goes back to looping the attractor. Works flawlessly. Videos are all HD and range in length from 3 - 24 minutes.

I wanted to add 2 more videos. I added the buttons and extended the code for 2 more cases. However, when I choose one of the new videos, it starts but then quits and goes back to the attractor. Note that the videos are labelled movie_1.mp4 through movie_6.mp4. If I change the code so that one of the new buttons is set to play movie_1.mp4, it works, so the buttons are wired correctly. If I duplicate one of the original videos and name that, say movie_6.mp4, it breaks. It's like omxplayer somehow can't handle more than 4 videos, even though I don't see why it would care how many are in the list, since when a button is pushed, I kill any omxplayer processes that might be running and then start a new one.

I upped the GPU memory to 256, then 512, with no effect. The 4 videos were working fine with it set to the default 128.

File naming doesn't matter. If I rename movie_6.mp4 to boo.mp4, it still breaks. If I only add 1 new movie instead of 2, it breaks. If I change the code so that button 1 is calling for movie_6 and button 6 is calling for movie_1, then button 1 is now what breaks and button 6 works fine.

Note that I've tried turning on the --genlog option, but can't find that it's writing any output anywhere (looked in directory with the script, as well as /var/log/).

I've run out of ideas. Has anyone seen similar behavior? Thanks.

  • Good question and looks like you've done a lot of debugging already. Any chance you could post the python script? – Roger Jones Mar 13 at 9:47
1

Well, the good news is that I solved the problem. The bad news is that I added noise to a great resource. Sorry for the distraction!

That said, posting the question and looking at the script one more time before responding to Roger's request to see it (Thanks, Roger!), made me look somewhere I hadn't -- the regex I use to test for whether a video is still playing or whether it's time to loop the attractor again. I had hard-wired where I shouldn't have (last-ditch coding before the exhibit launched). Fixed that and now all is running as it should.

While I'm walking the Hall of Shame for Not-As-Sharp-As-They'd-Like-To-Be Programmers, I want to publicly thank Edgar Hucek, the omxplayer developer; Johneta and ThothLoki, whose scripts I tweaked for a button-driven player; and everyone who's on the web to help people and spread knowledge. On the shoulders of giants....

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.