1 |
Nikos Chantziaras wrote: |
2 |
> On 13/04/2019 14:44, Mick wrote: |
3 |
>>> It still insists on downloading the largest file. |
4 |
>> |
5 |
>> It is doing this because you're asking it to download a video of |
6 |
>> [height<=? |
7 |
>> 1280], and also download potentially separately an audio file - then |
8 |
>> mux them |
9 |
>> into one container file. A *height* of <=1280 means a resolution of |
10 |
>> more than |
11 |
>> 1080p. So, no wonder it wants to download a much larger video file. In |
12 |
>> addition, the question mark is used to download videos up to 1280 or |
13 |
>> videos |
14 |
>> where the height is not known. Therefore it could potentially |
15 |
>> download a |
16 |
>> bigger file if its height is somehow not declared in its web metadata. |
17 |
> |
18 |
> He forgot to change "height" to "width". Dale needs to improve his |
19 |
> copy&paste skills :-) |
20 |
> |
21 |
> Specifying a width of 1280 is better than specifying a height of 720 |
22 |
> when using youtube-dl, because a height of 720 might fail for videos |
23 |
> with an aspect ratio different than 16:9. But a width of 1280 is |
24 |
> always going to be what we call "720p" (even if the height is not |
25 |
> actually 720 pixels.) |
26 |
> |
27 |
> |
28 |
> |
29 |
|
30 |
|
31 |
This is what I have right now. |
32 |
|
33 |
root@fireball / # cat /etc/youtube-dl.conf |
34 |
--format |
35 |
bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?1280]+bestaudio/best |
36 |
root@fireball / # |
37 |
|
38 |
When I told it to download a video as a test, it got this: |
39 |
|
40 |
root@fireball / # exiftool |
41 |
/home/dale/Desktop/Documents/Food/long-path.mp4.part | grep size |
42 |
File Size : 2016 kB |
43 |
Movie Data Size : 493157 |
44 |
Image Size : 1280x720 |
45 |
root@fireball / # |
46 |
|
47 |
So it seems to pick out the right size this way. If it burps one day, |
48 |
I'll try removing the ? from it. That seems to have another option I |
49 |
like to, get .mp4 if available. I think. It did anyway. :/ Time will |
50 |
tell. |
51 |
|
52 |
For now, this will work, I think. lol |
53 |
|
54 |
Thanks. |
55 |
|
56 |
Dale |
57 |
|
58 |
:-) :-) |