When I use yt-dlp -x to grab audio only, the resulting opus files are often troublesome to play back in strawberry, stopping unexpectedly. They also sometimes don’t index at all, and metadata including embedded cover art don’t seem to stick.

So, since most of my library is already vorbis in OGG files, I have been converting the files, but my inexperience with audio codecs and YouTube audio formats in general is shining through. I use 320kbps, but the resulting files are typically about twice the size afterward. I’m thinking I’m probably wasting space for no reason.

What is a comparable bitrate for the OGG files for a given bitrate opus source file?

EDIT: Here is my conversion script find ./ -iname "*.opus" | parallel --load 0.9 ffmpeg -i {} -c:a libvorbis -b:a 320k "{.}.ogg"

EDIT2: Here is the updated version with a suggestion from @Supermariofan67@programming.dev find ./ -iname "*.opus" | parallel --load 0.9 ffmpeg -i {} -c:a libvorbis -q:a 6 "{.}.ogg" which results in only slightly larger files (5.4MB > 7.2MB).

  • Supermariofan67@programming.dev
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    edit-2
    1 month ago

    Before trying the conversion, I suggest checking if you are missing a library that strawberry needs (probably libopus or libopusfile). For me, strawberry reads opus files perfectly normally, so I wonder if yours is falling back to using ffmpeg or something to decide them

    If you really must convert, use Vorbis with the variable bitrate mode -q6 (or -q:a 6 option in ffmpeg) which usually ends up around 192 kbps, or push it up one more to q7 which will be a little higher. This is the level that is usually transparent, but do keep in mind that any conversion between lossy codecs is much more likely to cause perceivable loss in quality than a conversion from a lossless source. Btw opus is the direct successor to Vorbis and is superior in quality per bitrate (128k is what YouTube uses and is indistinguishable the vast majority of the time). It’s probably better than 320k mp3 at least