Page 1 of 2

Jukebox mode with dropouts, client-stream no problem - why?

PostPosted: Sat Jul 04, 2009 6:51 am
by flacflac
Hi,

alright, so I am trying to make the Jukebox mode work but I just can't seem to get this to play without dropouts:

Whenever I play something via Jukebox everything is fine until I click on the "Home" button, which shows me 20 random albums - the loading of all the cover art apparently causes a MAJOR problem and leads to dropouts in the audio coming through the optical output from my server.

This problem does not appear or is strongly reduced when I stay inside the "Settings" tab, for example, where obviously no album art gets loaded all the time. Interestingly, this is NOT an issue when I stream via http, likely due to the buffer size.

Is there any way to have the Jukebox use a buffer as well? Where would I set that up?

Thank you.
:shock:

PostPosted: Sat Jul 04, 2009 8:09 am
by sindre_mehus
I've looked at the code, and it's already using the maximum buffer supported by the audio line.

What's your hardware configuration? I guess you're using FLAC > MP3 transcoding, which probably takes quite a lot of CPU?

PostPosted: Sat Jul 04, 2009 8:17 am
by flacflac
I am using a dual core atom (ION 330) chipset and transcode from FLAC to MP3 - any way to just use WAV or keep it in FLAC? (I guess that goes into the direction of the whole lossless-jukeboxing situation) The new ION chipset should definitely be able to handle the load, it just seems like the harddrive access on loading the images causes trouble.

Does the webplayer use a much larger buffer? Or why is there no dropout in that situation? Is there any other way for me to play music from the server until a solution is found? Maybe using the "Players"?

Thank you Sindre.
:)

PostPosted: Sat Jul 04, 2009 3:01 pm
by flacflac
Sindre, just to let you know:

I changed some settings regarding the cover art - I have about 50% of albums/folders that come with the standard "Folder.jpg" - the rest only has 600dpi scans, each with megabytes of data, so loading the "Random" page easily put a 20-50mb strain on the server.

With the images restricted to JPGs at 500x500 pixels named "Folder.jpg" there are no more dropouts. Still, this is a workaround, not really a solution: if there was a way to put out WAVE audio or FLAC audio the processing load would be reduced immensely.

Perhaps you could also implement a checkbox to ignore filesizes larger than X kilobytes in the browser views, this way it could be easier to filter than by restricting the filenames to Folder.jpg. :)

Hope you can help out with the audio output.

flacflac

PostPosted: Sun Jul 05, 2009 8:57 am
by sindre_mehus
Sorry, I've tried both FLAC and WAV decoding but I can't make it work.

Please note that Subsonic will cache and reuse the downscaled images, so the problem will reduce over time.

jflac an option?

PostPosted: Sun Jul 05, 2009 10:57 am
by flacflac
Hi Sindre,

thanks for the reply, though that's not very good news. :/

Is there any way to implement the JFLAC decoder for this?

http://jflac.sourceforge.net/index.html

It could be the default used in jukebox-mode to allow for lossless playback. As FLAC is the de-facto standard in lossless audio by now (uh oh, here comes the flame-war) it would be reasonable to implement this imho. :)

What do you think? :shock:

PostPosted: Sun Jul 05, 2009 12:51 pm
by sindre_mehus
It was the jlfac decoder I used (as a Java Sound plugin to JavaZoom JLayer).

PostPosted: Sun Jul 05, 2009 1:19 pm
by flacflac
Hmm, do you have an idea what the problem is? I mean theoretically this should work, right? :/

Or could you imagine a workaround that would kickstart the selected playlist through an external player on the server using the actual source/flac files?

Thank you.

ff

PostPosted: Sun Jul 05, 2009 7:33 pm
by sindre_mehus
Good news: I managed to decode WAV in jukebox mode :-)

I had to make a workaround for a bug (in JLayer, Java Sound or one of the audio codecs), and then set up a flac > wav transcoding.

This will solve your problem since you get lossless audio and low cpu usage.

PostPosted: Sun Jul 05, 2009 9:24 pm
by flacflac
Ohhh EXCITING!!!

When and how can I test this new feature??!

Hotfix, pleeeease! ;)

PostPosted: Mon Jul 06, 2009 9:28 am
by sindre_mehus
flacflac wrote:When and how can I test this new feature??!


Normally in the next beta release (within a month or two), but I'm considering to set up a nightly build system so that people can always get the very latest.

PostPosted: Mon Jul 06, 2009 5:16 pm
by flacflac
Hmmm, it would be GREAT if there was a way to get a nightly - I'd install it in a heartbeat! :)

Thank you for all your efforts.

ff

PostPosted: Thu Jul 09, 2009 3:38 pm
by donpearson
sindre_mehus wrote:Normally in the next beta release (within a month or two), but I'm considering to set up a nightly build system so that people can always get the very latest.


Love that idea!

Impressive!!!

PostPosted: Sun Jul 12, 2009 7:44 am
by flacflac
Awesome, the feature works - I created a new transcode for FLAC>WAV using the command "flac -c -s -d %s" in your latest build using mvn. :)

This rocks! CPU usage went down from 12-20% to 1-2%, plus there is no 90% usage at the start of a track, this is down to 15%. Amazing, you're the man! :mrgreen:

Re: Impressive!!!

PostPosted: Sun Jul 12, 2009 8:08 am
by sindre_mehus
flacflac wrote:Awesome, the feature works - I created a new transcode for FLAC>WAV using the command "flac -c -s -d %s" in your latest build using mvn. :)


Cool! Glad that you were able to build it yourself.