How to Capture Adobe Flash Videos on Ubuntu Linux
Part 1 of 3:
Preparing Your Ubuntu Linux System
- Issue the following commands below in order to prepare your Ubuntu Linux system to capture embedded Adobe flash videos from websites.
- Type: sudo -s apt-get update. This will update your repository sources.
- Type: sudo -s apt-get install perl. This will install the Perl, programming language, you will need Perl in order to run your FlashVideoCapture.pl script.
- Type: sudo -s apt-get install lsof. This will install lsof if it is not already installed.
- Type: sudo -s apt-get install firefox. This will install the Mozilla Firefox web browser.
- Type: sudo -s apt-get install vlc. This will install the VLC multimedia player in order to playback your captured *.flv videos.
- Important Note: You must use the Firefox browser to view your FLV videos because this does not work in Google Chrome.
- Open up a text editor such as gedit or nano.
- Type: gedit FlashVideoCapture.pl
- Type: nano FlashVideoCapture.pl
- Type the following perl script located in the box below and save it as FlashVideoCapture.pl:
#!/usr/bin/perl[[Image:Capture Adobe Flash Videos on Ubuntu Linux Step 1 Version 5.jpg|center]] #Filename: FlashVideoCapture.pl use strict;[[Image:Capture Adobe Flash Videos on Ubuntu Linux Step 2 Version 5.jpg|center]] ################################################## #Setup the variables[[Image:Capture Adobe Flash Videos on Ubuntu Linux Step 3 Version 5.jpg|center]] ################################################## my $PROGNAME = $0; $PROGNAME =~ s|.*/||; my $LSOF = 'lsof'; my $FIND = 'flash'; # Find flash files my $POST = 'flv'; # Postfix to save to #Where we save files[[Image:Capture Adobe Flash Videos on Ubuntu Linux Step 4 Version 5.jpg|center]] #%f is $FIND[[Image:Capture Adobe Flash Videos on Ubuntu Linux Step 5 Version 5.jpg|center]] #%d is the next available number[[Image:Capture Adobe Flash Videos on Ubuntu Linux Step 6 Version 5.jpg|center]] #%p is .$POST my $DEST = "found%f.%d%p";[[Image:Capture Adobe Flash Videos on Ubuntu Linux Step 7 Version 5.jpg|center]] ################################################## #Usage[[Image:Capture Adobe Flash Videos on Ubuntu Linux Step 8 Version 5.jpg|center]] ################################################## sub fatal { foreach my $msg (@_) { print STDERR "[$PROGNAME] ERROR: $msgn"; } exit(-1); } sub usage { foreach my $msg (@_) { print STDERR "ERROR: $msgn"; } print STDERR <<USAGE; Usage:t$PROGNAME [-d] Copies deleted flash files currently open in your browser's cache -d Set debug mode -find What to search for [default $FIND] -post Postfix for saving files [default $POST] -dest Or just specify full destination [default $DEST] (see the script for meanings of %f, %d, %p) USAGE exit -1; } sub parseArgs { usage("You need to be on a system that uses /proc") unless -d '/proc'; my $opt = { find => $FIND, post => $POST, dest => $DEST, }; while (my $arg=shift(@ARGV)) { if ($arg =~ /^-h$/) { usage(); } if ($arg =~ /^-d$/) { $MAIN::DEBUG=1; next; } if ($arg =~ /^-find$/) { $opt->{find} = shift(@ARGV); next; } if ($arg =~ /^-post$/) { $opt->{post} = shift(@ARGV); next; } if ($arg =~ /^-dest$/) { $opt->{dest} = shift(@ARGV); next; } if ($arg =~ /^-/) { usage("Unknown option: $arg"); } usage("Too many files specified [$arg and $opt->{file}]") if $opt->{file}; } usage("You need to specify a destination with -dest") unless $opt->{dest}; usage("You need to specify something to search for with -find") unless $opt->{find}; $opt; } sub debug { return unless $MAIN::DEBUG; foreach my $msg (@_) { print STDERR "[$PROGNAME] $msgn"; } } ################################################## #Main code[[Image:Capture Adobe Flash Videos on Ubuntu Linux Step 9 Version 5.jpg|center]] ################################################## sub findFiles { my ($opt) = @_; my @found; #'lsof /' (The '/' just does files, no sockets, and is faster) open(LSOF,"$LSOF /|") || usage("Can't run [$LSOF]"); while () { next unless /delete/i; next unless /Q$opt->{find}E/i; next if /.adobe/; # Ignore adobe 'flash' db files chomp;[[Image:Capture Adobe Flash Videos on Ubuntu Linux Step 10 Version 4.jpg|center]] #procname pid user fd usage("Found it, can't parse it [$_]") unless /^S+s+(d+)s+S+s+(d+)/; push(@found, [$1,$2]); } usage("Couldn't find any deleted cached $opt->{find} files") unless @found; @found; } sub procPath { my ($pid,$fd) = @_; my $path = "/proc/$pid"; usage("Couldn't find $path") unless -d $path; $path .= '/fd'; usage("Couldn't find $path") unless -d $path; $path .= "/$fd"; usage("Couldn't read $path") unless -e $path; $path; } sub destPath { my ($opt) = @_; my $p = $opt->{dest}; $p =~ s/%f/Q$opt->{find}E/g; $p =~ s/%p/.Q$opt->{post}E/g; my $num = 0; my $path; do { $path = $p; $num++; $path =~ s/%d/$num/g; } until ! -f $path; $path; } sub main { my $opt = parseArgs(); my @found = findFiles($opt); foreach my $found ( @found ) { my $src = procPath(@$found); my $dest = destPath($opt); print "$src -> $destn"; system("/bin/cp",$src,$dest); } } main();
Part 2 of 3:
Configuring a Capture Directory and Enabling the FlashVideoCapture.pl Script
- Copy the FlashVideoCapture.pl script to your /home/"your_user_name"/Videos directory.
- You will either need to change into your Videos directory or create a dedicated directory where you store your multimedia videos.
- Create a directory. If you don't have a Videos directory on your system, the command below will allow you to create one.
- Type:mkdir -p /home/"your_user_name"/ Videos.
- This command will create your Videos directory.
- Type: cd /home/"your_user_name"/.
- Change into your home directory.
- Type: cp -r FlashVideoCapture.pl /home/'your_user_directory'/Videos
- Copy the FlashCaptureVideo.pl script to your Videos directory.
- Type: cd /home/'your_user_name'/Videos.
- Once the FlashVideoCapture.pl script is in your Videos directory, you will open up terminal and change into your Videos directory.
- Type: chmod +x FlashVideoCapture.pl.
- This command will make the FlashvideoCapture.pl perl script executable.
- Type:mkdir -p /home/"your_user_name"/ Videos.
Part 3 of 3:
Capturing Your Flash Video
- Start up your Firefox web browser and go to a site which has embedded flash videos in it.
- Allow the Flash video to play/load in the web browser until it is completely loaded into the browsers cache. You can tell the video has completely loaded by the grey bar at the bottom of the Flash video, which will usually indicate the load and completion of the video. Once the grey bar load cycle is complete and 100% of the video has been loaded it's time to capture the video stored in your web browsers cache.
- Keep your Firefox web browser open with the video completely loaded. Return to your open terminal and run the FlashVideoCapture.pl script by issuing the following command:
- Type: cd /home/"your_user_name"/Videos
- This will change you into your Videos directory, make sure you are in the Videos directory and you have the FlashVideoCapture.pl script in this directory.
- Type: ./FlashVideoCapture.pl
- This command will execute the FlashVideoCapture.pl script and capture the *.flv video files to your /home/"your_user_name"/Videos directory.
- Type: cd /home/"your_user_name"/Videos
- Review the results. If this was done correctly, you will see a statement such as this:
- /proc/13509/fd/28 -> foundflash.1.flv
- This means the flash video was captured as foundflash1.flv. In order to view the video you can use the VLC mediaplayer to view the captured *.flv file.
- /proc/13509/fd/28 -> foundflash.1.flv
- Play back your captured *.flv video files. Make sure you are in the /home/"your_user_name"/Videos directory before running the following commands.
- Type: cd /home/"your_user_name"/Videos
- Type: vlc foundflash1.flv.
- or
- Type: vlc *.flv
- This will playback all *.flv video files stored in your /home/"your_user_home"/Videos directory.
- Rename the foundflash1.flv to anything you like. So that you can view the captured *.flv video over and over again using the VLC media player without loading it from your Firefox web browser.
3.5 ★ | 2 Vote
You should read it
- How to Unblock Flash Player
- How to Install Flash Player on Ubuntu
- How to watch videos on the web after removing Flash
- How to update Flash Player on your computer
- New improvements in Adobe Flash Player 10.1
- Theory - What is Active Directory?
- The painful and prolonged death of Flash
- 8 tips to help flash games run faster
May be interested
- Fix Flash errors when watching videos on YouTubeflash-related errors that youtube uses to play videos can cause problems such as videos showing only blue screens, browser errors ... the following solutions will help you solve this problem.
- Adobe said goodbye to Flash Media Player by 2020in a joint statement with apple, facebook, google, microsoft and mozilla, adobe announced plans to stop supporting adobe flash media player by 2020.
- Run Linux from USB Flash Drivedo you want to run linux anytime, anywhere? in this article, we will show you what you can do with popular linux distributions like puppy linux, ubuntu, and fedora to be able to launch directly from a usb drive.
- Instead of killing Flash, we should save it for posterityadobe has decided to launch flash player in 2020, but not only has important implications in internet history, flash also contains a lot of content that we probably won't want to leave.
- Watch YouTube videos on Linux Mint 11 with Minitubein the following article, we will guide and introduce you to a support tool for watching youtube videos on the desktop platform, specifically the linux mint 11 operating system called minitube - essentially 1 chapter with a graphical interface, where the user can enter the search keyword, the system will fully display the return list with information
- How to use Adobe Flash after it was discontinuedadobe flash has officially entered the end-of-life (eol - death) phase starting december 31, 2020.
- What is Adobe Animate? Overview of Adobe Animatewhat is adobe animate? previously, adobe provided users with adobe flash software to create 2d cartoons and animated animations by drawing characters. however, the fate of adobe flash is not very good, it is not used by many people because the tools are very 'imprisoned' and unreasonable.
- 8 ways Ubuntu changes and improves Linuxubuntu is the most prominent linux distribution in the world. ubuntu and its developer, canonical, have been plagued by a lot of fuss over the years, but the linux world is getting much better thanks to both.
- How to Install Flash Player on Ubuntuflash is no longer being developed for linux, and the newest versions are only available built-in to chrome. if you use the chromium browser, you can extract the flash plugin from chrome and use it. if you use firefox, you'll need to...
- Tips and tricks after installing Ubuntuubuntu is one of the completely free open source operating systems. this is a distribution (distro) of linux with the second highest amount of traffic after linux mint.