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
Stop video1 and play video2 then continue video1 #25
Comments
Hi Joel, I think you're best off joining the two video files into one, and then jumping around that video by using |
Hi Will, Thanks for the quick reply. |
Play video1 on loop until the event occurs which you want to play video2, when that happens get the current position of playback and store this, play video2 and when that has finished set the player back to the recorded position. You might find it helpful to model a video as an object where you encapsulate some of the complexity of dealing with multiple videos in one file. |
One last thing, what is the best way to kill the session of your wrapper? Thanks a lot |
There is a quit method that handles clean up of the process On Wed, 22 Jul 2015 22:20 jonhdeppp notifications@github.com wrote:
|
does player.quit() different from "dbuscontrol stop"? |
Yes, check the source code for details. It sends SIGTERM to the process as On Wed, 22 Jul 2015 22:27 jonhdeppp notifications@github.com wrote:
|
Hi Will,
Hope you can help me with my problem.
video1 = duration 30 secs
video2 = duration 10 secs
I have a looping video1 but in the middle of the play, I stop the video1 and play video2. Once video2 is done, I want to continue video1 on the position it was stopped.
My script::
loop.py
player1 = OMXPlayer('video1.mp4')
dur1 = player1.duration()
while 1:
player.play()
sleep(dur1)
player.quit()
stop.py
player2 = OMXPlayer('video2.mp4')
subprocess.call(['dbuscontrol.sh','stop'])
player2.play()
Im having problem on the timer. Is there any other option to replace the time.sleep() in playing looping videos? What happens is when I stopped video1 at 5secs position, I will have a black screen for 15 secs before it plays again and if I stopped video1 at 25secs position, I will experience video1 and video2 playing simultaneously after 5 secs.
Hope you read this in time.
Thanks,
Joel
The text was updated successfully, but these errors were encountered: