• B_DL@lemmynsfw.com
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 day ago

    I’m new to yt-dlp. Care to share your flags? I’m a little confused on which ones I actually need.

    • tal@lemmy.today
      link
      fedilink
      English
      arrow-up
      23
      ·
      edit-2
      1 day ago

      I mean, you don’t need anything; it’ll work with no flags. I have these:

      $ cat ~/.config/yt-dlp/config
      --embed-subs
      --embed-metadata
      --embed-chapters
      --embed-thumbnail
      --sponsorblock-mark=all
      $
      

      That’ll just embed some useful metadata in the file.

      • sh00g@lemmy.zip
        link
        fedilink
        English
        arrow-up
        2
        ·
        11 hours ago

        Also if you just want the audio to listen to (I like to do this with TTRPGs) you can do:

        yt-dlp -x -f bestaudio

        Also works great in a pinch for getting sounds and music for FoundryVTT.

        • tal@lemmy.today
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          11 hours ago

          I’m pretty sure that it defaults to best quality.

          goes looking at man page

             By default, yt-dlp tries to download the best available quality if you don't  pass  any  options.   This  is  generally
             equivalent to using -f bestvideo*+bestaudio/best.  However, if multiple audiostreams is enabled (--audio-multistreams),
             the  default  format changes to -f bestvideo+bestaudio/best.  Similarly, if ffmpeg is unavailable, or if you use yt-dlp
             to stream to stdout (-o -), the default becomes -f best/bestvideo+bestaudio.
          

          So I think that it should normally pull down the best audio unless you get into some situation where YouTube doesn’t offer a format that simultaneously has the combination of highest audio quality with the highest video quality; if it has to do so to get the highest video quality then, it’ll sacrifice audio quality.

          EDIT: Hmm. I could have sworn that there was more text about prioritizing relative audio and video quality at one point in the man page, but I don’t see anything there now. Maybe it can just always get the best audio quality, regardless of video quality, can pull 'em entirely separately.

      • Kairos@lemmy.today
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        1 day ago

        Note that subtitles doesn’t include automatic subtitles. For that you have to do --write-auto-subs in conjunction

    • SpicyTaint@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      1 day ago

      I’m a filthy Windows user that’s too lazy to migrate my main PC to Fedora.

      > Path\to\yt-dlp.exe -P <target directory> <URL>
      

      Multiple URLs can be separated by spaces. Put any URLs with ampersands in quotes or remove the ampersand and following arguments.

      You can find a list of all the arguments on the yt-dlp github page