Guide YouTube In better quality

Status
Not open for further replies.
This is a simple "guide" i thought i'll share.
add &fmt=18 to every youtube clip you watch to get the "high quality" version of the clip, even in clips you don't see the "watch in high quality" link underneath.
78540786vl7.png


44vs8.png


YouTube - Red Alert 3 - Cast Announcement Trailer #3

high quality:

63617680ep5.png

88179644av2.png


YouTube - Red Alert 3 - Cast Announcement Trailer #3

Most of the clips i tried worked.
 
  • Like
Reactions: 1 person
here's one I adapted from garry's script at AHK Forums



Command line YouTube link decrypter

(high quality batch decryption)

Code:
DownloadMgr=%PROGRAMFILES%\FlashGet\flashget.exe

F1  =YouTube.TXT

URL1=%1%

UrlDownloadToFile,%URL1%,%F1%

transform,ten,chr,10

transform,tre,chr,13

CF=%TRE%%TEN%

Fileread,AA,%F1%

stringreplace,AA,AA,%TEN%,%CF%,all

filedelete,%F1%

Fileappend,%AA%`r`n,%F1%

CONTEN=var fullscreenUrl =

VANAF2=&title=

UNTIL2=';

MP4=0

SEARCHFOR=">watch in high quality</a>

   Loop,Read,%F1%

      {

      LR=%A_LoopReadLine%

      if LR contains %SEARCHFOR%

             {

             MP4=1

             break

             }

      }

HSS=

HSS2=

SEARCHFOR=video_id=,l=,sk=,t=,hl=,plid=

   Loop,Read,%F1%

      {

      LR=%A_LoopReadLine%

      ifinstring,LR,%CONTEN%

             {

             Loop, Parse,LR ,`&,`

                {

                H%A_Index%  := A_LoopField

                if H%A_Index% contains %searchfor%

                   T%A_Index%:=A_LoopField

                if T%A_Index%<>

                   HSS=%HSS%%A_LoopField%&

                if A_loopfield contains title=

                   TITLE=%A_LoopField%

                H%A_Index%=

                T%A_index%=

                }

             stringreplace,TITLE,TITLE,title=,%nothing%,all

             stringreplace,TITLE,TITLE,`',%nothing%,all

             stringreplace,TITLE,TITLE,`;,%nothing%,all

             ; ---- replace at least portuguese letters --

             stringreplace,TITLE,TITLE,quot,%S%,all

             stringreplace,TITLE,TITLE,&quot,%S%,all

             stringreplace,TITLE,TITLE,&amp,%S%,all

             ;stringreplace,TITLE,TITLE,-,%S%,all

             stringreplace,TITLE,TITLE,ç,c,all

             stringreplace,TITLE,TITLE,é,e,all

             stringreplace,TITLE,TITLE,è,e,all

             stringreplace,TITLE,TITLE,ñ,n,all

             stringreplace,TITLE,TITLE,ã,a,all

             stringreplace,TITLE,TITLE,ç,c,all     ;ç

             stringreplace,TITLE,TITLE,ã,a,all     ;ã

             stringreplace,TITLE,TITLE,ö,oe,all    ;ö

             stringreplace,TITLE,TITLE,é,e,all     ;é

             stringreplace,TITLE,TITLE,Ã,a,all      ;à

             break

            }

       }

stringlen,L5,HSS

END5:=(L5-1)

stringmid,HSS2,HSS,1,END5

URL2=[URL]http://www.youtube.com/get_video?%HSS2%[/URL]

if MP4=1

   URL2=%URL2%&fmt=18

gosub,removechr

SplitPath,F2, name7, dir7, ext7, name_no_ext7, drive7

Run, "%DownloadMgr%" "%URL2%"

WinWait, Add new download, , 5

IfWinNotActive, Add new download, , WinActivate, Add new download,

WinWaitActive, Add new download,

SendInput, {TAB 7}%F2%{Enter}

exitapp

REMOVECHR:

autotrim,off

new2=

Loop,Parse,TITLE

         {

         A:=(Asc(A_LoopField))

         B:=chr(a)

         if (B="_" OR B=" " OR B="-")     ;allow _space   autotrim,off

         Goto,SKIP8

         if ((a<48 or a>57) AND A<65 OR A>90 AND A<97 OR A>122)

         continue

         SKIP8:

         new2=%new2%%b%

         }

    autotrim,on

    stringmid,ANOW1,A_NOW,1,12    ;if not readable chinese...

    anow1=%anow1%

    new2=%new2%

    if new2=

       {

       if MP4=1

       new3=_%ANOW1%.mp4

       else

       new3=_%ANOW1%.flv

       F2=%new3%

       return

       }

  if MP4=1

  new3=%new2%.mp4

  else

  new3=%new2%.flv

  F2=%new3%

  ifexist,%REC%%F2%

      F2=_%ANOW1%_%F2%

return
I use it to send a YouTube link from the command line which is decrypted and sent to the download manager of my choice.

The decrypted link points to a high quality MP4 if it exists, else to a FLV with proper renaming.

Essentially, I can now download multiple Youtube links (directly from YouTube and not some third party host), with multiple part downlading, pause and resume capabilities, i.e. all the benefits of a download manager.

The YouTube link can be sent as a parameter to the compiled app using the FlashGot extension and AltClick in Firefox.

The best way there is..
 
Now add &fmt=22 for 720p HD glory !!!

First you have to apply the same URL hack, but this time the magic bit of code is &fmt=22. Tack that on to the end of a normal YouTube URL and, if an HD version of the video is available, then you’ll see it. If it isn’t, YouTube seems to fall back to the 480×360 video and then, if that isn’t there either, it goes back to the pixelated glory that is its trademark.
 
Usually a 3min standard clip is ~6mb and when you watch in high quality it exceeds 12mb in some case a 5min high quality clip is 18+mb, so better mind your speeds before watching them in high quality !

Nice guide, thanks :)
 
Status
Not open for further replies.