Naked self-interest disclaimer: I want the best config for the --output option, one that sorts downloads into folders, respects playlist order etc., and never ever displays the string NA, no matter which extractor is used (I mostly use youtube and bandcamp).


edit: here’s my own:

-S res:720  
--embed-metadata  
--embed-thumbnail  

# maybe that'll speed things up  
--concurrent-fragments 3  
--buffer-size 16k  
#  

--output "%(channel,playlist_channel,uploader,creator)s/%(playlist)s/%(playlist_index,playlist_autonumber,video_autonumber,autonumber)03d %(display_id,title,id)s (%(duration_string|_)s).%(ext)s"  

--sleep-subtitles 1  
--sub-langs "en.*,de.*,fi.*"  
--embed-subs  

Any suggestions on improving --output…

  • alanceil@feddit.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    14 hours ago

    Used in converting videos to podcast episodes using dir2cast:

    --force-ipv6 #use with net.ipv6.conf.all.use_tempaddr = 2
    --ffmpeg-location "~/src/FFmpeg" #selfcompiled ffmpeg with he-aac support
    #convert to he-aac (v1, for music bed compatibility) and filter mic noise:
    --exec "~/src/FFmpeg/ffmpeg -y -i %(filepath)q -af afftdn=nf=-25,highpass=f=100 -c:a libfdk_aac -profile:a aac_he -b:a 64k -ar 44100 -c:v copy -disposition:v attached_pic -map_metadata 0 -map_chapters 0 %(filepath)q.filtered.m4a && mv %(filepath)q.filtered.m4a %(filepath)q" 
    --js-runtimes quickjs #for solving challenges
    --remote-components ejs:github #for updates on how to solve the challenges
    --extract-audio 
    --audio-format m4a #best compatibility with dir2cast & overcast
    --embed-thumbnail
    --embed-metadata
    --embed-chapters
    --no-progress #this thing runs as a systemd timer service, prevent logspam
    --paths /tmp/ytdlp #no unnecessary writes to storage
    --sponsorblock-remove default #remove in-video ads
    #only download the newest video from a channel at most 1 month old:
    --break-on-existing
    --break-on-reject
    --dateafter now-1month
    --download-archive ~/var/downloaded.ytdlp
    
    • A_norny_mousse@piefed.zipOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 hours ago

      Nice. It’s basically a podcast app now.

      FWIW

      • remote-components ejs:github is the default anyhow (unless you obtain your ty-dlp in weird ways)
      • embed-chapters is already contained in embed-metadata
    • A_norny_mousse@piefed.zipOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      3 hours ago
      --cookies FILE
                  Netscape formatted file to read cookies from and dump cookie jar in
      

      Does that mean this file will populate itself? Is there any advantage to storing that?

      • alanceil@feddit.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 hours ago

        It’s useful for --mark-watched , you’d populate it with --cookies-from-browser firefox --cookies /tmp/cookies.txt. I managed to get an account banned for doing that, so use with caution.

      • heliotrope@slrpnk.net
        link
        fedilink
        English
        arrow-up
        4
        ·
        21 hours ago

        It doesn’t contain AI-generated code (unlike deno, Node, and bun); or at least, it didn’t the last time I checked.

  • Kissaki@beehaw.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    18 hours ago

    I use Nushell as my CLI shell, and I set up aliases/commands, so now I use dl, dl firefox, dl opus firefox etc.

    It also helps in remembering or looking up what the syntax to include chapters, sponsorblock sections, or for downloading only a timeframe arguments and synax is.