config 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # set sane defaults to ensure video and audio are saved as intended
  2. #
  3. # Unfortunately yt-dlp lacks sane behaviors with regards to controlling
  4. # both video and audio formats from `~/.config/yt-dlp/config`.
  5. #
  6. # If I add `--recode-video=webm` then it will also recode audio only downloads
  7. # to webm even if I specified `--audio-format=opus`.
  8. #
  9. # I then tried using `-f` to control the downloaded file, but this is exposed
  10. # other strange and undesirable behaviors.
  11. #
  12. # If I use `ba[ext=opus]` it will often fail because `opus` is not a commonly
  13. # available extension.
  14. #
  15. # If I use `ba[ext=webm]`even if I want both audio and video it will never
  16. # download the full video file.
  17. #
  18. # If I use `bv[ext=webm]+ba[ext=webm]` with `-x` it will download the entire
  19. # video file, which is often an order of magnitude larger wasting both time and
  20. # disk space, before converting to the desired audio-only format.
  21. #
  22. # In conclusion there does not seem to be intelligent design around the `-x`
  23. # flag. It ignores this flag when picking the file to download, and it ignores
  24. # this flag when asked to recode video even though I only want audio.
  25. #
  26. # The end result is that I have to pick between only controlling audio or video
  27. # and if I control video I am forced to download entire video files when smaller
  28. # audio-only downloads would suffice.
  29. # sane stream download setting
  30. --wait-for-video=1
  31. # optimal quality
  32. --audio-quality=0
  33. # save audio as opus and video as webm
  34. --prefer-free-formats
  35. -S ext:webm:webm
  36. --audio-format=opus
  37. --recode-video="opus>opus/webm"