Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Opus files with .ogg extension #35

Open
valpackett opened this issue Jun 14, 2019 · 0 comments
Open

Support Opus files with .ogg extension #35

valpackett opened this issue Jun 14, 2019 · 0 comments

Comments

@valpackett
Copy link

valpackett commented Jun 14, 2019

Looks like sndfile opens Ogg files and bails when it finds Opus instead of Vorbis inside.

found plugin input_sndfile
found plugin input_mpg123
found plugin input_musepack
found plugin input_ffmpeg
Error opening file 'track.ogg'

After removing input_sndfile.so from the plugin search path:

found plugin input_mpg123
found plugin input_musepack
found plugin input_ffmpeg
  Loudness
-13.3 LUFS, track.ogg

So it might make sense to try multiple plugins.

But then, looks like the tag writing also determines the codec by file extension :(

Many places (e.g. Android) only support the .ogg extension, so that should be supported. File extensions are not supposed to mean anything in unix anyway.


As a workaround, I have this script:

#!/usr/bin/env ruby
opusfiles = $*.map { |f| File.join(File.dirname(f), File.basename(f, '.*') + '.opus') }
opusfiles.each { |op| File.delete(op) if File.exist?(op) }
$*.zip(opusfiles).each { |og, op| puts [og, op].inspect; File.symlink(og, op) }
system 'loudness', 'tag', '-L', '--opus-vorbisgain-compat', *opusfiles
opusfiles.each { |op| File.delete(op) }
@valpackett valpackett changed the title Try other plugins when one fails Support Opus files with .ogg extension Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant