I read somewhere that it is possible to rip youtube videos (music only) without the need for converting it into an mp3 as such.

The online conversion process (naturally) results in loss of quality, and (apparently) it is possible to preserve the original video’s audio quality via a direct rip. If so, how would it be done and what format would it be in anyway?

thanks

  • ѕєχυαℓ ρσℓутσρє@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    9 months ago

    This is what I use for my personal archive:

    yt-dlp -f bestaudio/best --extract-audio --embed-metadata --embed-thumbnail --recode opus --audio-quality 0

    It does recode to opus but since the bestaudio is usually in that format already, you don’t need it most of the time. You can skip the --recode opus part if you want to. I keep it because I like having a “uniform” collection. You can probably change the bestaudio/best part to simply bestaudio without losing much as well.

  • pr06lefs@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 months ago

    I dunno about the qualilty but I do yt-dlp -x and it downloads and extracts just the audio portion.

    • XEAL@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 months ago

      The fork yt-dlp already downloads in the highest quality.

      The problem is that, that’s (sometimes?) webm format…

  • Kissaki@feddit.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 months ago

    yt-dlp has the -F parameter to list the available stream formats. (uppercase F to list, lowercase f to select)

    I use -f 251 to download the opus audio stream, and afterwards use ffmpeg -i file -c copy file.opus to copy the opus audio stream in an opus file format file (codec copy so without encoding losses).

  • Thorny_Insight@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    9 months ago

    I use this app for it. Even adds the correct artist, title, album and such to the file aswell. I tried several similar apps but this was by far the best.