1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

A Downloader for YouTube Videos

Discussion in 'Technology Advice' started by Markham, Mar 9, 2014.

  1. Markham
    Offline

    Markham Guest

    I've written a small utility program to download YouTube videos. Unlike other similar programs, this one allows you to choose which of the various versions you want to obtain - there is very often a fair few to choose from and they differ in terms of resolution and encoding:
    • WEBM: Resolutions 640x480, 854x640, 1280x960 and 1920x1440. Suitable for PCs and most tablets
    • MP4: Resolutions 640x480, 1280x960, 1920x1440 and 2048x1536. Suitable for PCs and tablets
    • FLV: (Flash) Resolutions 320x240, 480x360, 640x480 and 854x640. Suitable for PCs with Flash player installed.
    • 3GP: Resolutions 176x144 and 320x240. Suitable only for older cellphones
    • 3D.WEBM and 3D.MP4 have similar resolutions to their non-3D counterparts but require a 3D player such as Bino to be installed (and 3D spectacles to be worn).
    The program is contained within a ZIP file and does not need to be installed - you can run it straight from the ZIP file if you wish - nor will it in any way alter your PC; it just runs!

    To use it, start the program and then:
    YTD-A.jpg
    There will be a short intermission whilst the program fetches the correct web page from YouTube and parses the information it contains to find out how many - and which - of the various quality versions are available. Once this is done, normally in a few seconds:
    YTD-B.jpg
    You can select the version you want to download and then start the download process:
    YTD-C.jpg
    Whilst the file is downloading, this status window will update itself. When the download is finished, the "Pause" button changes to "Open" and the "Stop" button changes to "Close". Selecting "Open" will cause the just-downloaded video to be played in your default video player - often Windows Media Player.

    And that's it! Very simple yet powerful. And it's free!

    YouTube Downloader is coded in C# and on a PC that is not normally connected to the Interwebs; that PC is protected by Avira anti-virus software and both the zip file and the executable were scanned prior to uploading.

    Enjoy!

    Attached Files:

    • Like Like x 1
  2. yuna
    Offline

    yuna Cat Lover Staff Member

    Very nice Mark! Thanks for sharing that! :)
  3. Markham
    Offline

    Markham Guest

    Here's an updated version that takes into account two fairly recent changes that Google is introducing to Youtube.

    Firstly, in order to make things a bit awkward, some videos are not readily downloadable and the information regarding them is partly enciphered. Whilst only affecting newer uploads, this trend is likely to affect more and more of Youtube's content as time goes on. This update overcomes that inconvenience!

    Secondly, Google is introducing DASH videos: unlike normal videos where the pictures and sound are contained within one file, DASH videos have separate files for the video and audio content and its latest HTML5 player is able to handle these (the normal Flash-based player can not, however). This update will allow you to download the two DASH video components and create a single video file that is playable on PCs, tablets and most home theatre systems. To achieve this, I use a freely available program called "FFmpeg" which is a command line driven - there is no suitable Windows GUI available - and this is used internally by the Downloader so you don't need to worry about its very convoluted syntax.

    The Downloader is now packaged with a Setup program that should be fairly familiar and one of its 'screens' looks like this:
    Update 3.png
    To be able to download and combine the two streams of DASH videos, you need to ensure that the option I've highlighted - "Download and install Ffmpeg" - has a tick next to it. The Setup program will then automatically download Ffmpeg's latest release from the authors' web site and extract the required component from the archive file.

    Depending on what Youtube video you want to download, you may find a number of additional Quality options available. These are as follows:
    • VO.MP4V - Video-Only MPEG-4 in several resolutions from 320 x 240 to 1280 x 960
    • MQ.VO.MP4V - Medium Quality Video-Only MPEG-4 currently only 1920 x 1440
    • HQ.VO.MP4V - High Quality Video-Only MPEG-4 currently only 1920 x 1440
    • xQ.AO.MP4A - Audio-Only MPEG-4 where "x" can be L, M or H (Low Quality, Medium Quality or High Quality)
    There are also some new WEBM DASH files but, for now, these should not be downloaded as the encoders being used to create the files are experimental and may not be playable on a local PC.

    Note that Youtube has now ceased to make 1920 x 1440 MPEG-4 versions of its content available as a single file; if you want your videos at this resolution, you will have to download the DASH version. For any one video, you will need to download one video file (MP4V) and one audio file (MP4A) and you can start the second download whilst the first file is still being downloaded. Having downloaded both files, you need to combine them using a process known as "multiplexing".

    The Downloader program has a new button as shown on this next screen capture:
    Update 2.png
    This button opens the Tools Window:
    Update 1.png
    on which there are two Tabs. The first Tab, "Multiplex Video and Audio", is where you can combine your two DASH video components - normally a MP4V file that contains the pictures and a MP4A file that contains the audio track. Simply select the two files you've just downloaded and click "Do It!". Multiplexing is a fairly rapid process and should only take a matter of a second or two.

    The second Tab, "Combine Audio-Video Files", simply allows you to join existing videos together. They must, of course, be of the same type (Flash, MP4 or WEBM) and of the same resolution.

    Enjoy!

    Attached Files:

  4. Anon04576
    Offline

    Anon04576 Well-Known Member

    Excellent.
  5. yuna
    Offline

    yuna Cat Lover Staff Member

    Will this work in ipad?
  6. Anon04576
    Offline

    Anon04576 Well-Known Member

    Hi Yuna, it's developed for Windows so won't work on an iPad
  7. Markham
    Offline

    Markham Guest

    The program itself won't work on an iPad but you can play the YouTube videos on your iPad that you've downloaded using the program.
  8. yuna
    Offline

    yuna Cat Lover Staff Member

    Ok. Thanks for the info Mark :)
  9. Markham
    Offline

    Markham Guest

    Here's Version 3 which contains a number of changes that I've had to incorporate to keep up with those made by YouTube. This release also includes some enhancements:

    1. If a video is available as separate video and audio files (the so-called DASH versions), then you select both the video and audio files at the same time. These will then be downloaded at the same time and automatically combined to produce either a WEBM or MP4 file that you can play on your PC or hand held device.
    2. Export of soundtracks to MP3 is now supported.
    3. Conversion of all formats to MPEG-2 is now supported. This will enable you to convert your favourite videos for putting on a DVD.
    4. There's a built-in media player that's both more attractive and (potentially) more powerful than the default Windows Media Player. Further enhancements will be added in future.
    5. VEVO and other protected videos can be downloaded. The previous release occasionally coughed when asked to download such a video due to a programming bug. My apologies for that.
    6. The download window now detects incomplete downloads that can be caused by slow internet connections 'timing out' and you'll be prompted to retry the download whereupon the download will continue from where it left off.
    Simply download, unzip and run the setup program - there's no need to uninstall any previous version as it will be detected and upgraded automatically to the latest release.

    Enjoy!

    Attached Files:

    • Useful Useful x 1
  10. SINGERS
    Offline

    SINGERS Member

  11. Markham
    Offline

    Markham Guest

    Gee ... I could charge over $30 a pop, then! But I won't. My program is much more powerful than their free version and has features that their paid-for version lacks. Thing is, though, how quickly do they issue updates to keep up with YouTube's ever-changing format?
  12. TheTeach
    Offline

    TheTeach Le MaƮtre Senior Member

    Thank you for this Mark.

    Al.
  13. Markham
    Offline

    Markham Guest

    You're most welcome, Al. Let me know if you have any problems.
  14. aposhark
    Online

    aposhark Well-Known Member Lifetime Member

    Nice one, Mark.
    Not nit-picking but it would be handy to be able to choose a "download to" folder.
  15. Aromulus
    Offline

    Aromulus The Don Staff Member

    knowing my terminal technophobia, I would surely f*** my pc up royally....

    So, although I wouldn't mind downloading this, that or the other on the odd occasion, I rather leave it to people that know what they are doing.............
  16. Anon04576
    Offline

    Anon04576 Well-Known Member

    If you want any assistance Dom just shout
  17. Markham
    Offline

    Markham Guest

    Right now, you choose the download folder when saving a file and, on a freshly-booted PC, this will default to "My Documents". From then on, unless you change the folder in the meantime, your chosen folder will be used as the default until you reboot your PC.

    Do you want to be able to nominate a default folder which the program will use each and every time?
  18. Aromulus
    Offline

    Aromulus The Don Staff Member


    HELPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    The Roman in me would say..................

    AUXILIOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
  19. Markham
    Offline

    Markham Guest

    Would you like a "walk-through" of downloading and installing the program, Dom?
  20. Aromulus
    Offline

    Aromulus The Don Staff Member

    Halohalo will do it for me next time Jitta's cafe' is open for baon...

Share This Page