Hacker News new | past | comments | ask | show | jobs | submit login

Did you miss the "prefer" word? ;)



I'll take that as a no.


(Comment 3 / 3)

And finally, after some more tests it turned out that some videos have almost 2x bigger .webm variants than .mp4 so I had to extend my yt-dlp config like so (only showing the prioritization options here, my previous full config is still there upthread):

    --format 'vcodec=av01/bestvideo*+bestaudio/best'
    --format-sort 'quality,res,fps,hdr:12,vcodec:av01,channels,acodec,abr,asr,proto,ext,hasaud,source,id'
    --prefer-free-formats
This:

1. Prioritizes AV1 (because it's gaining more and more hardware support, is very efficient and is not license-encumbered)

2. Prefers the free formats

3. ...but still uses a non-free format if it's smaller.

Or at least that's what I believed in after testing on 7 videos that have obvious winners either way.


...OK, you made me double-check. Used this instead:

    --format 'vcodec=av01/bestvideo*+bestaudio/best'
And it started downloading `.webm` streams and not `.mp4` (only one video had an AV1 stream). Tested with several videos, quality is the same and some files are actually 40% smaller.

...Whoa. Thanks for making me double-check!

Somebody down-voted you, I seem to recall seeing earlier, sorry about that. Your comment was valuable, though I'd definitely use more productive tone next time.


I am half-aware of the licensing troubles of various video formats but I wish those companies luck going after each and every home video user. ¯\_(ツ)_/¯




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: