I am trying to change the video of omx player in python based on an event. But the problem is the next video gets loaded only after the first video finishes.
import os
os.system('omxplayer video1.mp4')
if(flag==1):
os.system('omxplayer video2.mp4')
Is there a way to interrupt video1 in middle of playback and start second video. Note:I am working on a raspberrypi with debian wheezy and python 2.7