0

Oh! its sad to see what I saw. I am downloading a file from youtube (the video is of 1 hr) using command line from Ubuntu13.04 as below:

ravbholua@ravbholua-Aspire-5315:~$ youtube-dl "http://www.youtube.com/watch?v=d4Z8VI3myBw"
[youtube] Setting language
[youtube] d4Z8VI3myBw: Downloading video webpage
[youtube] d4Z8VI3myBw: Downloading video info webpage
[youtube] d4Z8VI3myBw: Extracting video information
[download] Destination: d4Z8VI3myBw.mp4
[download]   0.1% of 718.62M at   13.70k/s ETA --:--

See the size is 718 MB and type is mp4.

The same file I downloaded earlier from Windows 7 OS using youtube downloader. Then the type and size of the file was flv and 130 MB only.

Similarly, yesterday and today I downloaded files from youtube via my Ubuntu13.04 and all were downloaded as mp4 and very very big size. But when I downloaded many videos via Windows earlier all the files had flv type and very less size as compared to mp4.

I can't download youtube videos if they are downloaded like this (mp4 with big sizes).

One thing is clear: the difference lies with the OS and/or the youtube downloader for Windows7. What setting needs to be changed please here in Ubuntu13.04?

5

Assuming that you are using the same python script on both OSs, check its documentation:

YouTube formats

Using the -f option and other related options, you can specify the video format to be downloaded from YouTube. If you have an order of preference, specify the formats separating them with slashes: -f 22/17/18. Instead of keeping a video format table here, I will refer you to the list of YouTube formats on Wikipedia.

Output template

The -o option allows users to indicate a template for the output file names. The basic usage is not to set any template arguments when downloading a single file, like in youtube-dl -o funny_video.flv "http://some.video.com". However, it may contain special sequences that will be replaced when downloading each video. The special sequences have the format %(NAME)s. To clarify, that's a percent symbol followed by a name in parenthesis, followed by a lowercase S. Allowed names are:

id: The sequence will be replaced by the video identifier.
url: The sequence will be replaced by the video URL.
uploader: The sequence will be replaced by the nickname of the person who uploaded the video.
upload_date: The sequence will be replaced by the upload date in YYYYMMDD format.
title: The sequence will be replaced by the video title.
ext: The sequence will be replaced by the appropriate extension (like flv or mp4).
epoch: The sequence will be replaced by the Unix epoch when creating the file.
autonumber: The sequence will be replaced by a five-digit number that will be increased with each download, starting at zero.

You should always read a program's documentation since it will usually contain the answer you are looking for. On that page, the author also explains how to make your choices permanent by adding the relevant option to ~/.config/youtube-dl.conf.

  • Most of what you need is in the output of --help too, ~/bin/youtube-dl --help. – slm Oct 17 '13 at 14:59
  • @terdon yes you are right. Thanks for the advice that the program's documentation should be read 1st. Frankly speaking, it wasn't in my consciousness to find the solution in the program's doc many times I encountered a problem. Now, I have realized to 1st check the program's docs. Oh yes! it's really great to see the solution. I ran the above command with -f worst and the file size condensed from the earlier 718 M to only 35 M. Vowwwwwww! That's great! I w'd surely download this and see how the quality is. @slm, yes Thank you too for your suggestion. – Ravi Oct 17 '13 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.