hoothoot
Posts: 8
Joined: Tue Jun 21, 2016 2:35 am

1 second HDMI lag with omxplayer?

Mon Jun 27, 2016 4:02 pm

I have a script that plays video with omxplayer and xterm (for fullscreen).

Code: Select all

def play_vid_nonblocking(num):
        return subprocess.Popen(["xterm", "-fullscreen", "-e", "omxplayer", "-o", "hdmi", "-r", "/home/pi/Ligia/{:02d}.mp4".format(num)])
It seems that when the video function is called, there's a second or two where there is no HDMI output of any kind before the video plays.

This isn't an issue when running the script on my monitor, but when the Pi is hooked up to a projector, this 1 second interruption causes the projector's default "NO INPUT" screen to flash, which is annoying.

Any ideas here? I've already edited config.txt to include

Code: Select all

gpu_mem=192
Where should I go from here? Thank you in advance!

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5551
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: 1 second HDMI lag with omxplayer?

Mon Jun 27, 2016 4:59 pm

Try with "-r" removed. That option changes HDMI mode to match video framerate (for smoother video playback).
Most displays/projectors require between a second and several seconds to lock onto the new settings. That is unavoidable.

hoothoot
Posts: 8
Joined: Tue Jun 21, 2016 2:35 am

Re: 1 second HDMI lag with omxplayer?

Tue Jun 28, 2016 3:17 am

This did the trick, thank you

Return to “Graphics, sound and multimedia”