Advertisement
kosmik2001

run_mplayer_bg2.bash

Mar 4th, 2015
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.80 KB | None | 0 0
  1. #!/bin/bash
  2. VDIR="/root/DreamScene"
  3. SAVEIFS=$IFS
  4. IFS=$'\n\b'
  5.  
  6.  
  7. for (( ; ; ))
  8. do
  9.     LIST=""
  10.  
  11.     for file_list in $(ls -1 $VDIR | sort -R); do
  12.     time_c_f=`ffprobe -i $VDIR/$file_list -show_format -v quiet | sed -n 's/duration=//p' | sed 's/[,.]/\ /g' | awk '{print $1}'`
  13.     time_c_f=`echo $time_c_f|sed 's/^0*//'`
  14.     count=$(( 600 / $time_c_f ))
  15.     LIST="$LIST --\{ --loop-file=$count '$VDIR/$file_list'  --\} "
  16. #   LIST="$LIST $VDIR/$file_list -loop $count"
  17.     done
  18.     xwinwrap -ni -fs -s -st -sp -b -nf -- mpv --x11-name dreamscene --fs -vo opengl-hq --hwdec=vaapi -wid WID `echo $LIST | xargs -n 1 echo` 2>/dev/null
  19. #    xwinwrap -ni -fs -s -st -sp -b -nf -- mplayer -nosound -fs -vo vdpau -fixed-vo -wid WID -really-quiet `echo $LIST | xargs -n 1 echo` 1>/dev/null 2>/dev/null
  20.  
  21. done
  22.  
  23. IFS=$SAVEIFS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement