Do you really wanna a script to save the streamed youtube video? Here is it, but there are some conditions. You should stream the video once in your google chrome without buffering. I tried this script on my Ubuntu with Google chrome
and I find it successful. I prefer not to play the video while it streams, because we can't save a video which shown buffering or loading while we playing it.
Save the script below as a shell script. Please create a folder named flvs in your ~/Videos/ directory or change the path of OUTPUTDIR to some existing directory.
You can execute this script by copy paste this to your terminal and press enter.
If you are using firefox as browser, I am not sure this script will work even after changing the CACHE directory. I haven't tested this script with firefox or any other Linux distributions. Please feel free to test this on other environments and lemme know whether it works for you. I am awaiting for your response on comments.
So before I conclude, please keep in mind
- stream your video without buffering
- create or update path of OUTPUTDIR
- make sure you are on Ubuntu with Google chrome
- make sure the path to CACHE is correct