This is an old trick but one that some of you are probably still unaware of. What to do is go to the page where the video is located and wait for it to finish loading. On YouTube, the upload is represented by a red line that grows below the play line.
Once everything had loaded, and without closing the explorer, I opened Nautilus and opened the folder / tmp /. There you will see, among other things, a file with a strange name that probably includes the word "Flash". Done, just subtract to copy that file to the place you like the most. 🙂 It's that simple. Eye! This trick works on Ubuntu, but not all distros save these videos in the same directory. It is possible that in your distro the directory is different, but the logic is the same. You just have to find the path where the temporary Flash files are saved. Doesn't it work for you in Ubuntu with Flash 64 bit? I kept reading ... |
The above trick works for 32 bit Flash. The steps to follow in Ubuntu when using Flash 64 bit are a bit more complicated ... Here is the explanation made by Codix in the forum Ubuntu-is:
With the new 64-bit square flash player for linux when you view a video from youtube, or another video portal and go to the folder / Tmp you hope to find the temporary file that the flash player works with (in this case square). But you can't find it, and you wonder where it will be.
After thinking a bit, the best way to see if there is a temporary file that the flash player works with is through the command lsof.
In previous versions, flashplayer named the temporary files as Flashxxxxxx, where xxxxx is an alphanumeric code that flashplayer gave it to recognize it among other temporary files so I tried with
lsof | grep Flash
… And the result was:
plugin-co 15026 codix 18u REG 8,6 7599390 131035 / tmp / FlashXXnM8s5K (deleted)
I ran again:
lsof | grep Flash
The result:
plugin-co 15026 codix 18u REG 8,6 21912531 131035 / tmp / FlashXXnM8s5K (deleted)
This is when I saw that the file, despite being in a deleted state, kept increasing in size - the video had not been completely downloaded. I thought that if it kept downloading there was only one way to copy, rather, recover the file. So I waited for the video to download completely. When that was fulfilled, from the console I did:
ls -l / proc / open_process_identifier / file_descriptor
the process identifier is in the second column (15026) and the file descriptor is the fourth column without the letter (18)
ls -l / proc / 15026 / fd / 18
The result:
lrwx ------ 1 codix codix 64 2010-10-16 23:21 / proc / 15026 / fd / 18 -> / tmp / FlashXXnM8s5K (deleted)
At last I was able to recover with a simple cp statement file_to_copy copy_file_path the happy video downloaded by flashplayer.
cp / proc / 15026 / fd / 18 our_video.flv
Finally, it only remains to check with vlc, or totem, caffeine, xine or mplayer that the video plays correctly. 😀
Although a bit late, but here is a script in case it helps someone.
#! / Bin / bash
# ************************************************* ************************************************** * #
# Aquest script to locate the temporary fitxers when it is reproduced in flash video to Firefox #
# Primer retrieves the information of the fitxers oberts to the system with LSOF and the Flash filters and tmp #
# Després per mitja d'un loop retrieves the information of each fitxer that is necessary for the copy #
# If the copy is correct, it donates a sortida missatge of the script #
# #
# Cal remember that a cop is your page on this allotjat the video, the temporary fitxer is lost #
# ************************************************* ************************************************** * #
# Locate temporary fitxers
OnEs = $ (lsof | grep Flash | grep tmp)
# Start the buyer
i = 0
# Fa a loop for each fitxer trobat
for parameters in $ OnEs
do
# Extreu els paràmetres necessaris per fer the copy of the information rebuda
case $ i in
1) identifier = $ parametres ;; 3) descriptor = $ {parametres %% »u» *} ;; 8) fitxer = $ {parametres ## * »/»} ;;
esac
# Increase the buyer of each parameter rebut
let i ++
# For each loop there is a copy
if [$ i -eq "10"]; then i = 0; cp / proc / $ identifier / fd / $ descriptor /home/portatil/Desktop/$fitxer.flv 2> / tmp / null; control = $?
# Missatge by sortida
if [$ control -eq "0"]; then echo "Fitxer successfully copied to /home/portatil/Deskfrtop/$fitxer.flv"; else echo "There was an error copying the fitxer"; fi
fi
done
exit
Hi I have a problem .. I did everything as you explained and when I played the video with VLC it only reproduced the sound, so I opened the file with Totem and the same .. Only sound, could you give me a hand? Excellent Post Equal (Y)
A little old now but it still works ... I have 11.10-bit Ubuntu 32 and it works but using the 64-bit method ... I don't know if it's because it's a more current Ubuntu ... anyway, thank you very much ... it works 100%
the post a bit old but it still works ... I have the 11.10-bit ubuntu 32 but the trick works with the 64-bit one, I think it's because the ubuntu is more current ... it has served me a lot and it works 100%
Hi. very Good the post.
It helped me a lot. !!
thanks!
You're welcome! As always, a pleasure!
Hug and Merry Christmas! Paul.
Hey hey, what if the video is AVI or MPEG-4?
Hello! It turns out that this trick could be done with Ubuntu Jaunty, but now that I have Lucid installed it doesn't work for me. In the tmp folder there are folders and files and none of them is the video ... Nor does it appear as a hidden file, do you know what that could be due to?
Thank you!
Well that's as long as it's the 32-bit version or the 64-bit version emulated with ndiswrapper (was it written like that?)
If you have the native 64b, the way to recover the videos is more difficult and here is the explanation in case you want to add it:
http://www.ubuntu-es.org/node/141478#comment-404172
This trick stopped working for me on 64-bit Ubuntu when I started using the flashplugin square. So I uninstalled it and went back to the old flash with nspluginwrapper.
It may be because you have the 64-bit version of Flash installed. Apparently this trick doesn't work with that version.
I think that with this it would be worth ...
cd / directory / where / you want / save / the / video
string = »$ (lsof | grep Flash | head -1)» && cad1 = »$ (echo $ string | cut -d '' -f 2)» && cad2 = »$ (echo $ string | cut -d '' -f 4 | cut -d 'u' -f 1) »&& ls -l / proc / $ cad1 / fd / $ cad2 && cp / proc / $ cad1 / fd / $ cad2 videoFlash.flv
by the way thanks for the trick! 😉
The truth is I do not know. If you find out, let us know! 🙂
Cheers! Paul.
It is true! Thank you very much for your contribution!
Cheers! Paul.
I have 64-bit flash and the files are saved in the cache folder of firefox. The funny thing is that soon after they are completely downloaded, they are erased, and if they occupy more than 64 megabytes, they are also erased ……
The solution has been to install the extension flashgot and perfect
Note that this also explains how to get the files, even with 64-bit flash.
Cheers! Paul.
I'm glad it helped you to complete the article
Hug!
good puff !!!! thanks!
God, thank you !!! You just saved my life !!!
Eye! It seems to me that in Flash 10.2 this cannot be done anymore ... 🙁
Cheers! Paul.
Excellent contribution thanks…. I was going crazy
Great, it served me very well.
And I extended from your algorithm, to save several together. It's certainly not the best, although it works well (I think). I think the problem is in the use of the "tail", I used it more by instinct than by knowing, so I don't know how long it "holds". For 3 videos, 2, 1 .. 4 .. it goes well .. I don't know if 10 or 20 would work well.
ALG:
[code = »Remember me»]
#! / bin / bash
## Remember me.
## Help: the first argument passed to the program is the path where the files will be saved.
cd $ 1
turns = »$ (lsof | grep -c Flash)»
while [$ turns -gt 0]
do
string = »$ (lsof | grep Flash | tail - $ turns)»
c1 = »$ (echo $ string | cut -d '' -f 2)»
c2 = »$ (echo $ string | cut -d '' -f 4 | cut -d 'u' -f 1)»
ls -l / proc / $ c1 / fd / $ c2 && cp / proc / $ c1 / fd / $ c2 video- $ turns
turns = `expr $ turns - 1`
done
[/ Code]
The improvements can be given in not entering so many times with the "grep Flash", saving everything previously (I don't know how to do it without losing the line breaks) and also using the same value "c1" that (I think) is not modified, I don't know in large quantities.
Greetings.
Ger.
Thanks Ger! A hug! Paul.
Firefox users can also use the "UnPlug" extension, which allows downloading flash videos from almost any page. It is a comfortable option so you don't have to leave the browser. An interesting fact is that of all the available extensions, it is one of the lightest and fastest. Try it!
Mini Application Guide to download any video that is online with a player, as an example we have those from YouTube.
Note: It also downloads swf files.
Page: http://ayudaveloz.blogspot.com/2012/11/aplicaciones.html
A problem. When I go to watch a YouTube video, sometimes (or some videos) they don't load whole (the gray bar). And in these cases when doing the 'lsof grep Flash' nothing comes out, and therefore I can't do this trick. Any solution on how to make the bar fully charge, or is it that this is no longer flash?
PS: the html5 I have it disabled. (In case it will affect something)
It was working perfect until I update ubuntu to 14.04 🙁
The same thing happened to me when installing 14.04 it stopped working