Native AAC Squeezebox playback working...

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
florca
Posts: 25
Joined: Mon Mar 14, 2011 9:57 pm

Native AAC Squeezebox playback working...

Post by florca »

Thanks to a new software player developed by "Triode" (author of many excellent Squeezebox Plugins, including the peerless BBC iPlayer plugin) we can now have "native" AAC / MP4 / ADTS playback on the Joggler without a full LMS install. More details are at this thread http://forums.slimdevices.com/showthrea ... sa-only%29 and I'm currently listening to it running "underneath" the standard roobarb! Squeezeplay on the O2 o/s. Works really well, and means that you can run with a much more lightweight LMS system.

It also runs well on a Raspberry Pi - opening up all sorts of options for headless players / remote controllers etc.

Needs to be installed with the various decoder runtime libraries, and my installation method (copying the libs off an Ubuntu system into the Joggler /usr/lib directory) is a bit basic / flaky - but all working well so far!

Brgds

Phil
User avatar
offbeatdave
Posts: 1045
Joined: Wed Mar 09, 2011 10:43 pm

Re: Native AAC Squeezebox playback working...

Post by offbeatdave »

Cool. Any chance you could upload/list the libs and give a quick step by step?
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
florca
Posts: 25
Joined: Mon Mar 14, 2011 9:57 pm

Re: Native AAC Squeezebox playback working...

Post by florca »

It needs libfaad2 for AAC decode, libflac8 & libogg for FLAC, libmad0 for MP3 and libvorbisidec1 for OggVorbis. The absence of a package manager or even dpkg on the native OS finally spurred me to move today from a very ancient native+Squeezeplay setup to installing Roobarb!s SqpOS, which is now working well with Squeezelite underneath.

So for SqpOS....

All of the libraries apart from libmad & libvorbisidec are already installed on SqpOS, so pretty simple really...

ALL THIS ASSUMES YOU'RE RUNNING "NORMAL" SqpOS, have enabled SSH and are running with a "mixer" version of asound.conf - if you're running with a "simple" (non-mixer) version then the first player to activate will grab the output device exclusively!

To install it you need to SSH into the Joggler and then:

install the missing libraries:

Code: Select all

sudo apt-get install libmad0 libvorbisidec1
get the squeezelite binary, move it to/usr/bin and make it executable:

Code: Select all

wget http://squeezelite.googlecode.com/files/squeezelite-i386
sudo mv squeezelite-i386 /usr/bin/squeezelite
sudo chmod uga+x /usr/bin/squeezelite
then try

Code: Select all

squeezelite -h
you should get a list of options, you might then want to try:

Code: Select all

squeezelite -d decode=debug
to check which codecs are loaded. End via CTRL-C

After that start running "for real" in background via:

Code: Select all

squeezelite -n Squeezelite -m aa:bb:cc:dd:11:22 &
The only critical thing here is to specify a MAC address (via -m option) which is different to the native Joggler MAC, as things get very confused if they're the same (or allowed to default to being the same)!

You can then control via the Squeezeplay UI by selecting "Squeezelite" in Settings=>Choose Player

I'm leaving it like this for a while before starting at bootup via an init script.

So far so good.....

Phil
Last edited by florca on Sun Dec 09, 2012 1:27 pm, edited 1 time in total.
jogglerhase
Posts: 174
Joined: Wed Aug 08, 2012 3:02 pm

Re: Native AAC Squeezebox playback working...

Post by jogglerhase »

Hi florca;
could you also give details on how to implement this similar to your original setup?
(i.e. '...running "underneath" the standard roobarb! Squeezeplay on the O2 o/s....')
This would be great, since I hope this could be a way to keep Squeezemusic running while using other Apps within offbeatdaves PNPIII System.
See my earlier questions in the original PNPIII thread below.

Pls let us know;
thanks and all the best, Heiner

jogglerhase wrote:Hi offbeatdave;
regarding my old question
jogglerhase wrote:Hi;....
I was wondering, if there is a way to have Squeezeplay running and be able to go back to the main screen to run i.e. an egg timer while Squeezeplay keeps playing music?
Kind of like the radio app, which you can have running while returning to the home screen and doing other stuff while Radio keeps playing.....
Heiner
Would this be a way into it:
florca wrote:Thanks to a new software player developed by "Triode" (author of many excellent Squeezebox Plugins, including the peerless BBC iPlayer plugin) we can now have "native" AAC / MP4 / ADTS playback on the Joggler without a full LMS install. More details are at this thread http://forums.slimdevices.com/showthrea ... sa-only%29 and I'm currently listening to it running "underneath" the standard roobarb! Squeezeplay on the O2 o/s. Works really well, and means that you can run with a much more lightweight LMS system.
.....Needs to be installed with the various decoder runtime libraries, and my installation method (copying the libs off an Ubuntu system into the Joggler /usr/lib directory) is a bit basic / flaky - but all working well so far!
Brgds
Phil
Again, it would be so great to be able to keep 'squeezemusic' playing while checking mail, running eggtimer, ....

What do you think?
Do you see any chance for this to be implemented in your great PNPIII st. OS enhancement?

All the best, Heiner
florca
Posts: 25
Joined: Mon Mar 14, 2011 9:57 pm

Re: Native AAC Squeezebox playback working...

Post by florca »

jogglerhase wrote:Hi florca;
could you also give details on how to implement this similar to your original setup?
Not sure I can give you simple, generic "from scratch" instructions as I cheated and simply copied across the missing libs from another Ubuntu system which already had them installed. The other instructions above should be valid (although you won't need "sudo" on the native OS).

What you're trying to achieve (use squeezelite as a background player, operable when Squeezeplay is inactive) should work fine - just tried "relaunching" Squeezeplay on SqpOS and squeezelite continued playing without missing a beat...

Brgds

Phil
jogglerhase
Posts: 174
Joined: Wed Aug 08, 2012 3:02 pm

Re: Native AAC Squeezebox playback working...

Post by jogglerhase »

Thanks for your feedback, florca!
Since I am quite ignorant wrt programming aso, I am hoping that offbeatdave will take up the challenge...
:-).
Let's cross fingers - I think this would be a great enhancement for PNPIII usability.

Cheers, Heiner
jogglerhase
Posts: 174
Joined: Wed Aug 08, 2012 3:02 pm

Re: Native AAC Squeezebox playback working...

Post by jogglerhase »

Hi Phil / florca;
sorry to bug you again.
I would like to try and follow your initial 'cheating' approach, as I am running original OS w/ PNPIII, where 'apt-get ....' seems not to work...
-> Could you share the actual files (missing libs) and their location which you used. Since these are open source, it should be ok to send them, I guess?
Let me know, if you could do this.

Thanks for your help!
Heiner
User avatar
offbeatdave
Posts: 1045
Joined: Wed Mar 09, 2011 10:43 pm

Re: Native AAC Squeezebox playback working...

Post by offbeatdave »

jogglerhase wrote:I am hoping that offbeatdave will take up the challenge...

I might do if someone (OP?) can provide a zip/tar of the libs and specify their exact location. I've had a little go but Squeezelite can't find the libs so I think I've popped them in the wrong place or used the wrong versions.
Could you share the actual files (missing libs) and their location which you used.
I'll echo this request!
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
florca
Posts: 25
Joined: Mon Mar 14, 2011 9:57 pm

Re: Native AAC Squeezebox playback working...

Post by florca »

libs.tar.gz
i386 Debian runtime libraries for all squeezelite codecs
(443.53 KiB) Downloaded 370 times
Sorry for long silence, but I've been busy at work this week.

All of the runtime libraries should go in /usr/lib

the underlying files and their symlinks (as from a SqpOS / Debian install) are attached as a gzipped archive:

Code: Select all

joggler@joggler:~$ tar -czpf libs.tar.gz /usr/lib/libFLA* /usr/lib/libog* /usr/lib/libfaad* /usr/lib/libmad* /usr/lib/libvorbisid*
tar: Removing leading `/' from member names
joggler@joggler:~$ tar -tvzf libs.tar.gz
lrwxrwxrwx root/root         0 2012-07-25 13:53 usr/lib/libFLAC.so.8 -> libFLAC.so.8.2.0
-rw-r--r-- root/root    309904 2010-03-05 04:00 usr/lib/libFLAC.so.8.2.0
lrwxrwxrwx root/root         0 2012-07-25 13:52 usr/lib/libogg.so.0 -> libogg.so.0.6.0
-rw-r--r-- root/root     21896 2010-01-05 00:58 usr/lib/libogg.so.0.6.0
lrwxrwxrwx root/root         0 2012-07-25 13:52 usr/lib/libfaad.so.2 -> libfaad.so.2.0.0
-rw-r--r-- root/root    255300 2009-11-10 05:26 usr/lib/libfaad.so.2.0.0
lrwxrwxrwx root/root         0 2012-12-08 17:48 usr/lib/libmad.so.0 -> libmad.so.0.2.1
-rw-r--r-- root/root     87412 2010-03-19 23:31 usr/lib/libmad.so.0.2.1
lrwxrwxrwx root/root         0 2012-12-09 01:37 usr/lib/libvorbisidec.so.1 -> libvorbisidec.so.1.0.2
-rw-r--r-- root/root    132676 2009-11-07 05:35 usr/lib/libvorbisidec.so.1.0.2
I think that the files / links I tried on the original O2 OS were (from memory) pretty similar to this, but I no longer have that build easily available. If squeezelite hit issues loading these libs, are you sure they (or the links) were marked executable?

It's also worth getting an updated copy of squeezelite from googlecode, as the latest build has a number of enhancements including ICY Metadata support (so that song titles and album artwork are visible on many radio streams) and better gapless support. I've also being testing various ALSA setups and now have it configured such that Squeezeplay is sending "interface" sounds (eg bleeps when a selection is made on the touchscreen etc.) to the onboard loudspeaker (as the default ALSA output device) but squeezlite sends audio directly to a USB DAC - including full support for varied native sample rates. As squeezelite releases the ALSA audio device when (soft..) Powered Off this may finally resolve the "audio lockup" bug on the native OS? My config for this is:

/etc/asound.conf

Code: Select all

joggler@joggler:~$ cat /etc/asound.conf
    pcm.!default {
       type plug
       slave.pcm {
         type hw
         card 0
       }
    }

    ctl.!default {
       type hw
       card 0
    }
and a squeezelite command line of:

Code: Select all

sudo squeezelite -n Squeezelite -m 00:11:22:33:44:55 -o "front:CARD=DAC,DEV=0" > /dev/null 2>&1 &
However!!! before simply cutting and pasting this you should check the naming of your ALSA devices via "squeezelite -l" as they may vary, and perhaps choose a better MAC address...

Hope this helps,

Phil
User avatar
offbeatdave
Posts: 1045
Joined: Wed Mar 09, 2011 10:43 pm

Re: Native AAC Squeezebox playback working...

Post by offbeatdave »

Cheers. Will try when get a mo.
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
User avatar
offbeatdave
Posts: 1045
Joined: Wed Mar 09, 2011 10:43 pm

Re: Native AAC Squeezebox playback working...

Post by offbeatdave »

Wahoo! This is so cool!

Now listening to radio via Squeezeplay, having exited Squeezeplay to the Joggler OS! Might have to integrate this into a future PnP III. LMS still works alongside Squeezelite too by the look of things.
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
ilovemyjoggler
Posts: 711
Joined: Sun May 13, 2012 4:42 pm

Re: Native AAC Squeezebox playback working...

Post by ilovemyjoggler »

offbeatdave wrote:Wahoo! This is so cool!

Now listening to radio via Squeezeplay, having exited Squeezeplay to the Joggler OS! Might have to integrate this into a future PnP III. LMS still works alongside Squeezelite too by the look of things.
Offbeatdave, It would be a lovely christmas/new year gift for your die hard pnpIII fans (not that you don't generously supply us with lovely treats all year round!) ;)
gegs
Posts: 1146
Joined: Fri Mar 04, 2011 3:22 pm
Location: Edinburgh

Re: Native AAC Squeezebox playback working...

Post by gegs »

florca wrote:Thanks to a new software player developed by "Triode" (author of many excellent Squeezebox Plugins, including the peerless BBC iPlayer plugin) we can now have "native" AAC / MP4 / ADTS playback on the Joggler without a full LMS install.
According to the googlecode page it supports AAC radio streams in ADTS format but not MP4 at the moment.
http://code.google.com/p/squeezelite/
florca
Posts: 25
Joined: Mon Mar 14, 2011 9:57 pm

Re: Native AAC Squeezebox playback working...

Post by florca »

gegs wrote: According to the googlecode page it supports AAC radio streams in ADTS format but not MP4 at the moment.
http://code.google.com/p/squeezelite/
That was true for an earlier release but the support is now pretty comprehensive for native mp4 / m4a / m4b audio. I've tested it with a wide variety of iTunes downloads, Nero AAC encodes and MP4Box / ffmpeg / AtomicParsley taggings & re-muxes and they all play faultlessly, as do the ADTS AAC streams from the LMS iPlayer plugin. The only thing broken at present is FFW / REW support on certain (slightly esoteric) mp4 files.

The code has evolved considerably since 1st release and in addition to AAC now supports gapless on all codecs plus crossfade. See the Squeezebox Forums thread linked at the top of the page for more details.
User avatar
offbeatdave
Posts: 1045
Joined: Wed Mar 09, 2011 10:43 pm

Re: Native AAC Squeezebox playback working...

Post by offbeatdave »

Still can't make it play Sky Sports News Radio though!
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
florca
Posts: 25
Joined: Mon Mar 14, 2011 9:57 pm

Re: Native AAC Squeezebox playback working...

Post by florca »

offbeatdave wrote:Still can't make it play Sky Sports News Radio though!
Ah! You've found the hidden "quality" filter...

More seriously, what's the SSNR sample rate and is that rate natively supported by your output device? There's a new version just posted which supports resampling for non-native rates.

Phil
User avatar
offbeatdave
Posts: 1045
Joined: Wed Mar 09, 2011 10:43 pm

Re: Native AAC Squeezebox playback working...

Post by offbeatdave »

florca wrote: Ah! You've found the hidden "quality" filter...
:lol:
More seriously, what's the SSNR sample rate and is that rate natively supported by your output device? There's a new version just posted which supports resampling for non-native rates.
It's File Format is Windows Media, and the bitrate is 32kbps CBR. I'm just trying to output through the Joggler's sound device. I have it playing on a SqueezeOS setup with mPlayer installed. Just trying to get it going on a stock OS.
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
florca
Posts: 25
Joined: Mon Mar 14, 2011 9:57 pm

Re: Native AAC Squeezebox playback working...

Post by florca »

offbeatdave wrote: It's File Format is Windows Media, and the bitrate is 32kbps CBR. I'm just trying to output through the Joggler's sound device. I have it playing on a SqueezeOS setup with mPlayer installed. Just trying to get it going on a stock OS.
OK - that's the problem then... it doesn't support native decode of Windows Media. The only way this will work is with transcode on LMS - which should be possible with some tweaking of the File Types settings in LMS. You may need the Windows Media plugin for LMS and the w32codecs package?
User avatar
offbeatdave
Posts: 1045
Joined: Wed Mar 09, 2011 10:43 pm

Re: Native AAC Squeezebox playback working...

Post by offbeatdave »

Ah, think I may have hit the wall there then. The Windows Media Plugin needs mPlayer to be installed I believe.
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
jogglerhase
Posts: 174
Joined: Wed Aug 08, 2012 3:02 pm

Re: Native AAC Squeezebox playback working...

Post by jogglerhase »

offbeatdave wrote:Wahoo! This is so cool!
Now listening to radio via Squeezeplay, having exited Squeezeplay to the Joggler OS! Might have to integrate this into a future PnP III. LMS still works alongside Squeezelite too by the look of things.
Hi Florca Offbeatdave;
thanks so much for your efforts!
And according to Offbeatdave, it seems to work the way I hoped it would (listening to squeezemusic while exited from squeezeplayer)

So, I will try this also in the next days or wait for the next PNP release - whatever comes 1st

Again thanks to you guys - this really puts the icing on the PNPIII pimped joggler!!!!
:D
Happy holidays.
Heiner

P.S.: Florca - you can also ignore now all the PM's I send you through various forums.... I hope I did not harrass you too much..... :oops:
Post Reply