- #!/bin/bash
- #FILES=`find /media/ | grep -E "m4v|mp4" `| awk '1==1{ printf("omxplayer -b %s\n",$0};'
- while :
- do
- #find /media/ -name '*.mp4' -o -name '*.m4v' 2>/dev/null | awk '1==1{ printf("echo %s ; omxplayer -b \"%s\"; sleep 2\n",$0,$0)};' | sort -R >/tmp/playlist
- find /media/ -name '*.mp4' -o -name '*.m4v' 2>/dev/null | awk '1==1{ printf("echo %s ; omxplayer -b \"%s\"; sleep 2\n",$0,$0)};' | grep "Movies" | sort -R >/tmp/playlist.movies
- find /media/ -name '*.mp4' -o -name '*.m4v' 2>/dev/null | awk '1==1{ printf("echo %s ; omxplayer -b \"%s\"; sleep 2\n",$0,$0)};' | grep "Interstitials" | sort -R >/tmp/playlist.interstitials
- paste -d '\n' /tmp/playlist.movies /tmp/playlist.interstitials >/tmp/playlist
- chmod +x /tmp/playlist
- /tmp/playlist
- done
Raspi Random Movie Interstitial
Posted by Anonymous on Wed 17th May 2017 01:15
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.