this post was submitted on 23 Oct 2023
1810 points (97.5% liked)

memes

10117 readers
3471 users here now

Community rules

1. Be civilNo trolling, bigotry or other insulting / annoying behaviour

2. No politicsThis is non-politics community. For political memes please go to [email protected]

3. No recent repostsCheck for reposts when posting a meme, you can only repost after 1 month

4. No botsNo bots without the express approval of the mods or the admins

5. No Spam/AdsNo advertisements or spam. This is an instance rule and the only way to live.

Sister communities

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 19 points 1 year ago (3 children)

Opus is the best. Anyone still using mp3s in 2023 is living in the past. Some users can still hear a difference between 256kbit/s mp3 audio and uncompressed audio while Opus reaches transparency at about 120kbit/s.

In the realm of compression transparency is when the compressed medium is indistinguishable from the source audio by a human

[–] [email protected] 5 points 1 year ago

Huh, I was wondering why that was becoming the default everywhare. Time to Re-encode my library so I can carry more of it on my pocket computer. Tech is awesome.

[–] [email protected] 4 points 1 year ago (1 children)

That and you can just download opus from youtube using yt-dlp lol. It's 100% great. Anybody transcoding youtube audio to mp3 is definitely doing it wrong lol

[–] [email protected] 2 points 1 year ago (1 children)

Thats why most of my yotuube downloads is .mka I found that matroska has better support than webm or ogg lol

[–] [email protected] 1 points 1 year ago
I download opus .webm s,
    then use ffmpeg to convert to .opus,
    which I'm pretty sure is just ogg.
IDK, works great in quodlibet.
.webm can't be tagged, though.
Tagging is critical, especially replay_gain tags.

Here is my script:
#!/usr/bin/env python

# Youtube actually hosts audio-only opus tracks, but you can only get them
# in the webm container, which many music players, including quodlibet, don't
# know what to do with. This script downloads the track, then converts it with
# zero loss to the opus container using ffmpeg's `-acodec copy` feature.

import sys
from subprocess import call
from os.path import splitext
from os import remove, walk, listdir
from tempfile import TemporaryDirectory
from shutil import move

urls = sys.argv[1:]

with TemporaryDirectory(prefix='yta-') as tempdir:
    # Do not raise exceptions, because yt-dlp counts failure of a single
    # download in the list as an overall failure, exit code wise.
    call(['env', '-C', tempdir, 'yt-dlp', '-if', 'bestaudio',
        '-o', '%(artist)s - %(title)s - %(id)s.%(ext)s', '--'] + urls)

    for tempdir, dirs, files in walk(tempdir):
        for fn in files:
            path = tempdir+'/'+fn
            name, ext = splitext(path)
            if ext == '.webm':
                if call([
                    'ffmpeg', '-hide_banner',
                    '-i', path,
                    '-acodec', 'copy',
                    name+'.opus'
                ]) == 0:
                    remove(path)

    for node in listdir(tempdir):
        move(tempdir+'/'+node, '.')

[–] [email protected] 1 points 1 year ago (1 children)

How does it differ/compare to aac?

[–] [email protected] 4 points 1 year ago

Under 100 kbps it sounds significantly better. I have decided that i dont want to choose on the least shitty lossy option tho, when i can have flac.