adafruit / pi_video_looper

Application to turn your Raspberry Pi into a dedicated looping video playback device, good for art installations, information displays, or just playing cat videos all day.
GNU General Public License v2.0
443 stars 240 forks source link

Skip to next video on the playlist via terminal #182

Closed foilandwater closed 9 months ago

foilandwater commented 1 year ago

Hi,

Is it possible to skip to the next video via a terminal command? ie. the equivalent of the keyboard shortcut 'K' but done via command line.

I'm asking because the TV is mounted high up and we have no keyboard connected. The player loops 33 videos and occasionally I want to shop someone a specific video, so I was hoping to just skip and cycle through until the one I want.

Thanks in advance.

tofuSCHNITZEL commented 1 year ago

Maybe this can work, have not tried it yet: https://unix.stackexchange.com/questions/267704/command-to-simulate-keyboard-input

foilandwater commented 1 year ago

Thanks, I found that. I've been fiddling but can't get it to work. I eventually found the below line of code which doesn't do anything. Is it perhaps because I'm targeting the wrong display? export XAUTHORITY=/home/pi/.Xauthority; export DISPLAY=:0; xdotool key k

FYI, running only xdotool key k results in an error which is why i ended up with the above line of code.

tofuSCHNITZEL commented 1 year ago

Yes I guess so, but I would have no idea which display to target, but even if we would find the right target - it's a gamble if pygame would even register it

foilandwater commented 1 year ago

Ok thanks for the reply and for the info. No worries I'll keep fiddling and will report back if I have success!

tofuSCHNITZEL commented 9 months ago

Stale