Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

YouTube MP4 download & convert video to MP3


  • Please log in to reply
152 replies to this topic
menaphus
  • Members
  • 111 posts
  • Last active: Jan 16 2012 09:51 PM
  • Joined: 28 Nov 2008

hello menaphus,
it downloads to Harddisk
start script and copy url-link (CTRL+c or mouse rightclick )

place where download:
REC =c:\_RECORDED1 ; maybe change path

;---- DOWNLOADS YOUTUBE FLV or MP4 with correct name (2nd script with MP3converter ) -----
;---- automatically select best quality or define fmt=0/18/22 ------------------


-----------------------------------------------------------------
hello Q,
sorry for the late answer

Just wondering, would it be possible to have a version that would work on other flash 10 sites other than youtube for example to stream down videos from

<!-- m -->http://archiv.nova.c... ... verku.html<!-- m -->

ĉesko -
I'll have to login, didn't tried
maybe are the videos downloaded in FireFox cache
<!-- m -->http://www.autohotke... ... ht=firefox<!-- m -->


Ok ty i think i shall get it :D :wink:


Where is it saved , all i can find is a text file full of browser code or is that it?

garry
  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005
hello menaphus,
(delete my answers in your post (don't repeat) )
I tried first script again, it works
just copy script save as youtubexy.ahk, start, enter
automatically downloads example jim reeves
after 5 seconds script minimizes, wait until 100% , then starts video
-Jim Reeves - Ek Verlang Na Jou.mp4

when copy a link in youtube , script starts (maximized) and 5 second later minimized, see download process in procent (tray)

should have an xy.mp4 or xy.flv file in c:\_recorded1

when no succes / questions can me also send mail

fsnow55
  • Members
  • 36 posts
  • Last active: Jun 07 2011 07:27 PM
  • Joined: 08 Jun 2006
Garry, the pgm does nothing (does not run) when I pick no to the free mp3/4 converter
(I'm wary about spyware in it).

garry
  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005
if you don't want use the mp3converter
should desactive / correct some lines
MP3extract  =%A_programfiles%\DVDVideoSoft\Free Video to Mp3 Converter\FreeVideoToMP3Converter.exe
;ifnotexist,%MP3extract%
;   goto,mp3converter
........
ifexist,%MP3extract%
  {
  if MQ2=0
     Gui,2:Add,CheckBox,c%textcolor%          x350    y270    vMP31 gMP31A  ,MP3 extract
  else
     Gui,2:Add,CheckBox,c%textcolor% checked  x350    y270    vMP31 gMP31A  ,MP3 extract
  }

......
ifnotexist,%mp3extract%
    {
    ;msgbox,262144,,Download MP3Extract`r`nhttp://www.dvdvideosoft.com/download/FreeVideoToMp3Converter.exe
    return
    }


fsnow55
  • Members
  • 36 posts
  • Last active: Jun 07 2011 07:27 PM
  • Joined: 08 Jun 2006
Thanks for the quick response.

..:: Free Radical ::..
  • Members
  • 74 posts
  • Last active: May 30 2015 12:13 PM
  • Joined: 20 Sep 2006
Here's how I use it :)

DownloadMgr=H:\FlashGet\flashget.exe
F1 =%A_Temp%\YouTube.HTML
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,",%S%,all
             stringreplace,TITLE,TITLE,&,%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=http://www.youtube.com/get_video?%HSS2%&fmt=22

SIZE:=HttpQueryInfo(URL2,5)

if SIZE=timeout
	URL2=http://www.youtube.com/get_video?%HSS2%&fmt=18
else, URL2=http://www.youtube.com/get_video?%HSS2%&fmt=22

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}
FileDelete,%F1%
exitapp

;---------- Remove special characters from video name ----------------------

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=
       {
       F2=_%ANOW1%.MP4
       return
       }
		F2=%new2%.MP4
return

;-------------------------- FUNCTION GETSIZE before download -------------------------

HttpQueryInfo(URL, QueryInfoFlag=21, Proxy="", ProxyBypass="") {
hModule := DllCall("LoadLibrary", "str", "wininet.dll")

If (Proxy != "")
AccessType=3
Else
AccessType=1

io_hInternet := DllCall("wininet\InternetOpenA"
, "str", "" ;lpszAgent
, "uint", AccessType
, "str", Proxy
, "str", ProxyBypass
, "uint", 0) ;dwFlags
If (ErrorLevel != 0 or io_hInternet = 0) {
DllCall("FreeLibrary", "uint", hModule)
return, -1
}

iou_hInternet := DllCall("wininet\InternetOpenUrlA"
, "uint", io_hInternet
, "str", url
, "str", "" ;lpszHeaders
, "uint", 0 ;dwHeadersLength
, "uint", 0x80000000 ;dwFlags: INTERNET_FLAG_RELOAD = 0x80000000 // retrieve the original item
, "uint", 0) ;dwContext
If (ErrorLevel != 0 or iou_hInternet = 0) {
DllCall("FreeLibrary", "uint", hModule)
return, -1
}

VarSetCapacity(buffer, 1024, 0)
VarSetCapacity(buffer_len, 4, 0)

Loop, 5
{
  hqi := DllCall("wininet\HttpQueryInfoA"
  , "uint", iou_hInternet
  , "uint", QueryInfoFlag ;dwInfoLevel
  , "uint", &buffer
  , "uint", &buffer_len
  , "uint", 0) ;lpdwIndex
  If (hqi = 1) {
    hqi=success
    break
  }
}

IfNotEqual, hqi, success, SetEnv, res, timeout

If (hqi = "success") {
p := &buffer
Loop
{
  l := DllCall("lstrlen", "UInt", p)
  VarSetCapacity(tmp_var, l+1, 0)
  DllCall("lstrcpy", "Str", tmp_var, "UInt", p)
  p += l + 1
  res := res  . "`n" . tmp_var
  If (*p = 0)
  Break
}
StringTrimLeft, res, res, 1
}

DllCall("wininet\InternetCloseHandle",  "uint", iou_hInternet)
DllCall("wininet\InternetCloseHandle",  "uint", io_hInternet)
DllCall("FreeLibrary", "uint", hModule)

return, res
}

Thanks garry

garry
  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005
thank you ..:: Free Radical ::..
I didn't used flashget yet
I made to complicated, now added a logfile,
listview A/B/C
( usermember / video / link )

mtman1020
  • Members
  • 36 posts
  • Last active: May 28 2010 10:16 PM
  • Joined: 08 Aug 2008
garry,

Thanks for taking the time to keep this updated and working!!

How do you clear the listview? I have 51 items already and don't want to see the ones I downloaded last week....

Thanks,

garry
  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005
hello mtman1020

How do you clear the listview? I have 51 items already and don't want to see the ones I downloaded last week....


example below deletes all saved URL's and names
(it's possible also to manage listview, delete only marked rows)

Filerecycle youtubelog.txt (tools menu) and clears Listview
Menu,S2,add,Delete Logfile                         ,MH14
;  or can use also a button
.......


MH14:
msgbox, 262180, Start URL,Want you delete the logfile %F21% ?
ifmsgbox,NO
   return
else
  {
  Filerecycle,%F21%
  gosub,filllist1
  }
return


WankaUSR
  • Members
  • 87 posts
  • Last active: Jul 14 2013 09:59 AM
  • Joined: 14 Aug 2007
Added some minor modifications like selection of the save to folder because i use the script compiled on my work pc . here is the script

[code=auto:0]
MODIFIED =20090119 ;youtube changed autoselect
;MODIFIED=20090107 ;extractaudio 31351 changed
;MODIFIED=20090102 ;added listview logfile
;MODIFIED=20081217 ;added checkbox
;MODIFIED=20081122 ;added radio-box to select fmt=0/18/22
;MODIFIED=20081117 ;FMT=18 FMT=22
;MODIFIED=20081026 ;added freeware converts video to MP3
FILENAME=YOUTUBE_%MODIFIED%
YOUTUBEMP4INI=%A_scriptdir%\YOUTUBEMP4a.ini
ifnotexist,%YOUTUBEMP4INI%
{
IniWrite,0 , %YOUTUBEMP4INI% ,Startvideo , KEY1
IniWrite,0 , %YOUTUBEMP4INI% ,Beep , KEY1
IniWrite,%A_scriptDir%\YouTube_Vids, %YOUTUBEMP4INI% ,Settings, SaveTo
}
;REC =d:\Download\YouTube_Download
;run,%COMSPEC% /C if not exist \%REC%\NUL MD %REC%,,hide
IniRead, REC,%YOUTUBEMP4INI%, Settings, SaveTo
IfNotExist, %REC%
FileCreateDir, %REC%


;---- DOWNLOADS YOUTUBE FLV or MP4 with right name and convert to MP3 ---------
;---- automatically select best quality ----------------------------------------
;================================================================================
/*


.............how to use ................................................
start this script and youtube
copy video link with rightclick or CTRL+c

download starts, downloads ---namexy.flv-- or -- namexy.mp4 --
when download finished possibility to convert video to MP3
creates a logfile start member/youtube or download again
........................................................................


https://ahknet.autoh...YOUTUBE_MP4.png


size example=
-----------------------------------------------
-720p HD Test 2: Big Buck Bunny
166-MB mp4
42-MB mp4
http://www.youtube.com/watch?v=wUPcimeiqLE 24-MB flv
------------------------------------------------
var isHDAvailable = true;


........................ http://www.dvdvideos...ideo-to-mp3.htm
........................ http://www.dvdvideos...eo-software.htm


.............. Free Video to MP3 Converter ...........................................................
http://www.dvdvideos...p3Converter.exe
http://www.dvdvideos...3-Converter.htm
Use Free Video to MP3 Converter to extract audio from video files
(*.avi, *mpg, *.mpg, *.mp4, *.m4v, *.mpeg, *.dvr-ms, *.wmv, *.asf, *.mov, *.qt, *.3gp, *.3g2 and *.flv)
and save it as MP3

There are 3 pre-configured presets:
- High Quality (MP3, 256kbps, 48000Hz, STEREO);
- Standard Quality (MP3, 128kbps, 44100Hz, STEREO);
- Economy Quality (MP3, 96kbps, 22050Hz, STEREO).

and TRIM video
........................................................................................................



*/
;==================================================



#NoEnv
SetBatchlines -1
SendMode Input

setworkingdir, %a_scriptdir%

WA=%A_screenwidth%
HA=%A_screenheight%

MP3extract =%A_programfiles%\DVDVideoSoft\Free Video to Mp3 Converter\FreeVideoToMP3Converter.exe
;ifnotexist,%MP3extract%
; goto,mp3converter

Settitlematchmode, 2
Gui,2:default
Gui,2: +AlwaysOnTop

Gui,2:Color,black
Gui,2:Font, S10 CDefault , Lucida Console

transform,ten,chr,10
transform,tre,chr,13
CF=%TRE%%TEN%





;-------- menu ----------------------------------------------


;--------------- SETTINGS ------------------
;menu ,S1 ,Add,&Ask for start video after download ,MH1
;menu ,S1 ,Add,&Ask for convert to MP3 after download ,MH2

;-------------- TOOLS ---------------------------
Menu,S2,add,Converter start ,MH11
Menu,S2,add,Converter download ,MH12
Menu,S2,add,Converter HomePage ,MH13

;menu, myMenuBar, Add, Settings ,:S1
menu, myMenuBar, Add, Tools ,:S2

gui,2:menu,MyMenuBar
;----------------------------------------------------







AFC=0
TEXTCOLOR=yellow
EDITCOLOR=red

Gui,2:add, text, x0 y0 h0 w0 vTEXT3 ,%text4% ;text is hidden , see settimer AAS4
Gui,2:Add,Text,c%textcolor% x10 y10 ,URL1
Gui,2:Add,Text,c%textcolor% x10 y40 ,URL2
Gui,2:Add,Text,c%textcolor% x10 y70 ,FILENAME
Gui,2:Add,Text,c%textcolor% x10 y100 ,NAME
Gui,2:Add,Text,c%textcolor% x10 y130 ,PROCESS
Gui,2:Add,Text,c%textcolor% x10 y160 ,PROGRESS
Gui,2:Add,Text,c%textcolor% x10 y190 ,STATUS
Gui,2:Add,Text,c%textcolor% x10 y220 ,SAVE TO
Gui,2:Add,Text,c%textcolor% x10 y250 ,SEARCH


;------- for test --------------------------------------------------------------
;ALCC=http://www.youtube.com/watch?v=DJZv_U0zGGI ;Ek verlang na jou
;ALCC=http://www.youtube.com/watch?v=3ujBjUriUjI ;jim reeves
;ALCC=http://www.youtube.com/watch?v=WR59yE0w2P8 ;Solidao
;ALCC=http://www.youtube.com/watch?v=zlfKdbWwruY ;fmt=22 Matt
;ALCC=http://www.youtube.com/watch?v=Zd8f9Zqap6U ;US elect
;ALCC=http://www.youtube.com/watch?v=wUPcimeiqLE ;fmt=22 big buck bunny 720p
;ALCC=http://www.youtube.com/watch?v=kRTZoHTK608 ;Yao Lee
;ALCC=http://www.youtube.com/watch?v=n9l3bX-xWxQ ;SULLE SALAISUUDEN KERTOA MÄ VOISIN
;ALCC=http://www.youtube.com/watch?v=SH6wgK-A6Q8 ;Molbavello Dhou Goa India
;ALCC=http://www.youtube.com/watch?v=QA7euN0KgWk ;Lee Hsiang Lan / Li Xiang Lan / Shirley Yamaguchi / Yoshiko Otaka
ALCC=http://www.youtube.com/watch?v=IHzIItZKmD8 ;Ye Lai Xiang
;---------------------------------------------------------------------------------

Gui,2:Add,Edit,c%editcolor% x100 y10 h20 w400 vEditYoutube ,%ALCC% ;EDIT YOUTUBE
Gui,2:add,button, x100 y10 w0 default gDOWNLOAD1,

Gui,2:Add,Edit,c%editcolor% x100 y40 h20 w510 vURL2 Readonly ,
Gui,2:Add,Edit,c%editcolor% x100 y70 h20 w510 vAL1 Readonly ,
Gui,2:Add,Edit,c%editcolor% x100 y100 h20 w510 vNAME1 Readonly ,
Gui,2:Add,Edit,c%editcolor% x100 y130 h20 w510 vPROCESS11 Readonly ,

Gui,2:Add,Progress, x100 y160 h20 w510 vPRBAR cFF7200
;Gui,2:Add,Text, x100 y162 w510 +0x200 +Center +BackgroundTrans vText22,

Gui,2:Add,Edit,c%editcolor% x100 y190 h20 w50 vText22 Readonly , ;procent
Gui,2:Add,Edit,c%editcolor% x160 y190 h20 w450 vText23 Readonly , ;size / name

Gui,2:add,text, c%textcolor% x295 y290 ,FMT=
Gui,2:Add,Edit, c%editcolor% x330 y290 h20 w40 vFMTX Readonly ,

;--------------------------------------------------------------
Gui,2:Add,Edit,c%editcolor% x100 y220 h20 w510 vREC ,%REC% ;for test

;--- for test ---
AAX1=Jim Reeves
Gui,2:Add,Edit,c%editcolor% x100 y250 h20 w280 vSRCH1 ,%AAX1% ;for test
Gui,2:Add,Button, x400 y250 h20 w100 gYOUTUBE ,>YOUTUBE
Gui,2:Add,Button, x510 y250 h20 w100 gFolder1 ,RECORDED
ifexist,%MP3extract%
Gui,2:Add,Button, x510 y280 h20 w100 gEXTRACTMP3 ,EXTRACTMP3
Gui,2:Add,Button, x510 y310 h20 w100 gReload1 ,Reload

Gui,2:add,text, c%textcolor% x10 y320 ,When download finished

;------------------------------------------------------------------------------------
IniRead,VID1, %YOUTUBEMP4INI% ,Startvideo , KEY1
IniRead,BEEP1, %YOUTUBEMP4INI% ,Beep , KEY1


if VID1=0
Gui,2:Add,CheckBox,c%textcolor% x200 y320 vVID1 gVID1A ,Run Video
else
Gui,2:Add,CheckBox,c%textcolor% checked x200 y320 vVID1 gVID1A ,Run Video

if BEEP1=0
Gui,2:Add,CheckBox,c%textcolor% x330 y320 vBEEP1 gBEEP1A ,Beep
else
Gui,2:Add,CheckBox,c%textcolor% checked x330 y320 vBEEP1 gBEEP1A ,Beep
;------------------------------------------------------------------------------------




F21=%A_scriptdir%\youtubelog.txt
T1 :=100
T2 :=420
T3 :=50
T4 :=0
T5 :=0
T1A:=T1
T2A:=T1+T2
T3A:=T1+T2+T3
T4A:=T1+T2+T3+T4
T5A:=T1+T2+T3+T4+T5

LSW:=T1+T2+T3+T4+T5+20
GSW:=LSW+30
Gui,2:Font, S12 CDefault, Verdana
Gui,2:Add, ListView, x10 y350 grid r14 w%LSW% +hscroll altsubmit vA1 gA2,Member| < Start > Youtube|DNL|URL2|DATE
Gui,2:Font, CDefault, FixedSys

LV_ModifyCol(1,T1)
LV_ModifyCol(2,T2)
LV_ModifyCol(3,T3)
LV_ModifyCol(4,T4)
LV_ModifyCol(5,T5)
gosub,filllist1
Gui,2:add,text, c%textcolor% x10 y650 vLINES1 ,Links= %I%

gosub,DDDD
settimer,DDDD,1300

YTB1=YOUTUBE
Gui,2:Show, x0 y0 h670 w%GSW% ,%YTB1% [100]
return
;-------------------------------------------------------------------

EXTRACTMP3:
Gui,2: Show,minimize ;minimize screen
run,%MP3extract%
ifexist,%rec%
run,%rec%
return

VID1A:
Gui,2:submit,nohide
if VID1=0
IniWrite,0, %YOUTUBEMP4INI% ,Startvideo , KEY1
else
IniWrite,1, %YOUTUBEMP4INI% ,Startvideo , KEY1
return


BEEP1A:
Gui,2:submit,nohide
if BEEP1=0
IniWrite,0, %YOUTUBEMP4INI% ,BEEP , KEY1
else
IniWrite,1, %YOUTUBEMP4INI% ,BEEP , KEY1
return




MH11:
ifexist,%MP3extract%
run,%MP3extract%
else
goto,MP3CONVERTER
return

MH12:
run,http://www.dvdvideosoft.com/download/FreeVideoToMp3Converter.exe
return

MH13:
run,http://www.dvdvideosoft.com
return
;------------------------------------------------------------------------


folder1:
run,%rec%
return

reload1:
reload
return


;-------------------------------------------------------------------
filllist1:
Gui,2:default
Gui,2:ListView,A1
I=0
LV_Delete()
loop,read,%F21%
{
LR=%A_loopreadline%
if LR=
continue
I++
stringsplit,C,LR,`;
SplitPath,C2, name9, dir9, ext9, name_no_ext9, drive9
LV_Add("",C1,name9,C3,C4,C5)
C1=
C2=
C3=
C4=
C5=
}
LV_Modify(LV_GetCount(), "Vis") ;goto last position
return

;------------------ LISTVIEW --------------------------------------
A2:
Gui,2: Submit, NoHide
Gui,2:ListView,A1

RN:=LV_GetNext("C") ;2 selected checked
RF:=LV_GetNext("F") ;2 selected focused
GC:=LV_GetCount() ;4 total

if A_GuiEvent=Normal
{
if (RN="" OR RN=0)
return
C1=
C2=
C3=
C4=
C5=
MouseGetPos,x,y
{
if x<%T1A%
{
LV_GetText(C1,A_EventInfo,1)
run,http://www.youtube.com/user/%C1%&view=videos
return
}

if x<%T2A%
{
LV_GetText(C3,A_EventInfo,3)
run,%C3%
return
}

if x<%T3A%
{
LV_GetText(C3,A_EventInfo,3)
GuiControl,2:Text,EditYoutube,%C3%
GuiControl,2:Focus,EditYoutube
send,{enter}
return
}
}

}
return

;--------------------------------------------------------------------------------










;================= SETTIMER =====================================================
DDDD:
Gui,2:submit,nohide
StringRight, REC_, REC, 1
if REC_ <> \
{
IniWrite,%REC%, %YOUTUBEMP4INI% ,Settings, SaveTo
IfNotExist, %REC%
FileCreateDir, %REC%
}
else
{
StringTrimRight, REC, REC, 1
IniWrite,%REC%, %YOUTUBEMP4INI% ,Settings, SaveTo
IfNotExist, %REC%
FileCreateDir, %REC%
GuiControl,2:Text,REC,%REC%
}

URL11=%clipboard%
stringmid,URL11,URL11,1,60

if URL11 contains watch?v=
goto,start2

stringmid,URL1aa,URL11,1,25
if URL1aa=http://www.youtube.com/v/
{
stringright,STRRR,URL11,11
URL11=http://www.youtube.com/watch?v=%STRRR%
goto,start2
}

return
;---------------------------



START2:
Gui,2:Show, x0 y0 h650 w%GSW% ,

GuiControl,2:Text,EditYoutube,%URL11%
clipboard=
settimer,DDDD,off
gosub,DOWNLOAD1
edityoutube=
URL2=
settimer,DDDD,ON
return
;====================================================================================





YOUTUBE:
Gui,2: Show,minimize
GuiControlGet, SRCH1
stringreplace,SRCH1,SRCH1,%S%,`%20,all
run,http://www.youtube.com/results?search_query=%SRCH1%&search=Search
return
;====================================================================================






;============================== YOUTUBE ==================================
;------------------------------ GETTITLE and 2nd-URL ----------------------

DOWNLOAD1:
Gui,2:submit,nohide


Guicontrolget,EditYoutube,2:
if EditYoutube contains youtube.com/watch?v=
URL1=%EditYoutube%

if URL1=
return
if URL1 not contains youtube.com/watch?v=
return

GuiControl,2:Text,process11,
WinSetTitle,%YTB1% [100], ,%YTB1% [0]
GuiControl,2:,PRBAR,%nothing%
GuiControl,2:,Text22,%nothing%
GuiControl,2:,Text23,%nothing%


URL2=
TITLE=
new2=

F1 =%A_scriptdir%\YTB1.txt
ifexist,%F1%
filedelete,%F1%

GuiControl,2:Text,PROCESS11,Start Download
UrlDownloadToFile,%URL1%,%F1% ;<<<<<<<<<<<<<<<<
GuiControl,2:Text,PROCESS11,Search for name

Fileread,AA,%F1%
stringreplace,AA,AA,%TEN%,%CF%,all
filedelete,%F1%
Fileappend,%AA%`r`n,%F1%


;var isHDAvailable = true;
;var pageVideoId = 'hzpcZaI6NuE';
;var pageVideoSearchQueryStr = 'Shirley Yamaguchi Yoshiko Li Hsiang Lan';
;var embedUrl = 'http://www.youtube.com/v/hzpcZaI6NuE&hl=en&fs=1';
;var fullscreenUrl = '/watch_fullscreen?fs=1&vq=None&video_id=kRTZoHTK608&l=174&sk=uysg2FclE8_ZjhYckv1mvKCVcyrptrJuC&fmt_map=&t=OEgsToPDskIFTv2t2sDGJ2yVW50i1pIN&hl=en&plid=AAReRAmSPRTkjCpaAAACgAAQAAA&sdetail=f%253Arelated%252C&title=ã€Žè·Ÿä½ é–‹çŽ©ç¬‘ã€

garry
  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005
WankaUSR

Added some minor modifications like
selection of the save to folder because i use the script compiled on my work pc


thank you WankaUSR
so it's easier (editfield) to change the folder where to save
I will change it like you suggested
(in the sript predefined as (example) c:\_RECORDED1 )

mtman1020
  • Members
  • 36 posts
  • Last active: May 28 2010 10:16 PM
  • Joined: 08 Aug 2008
Garry,

Looks like it needs fixing again.

Could you tell me what codec it uses to make FLV files? I run Linux at home and don't know what codec I'm missing to play them. (MP4 works fine) Here is an example of a video I downloaded and works fine on most computers but not my home PC:

B.T.W. I like this a lot better than the VidRipper because VidRipper is just so much more than I need. I love the simplicity of this.

Thanks again for keeping this running for us!! :D

garry
  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005
hello mtman1020,
thank you , modified script, works now
youtube changes ~ all 2 months, maybe I have no solution ...
I used vlc.exe to play all videos (extensions always open with ... vlc.exe )
<!-- m -->http://www.videolan.org/<!-- m --> (vlc.exe)

if you don't want to have flv files (fmt=35) [ get FMT=18 / MP4 instead ], so block this part from script with /* */
in lines 668-687 =
;------------ try to search fmt=35 -------------

mtman1020
  • Members
  • 36 posts
  • Last active: May 28 2010 10:16 PM
  • Joined: 08 Aug 2008
Thanks Garry,

I use VLC at home and at work, they play fine at work (probably because VLC automatically updates with the internet connection) but won't play at home.

I found w64codecs_20071001-0.3_amd64.deb, I'll try it tonight....

vasu
  • Guests
  • Last active:
  • Joined: --

thank you ..:: Free Radical ::..
modified script
;---- DOWNLOADS YOUTUBE FLV or MP4 with right name (2nd with MP3converter ) -----
;---- automatically select best quality or define fmt=0/18/22 ------------------

examples ( size )

http://www.youtube.com/watch?v=zlfKdbWwruY
FMT=22     75320 kB mp4  ( high quality )
FMT=18     20784 kB mp4  ( high quality )
FMT=       11295 kB flv