Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 31 Jul 2014, 01:59
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
playflash.pet
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [17 Posts]   Goto page: Previous 1, 2
Author Message
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Mon 10 Oct 2011, 18:40    Post subject:  

muggins wrote:
To save videos I use this script I googled:

Code:
#!/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


So if I call it savevid, run like savevid videoname.

Doesn't work with dailymotion now, as they changed something to stymie!


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:

Code:

#!/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
Back to top
View user's profile Send private message 
Tman


Joined: 22 Jan 2011
Posts: 814
Location: Toronto

PostPosted: Mon 10 Oct 2011, 22:04    Post subject:  

Earlier, I recommended the FlashVideoReplacer plugin for Firefox but after using it to watch Youtube videos for a while, I found that sometimes it would skip and once in a while there would be problems with the video blacking out. So overall, I think that using playflash gives smoother playback.
FYI, one can alter the script for use with gnome-mplayer as well.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [17 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0507s ][ Queries: 12 (0.0107s) ][ GZIP on ]