Youtube not caching
-
Dear all,
I am new in pfsense, I have installed pfsense 2.6.0 + squid 0.4.45_8 and tried to cache youtube video by implementing https caching settings. However, i am able to cache youtube images and facebook contents but youtube video always shows TCP_MISS/200 for all youtube videos and does not hit any cache for repeated views in many times.
I am using refresh_pattern as per https://forum.netgate.com/topic/172137/any-recommendations-this-custom-refresh_pattern
but still no luck for youtube caching. Can anyone give me any idea about this ?Thanks
-
Because Youtube does everything in their power (and they have the power) you not being able to cache
Youtube has their reasons of course, as they do not want to get "cloned", and I guess it also has to do with the fact they want to include 'publicly' when they see fit.See for example here : https://wiki.squid-cache.org/ConfigExamples/DynamicContent/YouTube
Youtube also saw that article so they had the walk-through to make that impossible, as the article stated at the beginning. -
@gertjan thanks for your reply. I am bit concern how bmsoftware.org is caching youtube content as i have used their service and its works perfectly. Though, their charge is bit high thats why was wondering to use squid to cache youtube content. I also have seen 1/2 years back video shows that squid could cache youtube content in pfsense. Thats why wondering is there any custom work to do to cache youtube content on pfsense environment?
-
@syfullah said in Youtube not caching:
wondering is there any custom work to do to cache youtube content on pfsense environment?
Because :
bmsoftware.org probably took a proxy like squid, hired a programmer, as more then just 'configuration' has to be done.
Each video request from youtube.com contains a non-random but changing argument next to the video name
so every chunk of video has it's own constantly randomised file name.
A browser based build in, video player just "plays" the chunk as they come in.
Storing them, and then figuring out it which order to send them to a player, is total mission impossible for a machine, and a piece of cake for a human viewer.The key thing is : you must be more clever as the ones behind the Youtube video delivery engine.
You pull this one of, and you'll receive an phone call from Google, and they will offer you a job that you can't turn down ;)Btw : I just highlight (kind-a) one scheme. They use more schemes. And they will change schemes all the time.
-
@gertjan cheers mate thanks for the the clarification. I will try to get in deep on this will share here if get any outcome. Thanks again.