![]() ![]() Included in the files is a Python UDP packet sender that will send a UDP packet to trigger video 1 for the UDP version: "SendUDPtester.py" To kill it off, it might take a couple of Ctrl-c's to stop (threaded processes). ![]() "python3 /home/pi/TriggeredVideoPlayer_GPIO_v9.py" "python3 /home/pi/TriggeredVideoPlayer_NetworkUDP_v9.py" If you'd like to test the python script directly, so you can make adjustments or troubleshoot, simply do the following: This will take a short moment to start and you should see it begin to play videos. "sudo /home/pi/TriggerPlayerLaunch_GPIO.sh" "sudo /home/pi/TriggerPlayerLaunch_UDP.sh" You can launch the program to test it directly by typing the following: (this may need you to enable SSH access on your Raspberry Pi by creating an empty file called "SSH" on your /boot partition. Test that the code works properly by launching it via ssh on your Raspberry Pi (you will lose your console directly on the screen). "chmod a+x /home/pi/TriggerPlayerLaunch_GPIO.sh" "chmod a+x /home/pi/TriggerPlayerLaunch_UDP.sh"Įnsure that the TriggerPlayerLaunch_GPIO.sh file is executable. Install Python library for Raspberry Pi GPIO usage:Įnsure that the TriggerPlayerLaunch_UDP.sh file is executable. "video2.mp4" will be played once when triggered from second triggerĭisable console "screensaver" so that it never goes blank by adding to the end of "/boot/cmdline.txt":Īlso add the root user (the user that effectively is used to run /etc/rc.local commands) to the tty group: "video1.mp4" will be played once when triggered from first trigger "start.mp4" will run as a placeholder when not triggered and on startup. set gpu-mem to a higher amount to allow better video playback in your /boot/config.txt file:Įnsure you have a "video" directory in your pi user's home directory with: possibly other python libraries (I'm sure I'll get back to this to make sure) python3-psutil (library) - possibly others python 3 (Python 2 for the GPIO version possibly? Stupid spaces/tabs!) Raspbian lite installation (no desktop required) We use this now in our works meshing video with mechatronics/robotics so that we can match up videos with physical movement. more complex options like Raspberry Pi screen configuration etc. scripts to mount all USBs in the same position to allow videos to be loaded from USB instead of internal storage scripts to automatically mount USB drives and use the contents of the USB as media source scripts for running as system process on boot reintroduction of seamless looping (it was proving unreliable in omxplayer after several hours) random gadgets (as long as you change what packet is matched to trigger) other programs you write (Python, C, etc etc) The networking ability means suddenly you can interface and control video playback from a wide range things including: ** Instructions below are for the Network triggered version, will combine GPIO and Network in time ** (older versions with various different methods etc in the /old folder) The other version here allows the same functionality but with UDP network packet triggering instead of GPIO input, and is made to be run by launching the shell script. If used simply for looping video, will allow video looping with crash protection. The first version here allows GPIO triggering of videos/logic and is fully configurable much like many commercial video solutions for video kiosks and signage. This video player is written in Python, and allows full logic control and triggering of video playback suitable for artists and creatives. Initial version by Jesse Stevens (from artist duo Cake Industries) 26-3-2018, network versions added, GPIO version 1-2-2021. (Loop, trigger, multi-play on multiple monitors, logic trigger, you name it!) A Raspberry Pi Video content triggered looper/logic set of players for artists ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |