FLAC streaming

General discussion about netjukebox
Post Reply
Superlexx
User
Posts: 45
Joined: Thu Feb 10, 2005 8:51 pm

FLAC streaming

Post by Superlexx »

hi, I'm trying to make NJB stream to FLAC, having some success but also problems. My settings are:

Code: Select all

$cfg['mime_type']['flac']		  = 'application/x-flac';
$cfg['stream_extension'][]          = 'flac';
$cfg['stream_codec'][]				= 'FLAC';
$cfg['stream_encode'][]             = 'D:\bin\codec\flac.exe --tag=TITLE=%title --tag=ARTIST=%artist -S- -0 -';
$cfg['stream_max_channels'][]       = 2;
$cfg['stream_transcode_treshold'][] = 0;
The first problem ist that when playing in fb2k I am getting errors

Code: Select all

ERROR (foo_flac) : FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH
ERROR (foo_flac) : FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC
at the last seconds of the file (original format is MP3, server is apache2 or IIS5.1). If I transcode an mp3 file in the command line, it plays flawlessly.

The second one is that fb2k is "processing" all FLAC files in the m3u first, causing many transcoding processes to start and run for some time (rather fb2k issue than NJB).

Any ideas?
User avatar
wbartels
netjukebox developer
Posts: 872
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Post by wbartels »

I haven't tested transcoding jet.
Without transcoding I can stream FLAC files to foobar with netjukebox 3.70b.

Is your configuration file right?

Code: Select all

$cfg['stream_transcode_treshold'][] = 0;
Or does zero have a special meaning in your script?
User avatar
wbartels
netjukebox developer
Posts: 872
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Post by wbartels »

With the unmodified netjukebox 3.70b flac streaming works with this configuration:

Code: Select all

$cfg['mime_type']['flac']           = 'application/x-flac';

$cfg['stream_extension'][]          = 'flac'; 
$cfg['stream_name'][]               = 'FLAC'; 
$cfg['stream_encode'][]             = 'D:\Console\Codec\flac.exe --tag=TITLE=%title --tag=ARTIST=%artist --tag=COMMENT=%comment -S - -0 -'; 
$cfg['stream_max_channels'][]       = 2; 
$cfg['stream_transcode_treshold'][] = 44100000;
The high treshold prevent reencoding from source FLAC files.
I have sucsesfuly tested streaming from mp3 and mpc source files to foobar 2000 (Apache web server).

What is the purpuse to stream to FLAC?
Are you trying to stream to a Squeezebox or something simular?
Superlexx
User
Posts: 45
Joined: Thu Feb 10, 2005 8:51 pm

Post by Superlexx »

With Apache2 I don't get the FLAC errors anymore (but they occur with IIS5.1), but the foobar problem is stilll there (try streaming whole album in FLAC, it takes quite long).

The PC of my little sister is pretty old and MP3 decoding takes 50% of CPU so one can hardly use it for anything else while playing music. I've heard that FLAC is very fast on decoding so I'm trying to make it work to see if it's true.
User avatar
wbartels
netjukebox developer
Posts: 872
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Post by wbartels »

Superlexx wrote:With Apache2 I don't get the FLAC errors anymore (but they occur with IIS5.1), but the foobar problem is stilll there (try streaming whole album in FLAC, it takes quite long).
On my client computer (celeron 1300) the utilization is extremely low.
On the server (celeron 900) the average utilization is below 50%.
On track changing the client buffer, therefore I get 100% utilization for a short time.

Server utilization on track change:
Image
Superlexx wrote:The PC of my little sister is pretty old and MP3 decoding takes 50% of CPU so one can hardly use it for anything else while playing music. I've heard that FLAC is very fast on decoding so I'm trying to make it work to see if it's true.
Ok, You can also try streaming to MPC.
On my computer extracting MPC files is even faster that extracting FLAC files.
User avatar
wbartels
netjukebox developer
Posts: 872
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Post by wbartels »

Windows XP processor priority is default different from Windows 2003.
Maybe this will help:

Code: Select all

My Computer > Properties > Advanced > Performance Settings > Advanced > Background services
Post Reply