Community discussions

MikroTik App
 
Hellbound
Long time Member
Long time Member
Topic Author
Posts: 508
Joined: Tue Oct 26, 2004 11:21 am

caching youtube

Tue Feb 13, 2007 7:45 pm

hi guys
I'm trying to figure a way to allow caching for youtube videos,
once it was watched by a person it won't need to be loaded again
for subsequently.

however youtube uses some sort of format like this:
/player2.swf?video_id=rP9nKx_A8lc&l=40&t=OEgsToPDskKqdJDvUE5y3_0RDcS-mEVx&s=05714B4363F34023:8A51374783A7BCE6
which I don't know how to put into cache expression.
no matter what I treid, there was no result to be able to cache this format.

any help is highly appreciated
thanks.
 
Hellbound
Long time Member
Long time Member
Topic Author
Posts: 508
Joined: Tue Oct 26, 2004 11:21 am

Tue Feb 13, 2007 7:47 pm

I would like to add that: Webproxy package or proxy-test package would truncate the url into this:
/player2.swf?
and the rest is gone.
 
User avatar
chvdr
Member
Member
Posts: 403
Joined: Thu Sep 22, 2005 8:53 pm

Tue Feb 13, 2007 10:38 pm

Hi,
Is it possible to do with MT? I think that its possible to use some viveostream technique with linux or even windows, but... it's very interesting if done with MT

regards, C. G.
 
virtualmystic
Frequent Visitor
Frequent Visitor
Posts: 77
Joined: Fri Jan 19, 2007 7:09 pm
Location: Lahore, pakistan

Wed Feb 14, 2007 10:34 am

well for youtube, these url's are basically redirected to flv files..which are played in swf player..so what you need to do is cache all flv files.. and as MT cache is not configureable..you cannot modify its setting..

if using normal squid box...this can be done using refresh_patterns

regds,
Asad
 
Hellbound
Long time Member
Long time Member
Topic Author
Posts: 508
Joined: Tue Oct 26, 2004 11:21 am

Wed Feb 14, 2007 12:27 pm

well for youtube, these url's are basically redirected to flv files..which are played in swf player..so what you need to do is cache all flv files.. and as MT cache is not configureable..you cannot modify its setting..

if using normal squid box...this can be done using refresh_patterns

regds,
Asad
you can define what pattern to cache in MT, its just I don't know a working expression for this.

thanks
 
virtualmystic
Frequent Visitor
Frequent Visitor
Posts: 77
Joined: Fri Jan 19, 2007 7:09 pm
Location: Lahore, pakistan

Wed Feb 14, 2007 1:42 pm

you can define what pattern to cache in MT
well then if you have a working example...e.g like pattern for .exe, just replace .exe with .flv

Asad
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26378
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Wed Feb 14, 2007 1:44 pm

is it this thing you are looking for?
http://www.mikrotik.com/testdocs/ros/2. ... 7069555302

regex examples for the `url` setting:
http://www.mikrotik.com/testdocs/ros/2. ... 9646522236
 
Hellbound
Long time Member
Long time Member
Topic Author
Posts: 508
Joined: Tue Oct 26, 2004 11:21 am

Wed Feb 14, 2007 2:12 pm

I have read that and I did something like this:
add url="http://www.youtube.com/player2.swf*" action=allow comment="" \
    disabled=no 
but it doesn't work !

however if I add this to ACCESS section to deny this element, you tube website works fine and it will successfully block the video element only.!!!

I think there is a problem with web-proxy and proxy-test package.

I tried both of them. proxy-test was so unstable as beside this
Last edited by Hellbound on Wed Feb 14, 2007 2:18 pm, edited 1 time in total.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26378
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Wed Feb 14, 2007 2:13 pm

incorrect rule! why are you adding swf if we were talking about fmv ?
[admin@MikroTik] ip web-proxy cache> add url=":\\.flv$" action=allow
 
Hellbound
Long time Member
Long time Member
Topic Author
Posts: 508
Joined: Tue Oct 26, 2004 11:21 am

Wed Feb 14, 2007 2:24 pm

it still doesn't work! I tried that just now. it still take it from youtube server.

can you try it yourself and tell me where might be the problem?

even though the content might be FLV , I don't think youtube put flv anywhere in expression.
 
User avatar
chvdr
Member
Member
Posts: 403
Joined: Thu Sep 22, 2005 8:53 pm

Thu Feb 15, 2007 5:13 am

incorrect rule! why are you adding swf if we were talking about fmv ?
[admin@MikroTik] ip web-proxy cache> add url=":\\.flv$" action=allow
hellbound, that works on me
 
Hellbound
Long time Member
Long time Member
Topic Author
Posts: 508
Joined: Tue Oct 26, 2004 11:21 am

Thu Feb 15, 2007 8:22 am

incorrect rule! why are you adding swf if we were talking about fmv ?
[admin@MikroTik] ip web-proxy cache> add url=":\\.flv$" action=allow
hellbound, that works on me
hi,
What version are you using?
are u testing it on youtube ?

thanks
 
Hellbound
Long time Member
Long time Member
Topic Author
Posts: 508
Joined: Tue Oct 26, 2004 11:21 am

Sat Feb 17, 2007 11:54 am

I tried it on 2 different box with two different ISP and still the same.

can someone help me on this please?

what could be wrong?
 
Hellbound
Long time Member
Long time Member
Topic Author
Posts: 508
Joined: Tue Oct 26, 2004 11:21 am

Sat Feb 17, 2007 2:29 pm

ok guys,
I found the solution,

here it is:
add url="http*youtube*get_video*" action=allow comment="youtube" disabled=no
hope it might help someone else as well.
 
cicserver
Member
Member
Posts: 303
Joined: Sun Jul 24, 2011 12:04 pm

Re:

Sun Apr 08, 2012 8:36 pm

ok guys,
I found the solution,
here it is:
add url="http*youtube*get_video*" action=allow comment="youtube" disabled=no
hope it might help someone else as well.
You mean to say that you can now cache Youtube Videos in Mikrotik Web Proxy , BUT I doubt that because I have searched everywhere and everone told me that Mikrotik web proxy is not capable of doing youtube cache that's why I added Squid Proxy server and doing cache on it using following guide.

http://aacable.wordpress.com/2012/01/19 ... oreurl-pl/

http://aacable.wordpress.com/2012/01/11 ... tik-queue/

However it would be interested if same can be achieved via Mikrotik Web.Proxy :lol:
 
User avatar
Thor187
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Sat Oct 21, 2017 10:21 pm

Re: caching youtube

Thu Nov 14, 2019 9:39 pm

Can one cache Youtube in 2019?

Since everything is HTTPS nowadays I assume caching is no longer possible? (Squid etc)
 
msatter
Forum Guru
Forum Guru
Posts: 2912
Joined: Tue Feb 18, 2014 12:56 am
Location: Netherlands / Nīderlande

Re: caching youtube

Thu Nov 14, 2019 9:44 pm

Are you sure you did not use a shuffle instead of a hammer today.

Who is online

Users browsing this forum: mquan1984 and 115 guests