Various SW: Web Interface | Text Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Ambient Noise Mixer | DB Optimizer | Image Enhancer | Chiptunes | LMSlib2go | ... Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...
Since I recently came across some music in the Ogg Opus format, I looked into playing it with LMS.
The main issue is that the library LMS uses to read audio metadata (AudioScan) doesn't support Opus. I did, however, find a forked version which does.
As this one hasn't been updated in a while, I decided to merge the Opus support into the current AudioScan.
Attached you will find a patch for AudioScan enabling Opus support (credit goes to the original author linked above), plus some support files for LMS.
Instructions
Install the Opus libraries and sox with the Opus codec enabled. Most likely, your distribution will have it packaged already (e.g. libopus, libopus-dev, opus-tools, sox in Debian)
Note: if your sox version doesn't support Opus (check with sox -h), you can compile it yourself or use opusdec instead. However, you will lose the ability to seek in a track when using opusdec.
Download the attached zip and build the module:
Code:
mkdir build; cd build
wget https://raw.githubusercontent.com/Logitech/slimserver-vendor/public/7.9/CPAN/buildme.sh
wget http://search.cpan.org/CPAN/authors/id/A/AG/AGRUNDMA/Audio-Scan-0.96.tar.gz
wget https://github.com/Logitech/slimserver-vendor/raw/public/7.9/CPAN/Sub-Uplevel-0.22.tar.gz
wget https://github.com/Logitech/slimserver-vendor/raw/public/7.9/CPAN/Test-Warn-0.23.tar.gz
wget https://github.com/Logitech/slimserver-vendor/raw/public/7.9/CPAN/Tree-DAG_Node-1.06.tar.gz
unzip lmsopus-alpha.zip
tar xzf Audio-Scan-0.96.tar.gz
cd Audio-Scan-0.96
patch -p1 < ../Audio-Scan-0.96.opus.patch
cd ..
mv Audio-Scan-0.96.tar.gz Audio-Scan-0.96.orig.tar.gz
tar czf Audio-Scan-0.96.tar.gz Audio-Scan-0.96
chmod +x buildme.sh
./buildme.sh Audio::Scan
If the build was successful, you'll find the perl modules in
Code:
./build/arch/<perl version>/<architecture>
e.g. for perl 5.24 on Linux 64bit:
Code:
build/arch/5.24/x86_64-linux-thread-multi
copy the content of the build/arch directory to your LMS installation's CPAN/arch folder
e.g. if your LMS is in opt/logitechmediaserver-7.8-0-noCPAN, the full final path will be
Last edited by Roland0; 2017-02-27, 18:38.
Reason: added modules.conf
Various SW: Web Interface | Text Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Ambient Noise Mixer | DB Optimizer | Image Enhancer | Chiptunes | LMSlib2go | ... Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...
> The main issue is that the library LMS uses to read audio metadata
> (AudioScan) doesn't support Opus. I did, however, find a 'forked
> version' (https://github.com/jrmuizel/AudioScan-opus/) which does.
> As this one hasn't been updated in a while, I decided to merge the Opus
> support into the current AudioScan.
This is pretty cool, I had no idea someone had worked on this years ago. I'd be happy to add this to Audio-Scan if you want to submit a pull request.
I didn't submit a pull request, since I'm not the original author.
I guess we have the following options:
- Motivate the original author to submit the pull request
- You apply my patch directly (possibly in a feature branch)
- I fork AudioScan, apply the patch, and submit a pull request
What would you prefer?
Various SW: Web Interface | Text Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Ambient Noise Mixer | DB Optimizer | Image Enhancer | Chiptunes | LMSlib2go | ... Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...
I didn't submit a pull request, since I'm not the original author.
I guess we have the following options:
- Motivate the original author to submit the pull request
- You apply my patch directly (possibly in a feature branch)
- I fork AudioScan, apply the patch, and submit a pull request
AudioScan has been updated with this patch (not in LMS yet). But are you the author of the LMS side changes? Would you be able to provide a pull request, or all wrapped up in a little plugin?
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
AudioScan has been updated with this patch (not in LMS yet). But are you the author of the LMS side changes?
Yes
Would you be able to provide a pull request,
Since I have little git know-how and none using it with github, this could take a while, as I'm a bit busy atm.
Everything that needs to be done is described in the first post, however, and the one new source file is in the attached zip, in case you want to speed things up by doing it yourself.
or all wrapped up in a little plugin?
Back when I wrote it, it wasn't obvious to me how a plugin could add a new format (incl. metadata etc.).
Any example available?
Various SW: Web Interface | Text Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Ambient Noise Mixer | DB Optimizer | Image Enhancer | Chiptunes | LMSlib2go | ... Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...
I can’t find OggOpus.pm in your posting. It isn’t in the archive either, is it?
It's in the zip (as are the *.conf files)
Various SW: Web Interface | Text Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Ambient Noise Mixer | DB Optimizer | Image Enhancer | Chiptunes | LMSlib2go | ... Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...
Oh... the iOS .zip preview only shows the first file in the archive (and
I don't even know where that preview is coming from, as I don't see it
on the iPad?!?).
Is that scanBitrate() method really needed? It's my understanding that
most of it is dealing with scanning remote streams. Is this a topic with
Opus?
--
Michael
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
Is that scanBitrate() method really needed? It's my understanding that
most of it is dealing with scanning remote streams. Is this a topic with
Opus?
I'd assume so, see e.g. here.
IIRC, I haven't actually tested if it works, though...
Various SW: Web Interface | Text Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Ambient Noise Mixer | DB Optimizer | Image Enhancer | Chiptunes | LMSlib2go | ... Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...
Error: Unable to load Slim::Formats::OggOpus: Can't locate Slim/Formats/OggOpus.pm
Hey everyone, i decided to give Opus a shot, upgrading from Vorbis -q6 to date. However, my LMS v8.1.0, 1608700893 on Windows 10 won't pick up any .opus files. The error thrown is [21-01-01 18:28:34.2421] Slim::Formats::readTags (186) Error: Unable to load Slim::Formats::OggOpus: Can't locate Slim/Formats/OggOpus.pm in @INC .....
BEGIN failed--compilation aborted at (eval 1207) line 2.
I found this thread but it doesn't seem applicable anymore as Andy apparently included Opus in the scanner a while ago.
How can I make this work?
Thanks!
EDIT:
So I tried adding the same files Opus encoded in .ogg instead of .opus containers, to make sure the .opus container wasn't throwing it off. Result: the scanner doesn't even see them - they don't even show up in the scanner logs. (!?)
These Ogg Opus files play fine in Windows (Groove.exe), Foobar 2000 and my Android phone.
In summary:
.ogg Vorbis --> works as expected
.ogg Opus --> appears "invisible", scanner doesn't even pick it up
.opus Opus --> scan throws error above
Any ideas?
Last edited by damazta; 2021-01-01, 18:53.
Reason: additional insight
> Hey everyone, i decided to give Opus a shot, upgrading from Vorbis -q6
> to date. However, my LMS v8.1.0, 1608700893 on Windows 10 won't pick up
> any .opus files. The error thrown is [21-01-01 18:28:34.2421]
> Slim::Formats::readTags (186) Error: Unable to load
> Slim::Formats::OggOpus: Can't locate Slim/Formats/OggOpus.pm in @INC
> .....
> BEGIN failed--compilation aborted at (eval 1207) line 2.
I'm sorry, my mistake. Windows always needs a little more love. I forgot
to add the necessary file to the build configuration. Please check for
updates later today.
--
Michael
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
Yeah, Windows needs more love, but because of that LMS is a lot easier for me to install and update on Windows than on Linux.
I ran LMS on a QNAP NAS for years and maintaining it was always a nightmare for me, as i don't know my way around Linux.
So i really appreciate the effort you and the community put in to supporting LMS on Windows - so i don't have to.
btw is there something like a patreon or paypal account for donations?
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment