-
Notifications
You must be signed in to change notification settings - Fork 71
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
How to sync two videos on separated dbus on a RPi4 #212
Comments
@SandroMiccoli I do not know the answer, but if I were you I would start by seeing how long it takes those calls to the pause function to happen. If the first one always takes 300ms to complete, then that indicates you will need to do some sort of parallel control rather than using the same thread. |
@SandroMiccoli also, |
I have the same issue. Is there any way to spread a single video across 2 screens on a Pi4 or sync the playback of 2 files in 2 screens? |
I am using a workaround for this, maybe not the cleanest but it works fine. if(offset>1): #more than 1 second offset, direct jump to correct position else : #small offset, adjust player 2 rate I use the same logic to sync as many rPis using omxplayer-wrapper as needed on a network (tried with 8 screens so far), communicating with the OSC protocol Hoping this might help |
@Akwariom I love it. This is a good idea. I didn't know the python wrapper offered that much control. As much as I want to give it a try, I might just stick to two pi3 and omxplayer-sync since I already have an img configured with it. |
Issue Report
Description
I'm upgrading a video controller system I've developed to be able to play two different videos for each HDMI output of a RaspberryPi4 (issue #194 helped with that). My issue now is getting these two videos to play in sync. Ideally synced at the exact same frame.
Looking at the docs I found a play_sync() function but not sure how to make one process to be synced with the other.
Problem reproduction
I had to increase my GPU memory on the RPi to 256MB to be able to play two FHD (1920x1080) for each monitor output (thanks to this).
This is how I'm starting the
omxplayer
process for each video output:And when I pause/play the video, they also react in different moments. Parts of that code:
Should I use a python library like
multiprocessing
to run both processes in parallel or are there some settings foromxplayer
that could take care of this?Environment details
lsb_release -a
):python-omxplayer-wrapper (pip show omxplayer-wrapper)
0.3.3
python-dbus
(dpkg -s python-dbus
)1.2.8-3
python
(python --version
)2.7.16
omxplayer
(omxplayer --version
)f543a0d
The text was updated successfully, but these errors were encountered: