Re: forcing mplayer instead of flash player?
Liviu Andronic <[email protected]> Sun, 15 May 2011 10:07:57 +0200
| Newsgroups | gmane.comp.web.opera.linux |
|---|---|
| Message-ID | <[email protected]> |
2011/5/9 Ole Jørgen Brønner <[email protected]>: > I think the newest flash versions deletes the file immediately to make sure > it doesn't "leak" if something crashes. You can still find the files in > /proc/*/fd as long as the plugin is running. > > I use the following script to play flash videos "externally": > I made some minor modifications to the script. Now when only one Flash video is found, the player is being launched automatically without the need to always, manually select choice 1. Oh, and I generally use gnome-mplayer: change at will. Cheers Liviu #!/bin/zsh VIDEOS=($(find /proc/*/fd -lname "/tmp/Flash*" 2> /dev/null)) if [[ $#VIDEOS == 0 ]]; then echo "No videos found" exit 0 fi if [[ $#VIDEOS == 1 ]]; then echo "Playing unique video available" gnome-mplayer $VIDEOS exit 1 fi IFS=$'\n' VIDEOS_LS=($(ls -1lHh $VIDEOS)) select CHOICE in $VIDEOS_LS; do if test $REPLY -ge 0 2>/dev/null ; then # just test for integer argument gnome-mplayer $VIDEOS[$REPLY] elif [[ $REPLY[1] == c ]]; then VIDEO=$VIDEOS[$REPLY[2,-1]] if read "NAME?Name? "; then if [[ -z $NAME ]]; then NAME=$(ls -l $VIDEO | grep --only-matching "Flash[^ ]*") fi echo "cp $VIDEO ~/\"$NAME.flv\"" cp -i $VIDEO ~/"$NAME.flv" fi fi done -- Opera-Linux: https://list.opera.com/mailman/listinfo/opera-linux More lists: https://list.opera.com/mailman/listinfo/ Unsubscribe: mailto:[email protected]?subject=unsubscribe