Addison
|
2012-06-29
, 05:06
|
|
Posts: 3,811 |
Thanked: 1,151 times |
Joined on Oct 2007
@ East Lansing, MI
|
#61
|
|
2012-07-12
, 06:26
|
|
Posts: 3,811 |
Thanked: 1,151 times |
Joined on Oct 2007
@ East Lansing, MI
|
#62
|
|
2012-07-12
, 14:03
|
Posts: 875 |
Thanked: 918 times |
Joined on Sep 2010
|
#63
|
mplayer my-video.mp4 -ss 0:90
The Following User Says Thank You to auouymous For This Useful Post: | ||
|
2012-07-12
, 14:06
|
|
Posts: 3,811 |
Thanked: 1,151 times |
Joined on Oct 2007
@ East Lansing, MI
|
#64
|
|
2012-07-13
, 01:38
|
|
Posts: 3,811 |
Thanked: 1,151 times |
Joined on Oct 2007
@ East Lansing, MI
|
#65
|
mplayer my-video.mp4 -ss 0:90
|
2012-09-04
, 02:03
|
|
Posts: 3,811 |
Thanked: 1,151 times |
Joined on Oct 2007
@ East Lansing, MI
|
#66
|
|
2012-09-04
, 02:40
|
Posts: 875 |
Thanked: 918 times |
Joined on Sep 2010
|
#67
|
Is there something else running besides mplayer and this script in the background?
There will be times when the next video won't begin to play automatically, or it might play super chunky.
Sometimes it will play the video twice at the same time. Even times when I close the video, it will keep popping back up trying to play itself over and over again.
The Following User Says Thank You to auouymous For This Useful Post: | ||
|
2012-09-04
, 02:50
|
|
Posts: 3,811 |
Thanked: 1,151 times |
Joined on Oct 2007
@ East Lansing, MI
|
#68
|
#!/bin/sh # version 1.3 # set this to the directory where videos will be downloaded VIDEO_DOWNLOAD_DIR="/media/mmc1/Videos" VIDEO_SAVE_DIR="/media/mmc1/Favorites" # REQUIRED: # /usr/bin/youtube-dl-x -- http://rg3.github.com/youtube-dl/ # xclip -- http://asui.garage.maemo.org/_download/xclip # apt-get install libxmu6 # USAGE: # yt [URL] -- download and play video in clipboard # yt get [URL] -- download video in clipboard # yt kill -- kill all downloads and playback # yt clean -- remove all downloaded videos # yt save [URL] -- move already downloaded video in clipboard to saved video directory ################################# matchbox-remote -next xte 'keydown Up' 'keyup Up' 'keydown Escape' 'keyup Escape' if [ "$1" = "get" -o "$1" = "kill" -o "$1" = "clean" -o "$1" = "save" ]; then VIDEO=$2 else VIDEO=$1 fi [ "$VIDEO" = "" ] && VIDEO=`xclip -out` [ "$VIDEO" = "" -a "$1" != "kill" -a "$1" != "clean" ] && echo "Copy a youtube URL to clipboard or specify one on the command line" && exit if [ "$1" = "kill" ]; then killall mplayer kill `ps aux|grep "/bin/sh $0"|grep -vE "(grep|kill|clean)"|awk '{print $1}'` kill `ps aux|grep "python /usr/bin/youtube-dl-x"|grep -v grep|awk '{print $1}'` elif [ "$1" = "get" ]; then cd "$VIDEO_DOWNLOAD_DIR" echo "Downloading $VIDEO..." /usr/bin/youtube-dl-x --no-part -f 5 -o "%(stitle)s.%(ext)s" "$VIDEO" elif [ "$1" = "save" ]; then cd "$VIDEO_DOWNLOAD_DIR" echo "Saving $VIDEO..." FILE=`youtube-dl-x --no-part -c -f 5 -o "%(stitle)s.%(ext)s" --get-filename "$VIDEO"` mv "$FILE" "$VIDEO_SAVE_DIR"/ elif [ "$1" = "clean" ]; then $0 kill rm -f "$VIDEO_DOWNLOAD_DIR"/* else cd "$VIDEO_DOWNLOAD_DIR" echo "Downloading $VIDEO..." youtube-dl-x --no-part -c -f 5 -o "%(stitle)s.%(ext)s" "$VIDEO" & FILE=`youtube-dl-x --no-part -f 5 -o "%(stitle)s.%(ext)s" --get-filename "$VIDEO"` while [ ! -f "$FILE" ]; do sleep 5 ; done while [ "`/bin/ls -s "$FILE"|awk '{print $1}'`" -lt "4" ]; do sleep 5 ; done sleep 30 mplayer "$FILE" fi
#!/bin/sh # version 1.3 # set this to the directory where videos will be downloaded VIDEO_DOWNLOAD_DIR="/media/mmc1/Videos" VIDEO_SAVE_DIR="/media/mmc1/Favorites" # REQUIRED: # /usr/bin/youtube-dl-x -- http://rg3.github.com/youtube-dl/ # xclip -- http://asui.garage.maemo.org/_download/xclip # apt-get install libxmu6 # USAGE: # yt [URL] -- download and play video in clipboard # yt get [URL] -- download video in clipboard # yt kill -- kill all downloads and playback # yt clean -- remove all downloaded videos # yt save [URL] -- move already downloaded video in clipboard to saved video directory ################################# if [ "$1" = "get" -o "$1" = "kill" -o "$1" = "clean" -o "$1" = "save" ]; then VIDEO=$2 else VIDEO=$1 fi [ "$VIDEO" = "" ] && VIDEO=`xclip -out` [ "$VIDEO" = "" -a "$1" != "kill" -a "$1" != "clean" ] && echo "Copy a youtube URL to clipboard or specify one on the command line" && exit if [ "$1" = "kill" ]; then killall mplayer matchbox-remote -next kill `ps aux|grep "/bin/sh $0"|grep -vE "(grep|kill|clean)"|awk '{print $1}'` kill `ps aux|grep "python /usr/bin/youtube-dl-x"|grep -v grep|awk '{print $1}'` elif [ "$1" = "get" ]; then cd "$VIDEO_DOWNLOAD_DIR" echo "Downloading $VIDEO..." /usr/bin/youtube-dl-x --no-part -f 5 -o "%(stitle)s.%(ext)s" "$VIDEO" elif [ "$1" = "save" ]; then cd "$VIDEO_DOWNLOAD_DIR" echo "Saving $VIDEO..." FILE=`youtube-dl-x --no-part -c -f 5 -o "%(stitle)s.%(ext)s" --get-filename "$VIDEO"` mv "$FILE" "$VIDEO_SAVE_DIR"/ elif [ "$1" = "clean" ]; then $0 kill rm -f "$VIDEO_DOWNLOAD_DIR"/* else cd "$VIDEO_DOWNLOAD_DIR" echo "Downloading $VIDEO..." youtube-dl-x --no-part -c -f 5 -o "%(stitle)s.%(ext)s" "$VIDEO" & FILE=`youtube-dl-x --no-part -f 5 -o "%(stitle)s.%(ext)s" --get-filename "$VIDEO"` while [ ! -f "$FILE" ]; do sleep 5 ; done while [ "`/bin/ls -s "$FILE"|awk '{print $1}'`" -lt "4" ]; do sleep 5 ; done sleep 30 mplayer "$FILE" fi
|
2012-09-04
, 03:31
|
Posts: 875 |
Thanked: 918 times |
Joined on Sep 2010
|
#69
|
This is my download script.
The weirdness I mentioned usually happens on the next video download after I run the yt clean script or when a video didn't download at all for some odd reason.
For me, it's almost as though there's some extra process running in mplayer if that makes any sense.
if [ "$1" != "kill" -a "$1" != "clean" ]; then matchbox-remote -next xte 'keydown Up' 'keyup Up' 'keydown Escape' 'keyup Escape' fi
The Following User Says Thank You to auouymous For This Useful Post: | ||
|
2012-09-04
, 03:35
|
|
Posts: 3,811 |
Thanked: 1,151 times |
Joined on Oct 2007
@ East Lansing, MI
|
#70
|