YTCrack v0.14b ============== YTCRACK.TXT - Copyright (c) 2011, Fred C. Macall Overview YTCrack is a DOS program for extracting "videoplayback" URL(s) from freshly saved copies of YouTube Web pages. That is, Web pages with URLs like: http://www.youtube.com/watch?v=VideoIDCode Beginning with version 0.11b, YTCrack also works with freshly saved copies of video.google.com Web pages. That is, Web pages with URLs like: http://video.google.com/videoplay?docid=-1234567890123456789 Beginning with version 0.12b, YTCrack supports the itag=38 video properties and \uhhhh sequences we've found in Google's YouTube Web pages, since February or March 2011. (More about these things below.) Beginning with version 0.14b, YTCrack also supports the itag= 4x, 8x, and 10x video properties we've found in Google's YouTube Web pages, since around the middle of 2011. YTCrack produces its result(s) in a relatively small .HTM document or file. This document exposes anchor(s) or link(s), to the YouTube or video.google videoplayback URL(s) that YTCrack has extracted from a given YouTube or video.google Web page copy. This YTCrack result document may be used by a Web browser, without scripts nor "Flash" support, for downloading the YouTube or video.google video(s) its anchor(s) identify. The YouTube and video.google videos we've seen, so far, are .FLV, .MP4, and .WEB types. (We are using .WEB for .WebM, a relatively new video container type.) Some of these .MP4 and .WEB offerimgs appear to contain Side-by-Side SteroScopic 3D (SS3D) videos. Given a suitable video adapter and fast enough processor, all of these may be viewed with the latest DOS MPLAYER version. So, the whole process can be accomplished in DOS without scripts enabled and without Flash support. And, it yields downloaded video file(s) that don't have to be discovered in and retrieved from a cache directory. The video.google Web pages we've seen all carry a single videoplayback URL. However, the YouTube Web pages we've seen, so far, all carry two, six, or eight copies of each of three to fifteen unique videoplayback URLs. That is, a total of 6 to 56 videoplayback URLs! (Before March 2011, we always saw eight copies of each of three to six unique videoplayback URLs. Lately, we have been seeing two copies of each of three to fifteen unique videoplayback URLs.) So, after it has identified these, YTCrack weeds out all the duplicates -- to save you this effort. The unique videoplayback URLs remaining are distinguished and identified by their itag=nnn fields. These itag= values appear to identify each video's resolution and, perhaps, other characteristics. The itag= values we've seen so far are: itag= video resolution value type (w x h) 3D flag ===== ===== ================== 5 FLV 320 x 240 18 MP4 480 x 360 22 MP4 1280 x 720 34 FLV 480 x 360 35 FLV 640 x 480 37 MP4 1920 x 1080 38 MP4 2048 x 1080 43 WEB 480 x 360 44 WEB 640 x 480 45 WEB 1280 x 720 46 WEB 1920 x 1080 82 MP4 480 x 360 SS3D 84 MP4 1280 x 720 SS3D 100 WEB 480 x 360 SS3D 102 WEB 1280 x 720 SS3D Notes for table: Each itag= value always identifies the video type indicated above. The itag= values usually, but not quite always, identify the exact video pixels heights indicated. More often, they don't exactly idenfify the pixels widths indicated. For example: itag=35 always identifies an .FLV type video. That video is quite likely to be 480 pixels high. Its width may be in the range of 640 to 960 pixels. YTCrack uses no configuration or helper file or program and is intended to run on 8086/8088 based, and all later, IBM PC compatible PCs. It may need 300 KB to 400 KB of DOS memory, depending on the size of the given YouTube page. But, it requires only DOS v3.x, or later. In much of the rest of this document, we'll describe YTCrack's handling of YouTube and video.google Web pages and videoplayback URLs in common. In the few places where that isn't appropriate, we'll give details for both types. How It Works YTCrack starts off by checking for a pair of command line parameters that do not match each other. Finding anything else, it displays its Usage message and terminates. For the record, this message reads: Usage: YTCRACK Notes: specifies a fresh source copy of an http://www.youtube.com/watch?v= Web page. And, specifies an HTML page to be produced. The two file names must be different. YTCrack then opens both of its given files. And, reads through its input file looking for URLs of the form: httpvideoplayback Where: is any text that doesn't include space character(s), http, nor videoplayback . is any text that doesn't include http . is http or the end-of-file indication. YTCrack then looks through each URL it has found, for %hh sequences and back slash characters. All three character %hh sequences get replaced with the single character that the hex digits hh represent. And, this process gets repeated when %25 gets replaced by % . However, any % not followed by hh gets left as-is. Next, back slash characters are sought. All six character \uhhhh sequences get replaced with the single character that the least significant eight bits of hhhh represents. All remaining isolated back slash characters and one back slash from each pair of them get removed. Next, each URL's "tail" gets trimmed at the first non-hex digit character following any &id=hhhhhhhh . . . field present. This measure handles YouTube videoplayback URLs. video.google videoplayback URLs end with &key=ttn , instead of &id=hhhhhhhh . So, if it doesn't find &id= , YTCrack looks for &key= . Finding that, the URL's tail gets trimmed at the first non-decimal digit character following &key=tt . With its batch of videoplayback URL(s) clarified as explained just above, YTCrack looks through them all and eliminates any duplicate(s) present. As stated in the Overview section, there always seem to be two, six, or eight copies of each different or distinct URL, in YouTube (but not video.google) Web pages. Finally, YTCrack prepares a small html document exposing anchors or links containing the distinct videoplayback URL(s) that it has found. For all URL(s) that contain an &itag=& field, itag= gets used for the anchor's visible text. If matches one of the fifteen itag values listed in the table in the Overview section, the implied video file type, resolution, and any appropriate 3D flag get placed in the visible text, as well. In case an &itag=& field isn't present in a URL, the visible text: videoplayback URL number nn will be used. Where nn indicates the number of this videoplayback URL's first appearance in the given document's sequence of videoplayback URLs. Installation and Operational Considerations PKUNZIP YTCRAC14.ZIP into an empty directory. Copy the resulting files to where you want them. You may as well put YTCRACK.EXE in a directory on your Path. There is nothing to configure. YouTube and video.google seem to tailor their Web pages to their individual users. In particular, these Web pages seem to contain time stamps which cause their videoplayback URLs to quit working after a matter of days or sooner. Also, the videoplayback URLs seem to contain information that has to match at least part of the downloading user's IP address. Therefore, we suggest that you get a fresh copy of each YouTube or video.google Web page you want to use immediately before running YTCrack and downloading from its result document. YTCrack won't work with saved YouTube Web pages with URLs like: http://www.youtube.com/v/VideoIDCode or http://www.youtube.com/embed/VideoIDCode However, we have found that, for every valid VideoIDCode , there always seems to be a URL available with the required form. So, substitute: /watch?v= for /v/ or /embed/ in the URL you are attempting to use, and resave the page if necessary, when you run into an unusable YouTube URL. Acknowledgements and Copyright Notices YTCrack owes its existence to Glenn McCorkle and Ron Clarke, as well as to its author. First, Glenn informally published his technique for discovering videoplayback URL(s) in YouTube Web pages. Then, in his UNTUBE.EXE program, Ron provided a sample implementation of Glenn's technique. YTCRACK.EXE v0.14b and the libraries, materials, and tools used to make it contain the following Copyright notices: Borland C++ - Copyright 1991 Borland Intl. LZEXE.EXE Version 0.91 (c) 1989 Fabrice BELLARD Disclaimer This software is published in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. Fred C. Macall K8GIV 1019 Pennfield Road Cleveland Heights, Ohio, 44121, U.S.A. (216) 382-3415 For e-mail contact, run YTCrack . http://users.ohiohills.com/fmacall/ 15 November 2011