mjchevalier
Posts: 2
Joined: Tue Jun 26, 2018 1:42 am

Switch TV input, play video every 15 minute, switch input back

Tue Jun 26, 2018 1:52 am

Hi all, I am brand new to Raspberry Pi but I can see it has powerful abilities. I need to setup my Pi 3 B+ and connect it to a TV as the output source and then every 15 minutes, switch the input source on the TV where the pi is connected and play a video and then switch the TV back to the original input source. Using Raspbian, I have managed to load the video mp4 file to the pi, use cron to schedule the playing of the video using omxplayer but it is glitchy. The scheduling only seems to work if I set the schedule to every minute using 5 *'s. The part that loses me is how to automatically have the TV play the video but then go back to playing live TV after the video is finished. Any and all help with this is greatly appreciated. The current setup in Cron is this: 15 * * * * omxplayer /home/pi/Videos/videofile.mp4. Thank you!

User avatar
lmarmisa
Posts: 1233
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: Switch TV input, play video every 15 minute, switch input back

Tue Jun 26, 2018 9:25 am

This link could help:

https://raspberrypi.stackexchange.com/q ... reen-blank

Consider using client-cec too:

https://blog.gordonturner.com/2016/12/1 ... pberry-pi/

Code: Select all

sudo apt-get install cec-utils

mjchevalier
Posts: 2
Joined: Tue Jun 26, 2018 1:42 am

Re: Switch TV input, play video every 15 minute, switch input back

Tue Jul 03, 2018 8:19 pm

Thanks Imarmisa, I have looked at the links you gave me and it seems like what I need to do is possible with the CEC commands but I am lost as how to implement them. I see that I can scan from the Pi to see what devices have which addresses but then I am lost in regards as how to implement the CEC-O-MATIC information. Are the commands entered in the terminal window through an app? Any further info is greatly appreciated. Thanks

Return to “Beginners”