pastebin - collaborative debugging tool
blankb.kpaste.net RSS


Raspi Random Movie Interstitial
Posted by Anonymous on Wed 17th May 2017 01:15
raw | new post

  1. #!/bin/bash
  2. #FILES=`find /media/ | grep -E "m4v|mp4" `| awk '1==1{ printf("omxplayer -b %s\n",$0};'
  3. while :
  4. do
  5.  #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
  6.  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
  7.  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
  8.  paste -d '\n' /tmp/playlist.movies /tmp/playlist.interstitials >/tmp/playlist
  9.  chmod +x /tmp/playlist
  10.  /tmp/playlist
  11. done

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.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}





All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at