ofxOMXPlayer looping oddities

Hey folks,

I’ve been using the OMXPlayer addon on the Raspberri Pi to loop .mov files with .264 compression.

The OMXPlayer handles short files rather well, but I’ve noticed that there are sound sync issues with a 10 minute file.

Here’s what happens. A 1-minute edit of my file loops as expected (audio starts on the first frame of the loop) but the 10-minute version hiccups every time. The audio starts playing from the beginning but the last frame of the film is still displayed – as if it were frozen. Around 5 seconds later, the frame finally catches up with the audio.

Has anybody encountered this problem before?

I’ve lowered the audio and video compression (to closely match the .mov file that ships with the CAN examples), but it doesn’t seem to make a difference. Adding 10 seconds of video at the beginning of the clip also doesn’t alleviate the problem either.

Thanks for any pro tips!

(using a 512 MB device with 128 MB RAM split)

omx player is a strange beast. i’ve had success with reloading the video file at the end of each loop then pulsing the play/pause a few times. it’s a wonky workaround, but it works.

thanks, that’s a good idea. right now, anything is worth a try!

are you using the CAN version or the latest master?

hey @jvcleave, CAN version. didn’t cross my mind to grab the latest master.
reloading the .mov actually does the trick, but i’ll try this as well.

Hi, can I reset the video when playing to start playing the firstframe again? I need to sync two Raspberry playing one video each. One is the server and the other the client. I couldn’t find the setFrame() in ofxOMXPlayer.
Thanks!

Yeah - there is no setFrame yet - I haven’t found a reliable way of getting it to work.

jvcleave, thank you very much for replying, is there a way I can start the video from frame 0? I really don’t need to sync in a particular frame like using the setFrame, only knowing when one of the videos is in the frame 0 and force the otherone to be.

I am not sure if there is a easy way in it’s current state. There is always a delay in feeding the components new video, looping so it may be tough. I have some ideas around possibly rewinding the file but I will be away from the RPi for the next couple of weeks so can’t currently try it.