VideoCache
Videocache is no longer in development.

Video cache doesn't care about video quality

by imriz on 21 Feb 2009

Hi,

Some videos in youtube has two versions - low quality and high quality. videocache will cache the first version requested.

I suggest breaking the youtube cache dir into more subdirs per quality.

7 Answers

by imriz on 22 Feb 2009

Oh, and another question - As far as I understand the code, it doesn't remove a 'begin' argument from the URL, if one is present. This could lead to the caching of incomplete files.
Am I right?

by pyromania on 22 Feb 2009

I've noticed this too with RedTube videos. A request will come in like,

http://dl.redtube.com/_videos_t4vn23s9jc5498tgj49icfj4678/0000015/J1DDZG1L6.flv?start=8833770

Videocache will download from that URL and the cached video was missing the first 2 minutes of the video. If you removed the start= or use start=0 you can download the complete video.

by Kulbir Saini on 22 Feb 2009

Imriz, Pyromania,

Youtube videos are not yet supported in all the formats. I hope they'll be supported very soon.

On the other hand, the start or begin tags are hard to detect for me as I don't have huge access logs for those websites. I test it as a sole user and you know I can't generate much traffic as a sole user itself. If you guyz can provide me with access logs for these websites, it'd be wonderful.

Thank You!

by imriz on 22 Feb 2009
http://www.youtube.com/get_video?video_id=-krxqcfwqhU&begin=524346&t=vjVQa1PpcFN0IoeCtoVsyg4lQpoptG487bvWlUOM3Qc=&el=detailpage&ps=&fmt=34
http://www.youtube.com/get_video?video_id=-krxqcfwqhU&t=vjVQa1PpcFN0IoeCtoVsyg4lQpoptG487bvWlUOM3Qc=&el=detailpage&ps=&fmt=34

try both URLS with wget or some other URL fetcher, and see the difference in sizes

by Kulbir Saini on 22 Feb 2009

Imriz,

Got it. We need to drop the begin argument from the query. I'll see to it.

Thank You!

by imriz on 23 Feb 2009

Don't forget the quality issue (the fmt argument in the query).

I would suggest either appending it to the file name (.), or breaking the cache directory into more sub dirs (/youtube//)

by pyromania on 24 Feb 2009

RedTube and Tube8 seem to both use a start= URL parameter. Here are some logs for a singe video request for redtube and tube8

2009-02-22 15:32:24,094 10356 XXX.XXX.XXX.XXX - REQUEST - http://dl.redtube.com/_videos_t4vn23s9jc5498tgj49icfj4678/0000014/I1DDLG10M.flv?start=0
2009-02-22 15:32:24,101 10356 XXX.XXX.XXX.XXX I1DDLG10M.flv URL_HIT REDTUBE http://dl.redtube.com/_videos_t4vn23s9jc5498tgj49icfj4678/0000014/I1DDLG10M.flv?start=0
2009-02-22 15:32:24,892 10356 XXX.XXX.XXX.XXX I1DDLG10M.flv NEW_URL REDTUBE http://dl.redtube.com/_videos_t4vn23s9jc5498tgj49icfj4678/0000014/I1DDLG10M.flv?start=0
2009-02-22 15:34:20,068 10356 XXX.XXX.XXX.XXX - REQUEST - http://dl.redtube.com/_videos_t4vn23s9jc5498tgj49icfj4678/0000014/I1DDLG10M.flv?start=6875623
2009-02-22 15:37:18,480 10356 XXX.XXX.XXX.XXX - REQUEST - http://dl.redtube.com/_videos_t4vn23s9jc5498tgj49icfj4678/0000014/I1DDLG10M.flv?start=18669907
2009-02-22 15:39:10,650 10356 XXX.XXX.XXX.XXX - REQUEST - http://dl.redtube.com/_videos_t4vn23s9jc5498tgj49icfj4678/0000014/I1DDLG10M.flv?start=29071972
2009-02-22 15:39:18,119 10356 XXX.XXX.XXX.XXX - REQUEST - http://dl.redtube.com/_videos_t4vn23s9jc5498tgj49icfj4678/0000014/I1DDLG10M.flv?start=32510308
2009-02-22 15:39:38,293 10356 XXX.XXX.XXX.XXX - REQUEST - http://dl.redtube.com/_videos_t4vn23s9jc5498tgj49icfj4678/0000014/I1DDLG10M.flv?start=37902808
2009-02-22 15:39:40,108 10356 XXX.XXX.XXX.XXX - REQUEST - http://dl.redtube.com/_videos_t4vn23s9jc5498tgj49icfj4678/0000014/I1DDLG10M.flv?start=43883683
2009-02-23 23:03:41,399 10356 XXX.XXX.XXX.XXX - REQUEST - http://media01.tube8.com/flv/cd12f7e35664ae56455e4df9a8b357ad/49a37f8b/0902/23/49a3127126b1e/49a3127126b1e.flv
2009-02-23 23:03:41,416 10356 XXX.XXX.XXX.XXX 49a3127126b1e.flv URL_HIT TUBE8 http://media01.tube8.com/flv/cd12f7e35664ae56455e4df9a8b357ad/49a37f8b/0902/23/49a3127126b1e/49a3127126b1e.flv
2009-02-23 23:03:42,243 10356 XXX.XXX.XXX.XXX 49a3127126b1e.flv NEW_URL TUBE8 http://media01.tube8.com/flv/cd12f7e35664ae56455e4df9a8b357ad/49a37f8b/0902/23/49a3127126b1e/49a3127126b1e.flv
2009-02-23 23:04:19,476 10356 XXX.XXX.XXX.XXX - REQUEST - http://media01.tube8.com/flv/cd12f7e35664ae56455e4df9a8b357ad/49a37f8b/0902/23/49a3127126b1e/49a3127126b1e.flv?start=3324917
2009-02-23 23:04:26,749 10356 XXX.XXX.XXX.XXX - REQUEST - http://media01.tube8.com/flv/cd12f7e35664ae56455e4df9a8b357ad/49a37f8b/0902/23/49a3127126b1e/49a3127126b1e.flv?start=4808498
2009-02-23 23:04:33,074 10356 XXX.XXX.XXX.XXX - REQUEST - http://media01.tube8.com/flv/cd12f7e35664ae56455e4df9a8b357ad/49a37f8b/0902/23/49a3127126b1e/49a3127126b1e.flv?start=5937644
2009-02-23 23:04:34,799 10357 XXX.XXX.XXX.XXX - REQUEST - http://media01.tube8.com/flv/cd12f7e35664ae56455e4df9a8b357ad/49a37f8b/0902/23/49a3127126b1e/49a3127126b1e.flv?start=7068711
2009-02-23 23:04:40,702 10356 XXX.XXX.XXX.XXX - REQUEST - http://media01.tube8.com/flv/cd12f7e35664ae56455e4df9a8b357ad/49a37f8b/0902/23/49a3127126b1e/49a3127126b1e.flv?start=6497976
2009-02-23 23:04:48,861 10356 XXX.XXX.XXX.XXX - REQUEST - http://media01.tube8.com/flv/cd12f7e35664ae56455e4df9a8b357ad/49a37f8b/0902/23/49a3127126b1e/49a3127126b1e.flv?start=8193654
2009-02-23 23:04:50,926 10356 XXX.XXX.XXX.XXX - REQUEST - http://media01.tube8.com/flv/cd12f7e35664ae56455e4df9a8b357ad/49a37f8b/0902/23/49a3127126b1e/49a3127126b1e.flv?start=9884679
2009-02-23 23:04:53,123 10356 XXX.XXX.XXX.XXX - REQUEST - http://media01.tube8.com/flv/cd12f7e35664ae56455e4df9a8b357ad/49a37f8b/0902/23/49a3127126b1e/49a3127126b1e.flv?start=12141341
2009-02-23 23:05:07,754 10357 XXX.XXX.XXX.XXX - REQUEST - http://media01.tube8.com/flv/cd12f7e35664ae56455e4df9a8b357ad/49a37f8b/0902/23/49a3127126b1e/49a3127126b1e.flv?start=14398279
2009-02-23 23:05:10,667 10356 XXX.XXX.XXX.XXX - REQUEST - http://media01.tube8.com/flv/cd12f7e35664ae56455e4df9a8b357ad/49a37f8b/0902/23/49a3127126b1e/49a3127126b1e.flv?start=25096323