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
451 stars 239 forks source link

Intro&outro for random playlist #164

Closed postnuka closed 9 months ago

postnuka commented 1 year ago

Hi, Is it possible to add intro and outro videos to a randomly generated playlist? It will be like this: 1- intro 2- random video playlist 3- outro

Thank you.

tofuSCHNITZEL commented 1 year ago

Not directly. You could create a playlist manually... But then the videos in the middle would have the same order every time... To have a truly random list of videos in the middle of two fixed videos, you would need to adapt the python code.

postnuka commented 1 year ago

Thank you. I see that there is a sample playlist file called “example.m3u”. So maybe I can create a shell script for modifying this file for this purpose. A little help would be appreciated. :)

tofuSCHNITZEL commented 1 year ago

Yes that would be a possibility but it depends when do you need the randomness to be "rerolled"... Because your shell script would need to restart the video looper so it reads the m3u file again. But there is no feedback from the player when it reached the outro file...

postnuka commented 1 year ago

Yeah, I got it. But I think it's good enough. I would be very grateful if you can recommend a reference I can follow about these shell script.

tofuSCHNITZEL commented 1 year ago

Maybe tell me more about what you need exactly then we will see if it is even possible with a shell script.