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
garry
  • Members
  • 2845 posts
  • Last active: Apr 21 2014 04:25 PM
  • Joined: 19 Apr 2005

20130816

 

script not works really good , need 10-times click start-button

 example new with youtube-dl.exe

start script , copy url  , download starts ( see DOS-window )

;- example with youtube-dl.exe
modified=20130816
#persistent
;#singleinstance force

#NoEnv              ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input      ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode, 2
SetBatchLines, -1
Filename1   =Ytube-dl_%modified%

folderx=C:\_A_INPUT              ;- download here
ifnotexist,%folderx%
  filecreatedir,%folderx%
url=
clipboard=
IfWinNotExist,YouTube
   run,http://www.youtube.com/watch?v=Zln9I9IttLA
return

OnClipboardChange:
If (A_EventInfo=1)
{
url = %Clipboard%
ifinstring, url, www.youtube.com
  {
  StringGetPos, pos, url, &
  if (pos>=1)
    StringLeft, url, url, pos

  ;- mp4= 37/22/18/35(flv)/36/17(3gp)        not more = 37 : 1920*1080  and  35 : 854* 480
  ;RunWait, %comspec% /k youtube-dl.exe %url% -F
  ;RunWait, %comspec% /k youtube-dl.exe %url% -f 37/22/18/35/36 -w --restrict-filenames -o %folderx%\`%(title)s#`%(uploader)s#`%(id)s.`%(ext)s
  ;RunWait, %comspec% /k youtube-dl.exe %url% -f 37/22/18/35/36 -w --restrict-filenames -o %folderx%\`%(title)s#`%(uploader)s#`%(id)s#`%(format)s#`%(format_id)s.`%(ext)s
  ;RunWait, %comspec% /k youtube-dl.exe %url% -f 37/22/35/34/18/36 -w --restrict-filenames -o %folderx%\`%(title)s#`%(uploader)s#`%(format)s#`%(id)s#`%(format_id)s.`%(ext)s
RunWait, %comspec% /k youtube-dl.exe %url% -w --restrict-filenames -o %folderx%\`%(title)s#`%(uploader)s#`%(format)s#`%(id)s#`%(format_id)s.`%(ext)s                ;- best quality 1280* 720 ifexist
  ;RunWait, %comspec% /k youtube-dl.exe %url% -x -f 36 -w --restrict-filenames -o %folderx%\`%(title)s#`%(uploader)s#`%(format)s#`%(id)s#`%(format_id)s.`%(ext)s    ;- 3gp
  ;RunWait, %comspec% /k youtube-dl.exe %url% -f 37 -w --restrict-filenames -o %folderx%\`%(title)s#`%(uploader)s#`%(format)s#`%(id)s#`%(format_id)s.`%(ext)s       ;- 1920*1080 maybe , but not allowed from youtube
  ;RunWait, %comspec% /k youtube-dl.exe %url% -f 36/17 -w --restrict-filenames -o %folderx%\`%(title)s#3gp#`%(uploader)s#`%(id)s.`%(ext)s
  url=
  clipboard=
  run,%folderx%
  }
}
return
;-----------------------------------------
/*
    -Download and install Python (free).
     http://www.python.org/download/windows/
     http://www.python.org/downloads/
     http://www.python.org/ftp/python/3.3.4/python-3.3.4.msi
     https://wiki.python.org/moin/Python2orPython3

    -Download youtube-dl (free).
     http://rg3.github.io/youtube-dl/
     http://rg3.github.io/youtube-dl/download.html
     https://yt-dl.org/downloads/2014.02.19.1/youtube-dl        ;- click on date 2014.02.19.1
     https://github.com/rg3/youtube-dl/blob/master/CHANGELOG
*/
;------------- END script ----------------

or

 

use mozilla addon

 

http://www.downloadhelper.net/

 

;==============================================================

 

 

( old script removed )

 

-select quality/size

-Listview with logfile to start user or video later
-convert videos to audio MP3 or AAC
-convert videos to mobilphone
-convert videos to other formats / extensions

================================================

 

http://postimg.org/image/3s4v2g4zd/

 

new  / old

 

Big_Buck_Bunny_20131206.jpg

 

 

bigbuckbunny20koydl85j0p.png


/*
http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs
--------------------------------------------------------------------
5 	FLV 	240p 	Sorenson H.263 	N/A 	0.25 	MP3 	64
6 	FLV 	270p 	Sorenson H.263 	N/A 	0.8 	MP3 	64
13 	3GP 	N/A 	MPEG-4 Visual 	N/A 	0.5 	AAC 	N/A
17 	3GP 	144p 	MPEG-4 Visual 	Simple 	0.05 	AAC 	24
18 	MP4 	360p 	H.264 	Baseline 	0.5 	AAC 	96
22 	MP4 	720p 	H.264 	High 	       2-2.9 	AAC 	192
34 	FLV 	360p 	H.264 	Main 	        0.5 	AAC 	128
35 	FLV 	480p 	H.264 	Main 	        0.8-1 	AAC 	128
36 	3GP 	240p 	MPEG-4 Visual  Simple 	0.17 	AAC 	38
37 	MP4 	1080p 	H.264 	High    	3-4.3 	AAC 	192
38 	MP4 	3072p 	H.264 	High 	        3.5-5 	AAC 	192
43 	WebM 	360p 	VP8 	N/A 	        0.5 	Vorbis 	128
44 	WebM 	480p 	VP8 	N/A 	         1 	Vorbis 	128
45 	WebM 	720p 	VP8 	N/A       	2 	Vorbis 	192
46 	WebM 	1080p 	VP8 	N/A 	        N/A 	Vorbis 	192
82 	MP4 	360p 	H.264 	3D       	0.5 	AAC 	96
83 	MP4 	240p 	H.264 	3D       	0.5 	AAC 	96
84 	MP4 	720p 	H.264 	3D      	2-2.9 	AAC 	152
85 	MP4 	520p 	H.264 	3D       	2-2.9 	AAC 	152
100 	WebM 	360p 	VP8 	3D       	N/A 	Vorbis 	128
101 	WebM 	360p 	VP8 	3D      	N/A 	Vorbis 	192
102 	WebM 	720p 	VP8 	3D      	N/A 	Vorbis 	192
120 	FLV 	720p 	AVC 	Main@L3.1 	2 	AAC 	128
*/




polyethene
  • Administrators
  • 5511 posts
  • Last active: Yesterday, 11:38 PM
  • Joined: 26 Oct 2012
Why don't you make a version that checks with keepvid.com, that way you won't have to worry about youtube updating their codes.

garry
  • Members
  • 2845 posts
  • Last active: Apr 21 2014 04:25 PM
  • Joined: 19 Apr 2005
thank you Titan, at the moment works, save automatically with the right name and best quality (namexy.mp4 when exist, otherwise namexy.flv)
how would you do that ?

Q
  • Members
  • 24 posts
  • Last active: Nov 14 2008 10:51 PM
  • Joined: 24 Oct 2007
Cool, good work :-)

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 -->

Jex
  • Members
  • 101 posts
  • Last active: Oct 14 2010 04:22 PM
  • Joined: 01 Aug 2008
this is very interesting. could a auto convert be added to this? You would probably have to go to 3rd party freeware. But it would save so much time.

  • Guests
  • Last active:
  • Joined: --
all greasemonkeys scripts related to youtube generates links for download.
i think your script could improve with converters and other utilities.

..:: Free Radical ::..
  • Members
  • 74 posts
  • Last active: Nov 12 2013 11:34 PM
  • Joined: 20 Sep 2006
Superb script garry.

Would appreciate more scripts like this or preferably functions for other video sites / share sites.

garry
  • Members
  • 2845 posts
  • Last active: Apr 21 2014 04:25 PM
  • Joined: 19 Apr 2005
thank you ..::Free Radical::.. , Ill try it
Jex,
added a second script above when download finished can convert video to MP3


here freeware to convert
I converted xy.flv to MP4 to my mobilphone

........................ <!-- m -->http://www.dvdvideos... ... to-mp3.htm<!-- m -->
........................ <!-- m -->http://www.dvdvideos...eo-software.htm<!-- m -->


.............. Free Video to MP3 Converter ...........................................................
<!-- m -->http://www.dvdvideos... ... verter.exe<!-- m -->
<!-- m -->http://www.dvdvideos... ... verter.htm<!-- m -->
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
........................................................................................................



..:: Free Radical ::..
  • Members
  • 74 posts
  • Last active: Nov 12 2013 11:34 PM
  • Joined: 20 Sep 2006
Apparently, there is an fmt=22 switch for 720p vids in youtube too :D

garry
  • Members
  • 2845 posts
  • Last active: Apr 21 2014 04:25 PM
  • Joined: 19 Apr 2005
thank you ..:: Free Radical ::..
can you give an example (URL)
at the moment searches for "watch in high quality" to get xy.mp4 ( instead of xy.flv )

..:: Free Radical ::..
  • Members
  • 74 posts
  • Last active: Nov 12 2013 11:34 PM
  • Joined: 20 Sep 2006


Credits:
Mocib (admin @inCrysis.com)
[M]av3r!cK @erodov.com
and Matt in the video.

garry
  • Members
  • 2845 posts
  • Last active: Apr 21 2014 04:25 PM
  • Joined: 19 Apr 2005
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


menaphus
  • Members
  • 111 posts
  • Last active: Jan 16 2012 09:51 PM
  • Joined: 28 Nov 2008
Is this actualy copying the file to your hard disk or playing it through the app?
sorry kinda busy dont have time to look over the script properly

garry
  • Members
  • 2845 posts
  • Last active: Apr 21 2014 04:25 PM
  • Joined: 19 Apr 2005
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 -->

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: