I used a slightly different approach by adding a "-c" option to the flash script, where it copies to a designated folder with a date:minute stamp instead of playing it:muggins wrote:To save videos I use this script I googled:
So if I call it savevid, run like savevid videoname.Code: Select all
#!/usr/bin/env bash for flashpid in $(pgrep -f flashplayer.so); do cd "/proc/$flashpid/fd" for video in $(file * | grep '/tmp/Flash' | sed 's/\(^[0-9]*\).*/\1/g'); do echo "/proc/$flashpid/fd/$video" cp "/proc/$flashpid/fd/$video" /mnt/home/vids/$1 done done
Doesn't work with dailymotion now, as they changed something to stymie!
Code: Select all
#!/bin/sh
## USEAGE" [-c] to copy video
DIR="/mnt/sda2/Desktop/myvideos" ## save directory
var="$(stat -c %N /proc/*/fd/* 2>&1|awk -F[\`\'] '/lash/{print$2}')"
echo "$var" >/tmp/flash
[ "$1" ] || sudo mplayer -cache 1000 ${var}
## Log only working file in /tmp/flash
while read line; do
var="$(ls -l ${line} 2>/dev/null | grep "Flash")"
if [ ! "$var" ]; then
dl="$( echo ${line} | cut -d/ -f3)"
sed -i "/$dl/d" /tmp/flash
fi
done </tmp/flash
if [ "$1" == "-c" ]; then
nm="$(date +%d-%m-%y:%M)"
cp `cat /tmp/flash` "${DIR}/${nm}.vid"
fi