I know that in Windows, Internet Explorer stores .flv
temp files in temporary folder (C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files
) when viewing YouTube. And the same make and Google Chrome in Windows (C:\Users\%username%\AppData\Local\Google\Chrome\User Data\Default\Cache
). So it's easy to find a copy of that .flv
file.
How about Chromium in Ubuntu? Does it store browsing temp data and where?
I made a little research and now I can come with the answer that is not so simple as it seems at first sight.
I searched a lot on Google, and almost everything is pointing to the
~/.cache/chromium/Default
folder. It’s the folder where you should find google chrome’s cache files. But there are no big flash video files (like YouTube has), just small ones.In the end, to answer the question, I came to these conclusions:
ps
will do just fine:ps ax | grep flash
.Once you have this PID you can find out the name of video file that just was streamed on Youtube:
ls -l /proc/[*PID*]/fd | grep Flash
. You will see as result something like this:And here is the answer of the question: the last video file streamed on YouTube and cached on the system is:
Now, if you want, you should copy them anywhere on the system:
And now you have the last video watched on Youtube in your personal Videos collection.
I wrote a small bash script that automates the excellent solution from Radu:
I do it manually like this: define this alias in /etc/bash.bashrc
and create this script in /usr/local/bin/lsfd.sh
result:
then I know where the files are and use mplayer to see wich one I want. then manually copy.
Chromium keeps its cache files in various folders which might change from time (depending on the version?). So you should perhaps browse all of them to find what you are looking for.
And they are:
The youtube files you are interested in are mostly likely to be under one of the Media Cache folders, but without any file extension. Luckily, unlike Windows, Linux often detects file types irrespective of the extension. So you might recognize them with video file icons or even thumbnails.
I wrote new bash script for download flash video files using ubuntu 16.04 and chromium Version 62. thanks to this example from mcbarron
Also you can view on github repository
Chromium throws files into
.cache/chromium/Default
under theCache
andMedia Cache
folders.