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 24 Jul 2014, 11:42
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 Posts_count   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:   Sort by:   
Page 2 of 2 Posts_count   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:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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