Closed MarkStutz closed 2 weeks ago
Hi Mark, this can be achieved by adding the loop instruction to the filename, in your case:
file1.loop.mp4 file2.mp4
pressing the button will end playback of the current file, and the player will open the next file.
if you like to control the raspberry from an external circuit, you could add an optocoupler in between. not only to prevent ground loop issues but it will also help if your other circuit is on 3.3v, for example.
best, Julius.
Thanks. I like the way it plays and starts, however the file1.loop.mp4 file that needs to loop plays through the first time and then when it starts again, the video plays about 1 second, then freezes 4-8 seconds and it repeats this sequence until the button is pushed to play the file2.mp4 video. Is there anything in the code that needs adjusted to prevent it from freezing up and play thru each time? Also while the file2.mp4 is playing, if the button is pushed again, then the file2.mp4 stops and file1.loop.mp4 plays. Is there a way to have file2.mp4 play all the way through and ignore any button presses? Thanks so much for your time.
Hi,
usually this means the hardware has trouble decoding your file. is the file very short? you could try to edit a clip that is a few minutes long. also, if it was encoded with adobe software, try „handbrake“ or another ffmpeg based encoder.
best, Julius.
I am a newbie here and I found your program while searching for a device. I have been working with a museum for many years and the video player that I always used is no longer (Akman Flash A/V) available and I found this program for a RaspberryPi. What I have is displays that when a button is pressed, it triggers a basic stamp to start a light show and at the same time trigger the video player. I have your program downloaded and like what I see, but I need it modified so that when the Pi is turned on "video01.mpg" starts and continues to loop. When the museum visitor presses the button by the display, I need the RaspberryPi to be triggered to start "video02.mpg" (if that nomenclature is correct) and play that video until completed. Once that video is completed "video01.mpg" video plays and loops until the button is pressed. Is that something that you could help me figure out how to make happen? Thanks so much.