mp3 streaming problems

General discussion about netjukebox
Post Reply
Smakodak
User
Posts: 3
Joined: Sun Apr 08, 2007 11:30 pm

mp3 streaming problems

Post by Smakodak »

All my music is in .mp3 format.

If I chose stream-profile "Source", there is no problems at all. But if I chose mp3- "low", "portable" or "high", the program fires up 4-6 instances of "lame.exe" and they are maxing out my cpu. After 3-5 minutes, the music comes through, and the cpu falls to normal 1-5%.

Is this normal behavior?

I'm running w2k3server with apache/php/mysql, on a via embedded platform, with 1Ghz cpu and 1Gb ram. Since I chose to disable the audio in bios, I'm wondering if turning that on will have a positive effect on the de-/encoding!?
User avatar
wbartels
netjukebox developer
Posts: 881
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Post by wbartels »

When streaming from mp3 to mp3 "low", "portable" or "high" profile netjukebox should only fire up two instances of "lame.exe" and one "cmd.exe".
These files should be invisible on the local server but can be seen in the task manager.

I think the biggest problem with your setup is the processor power.
Encoding and decoding must be running faster than real-time.

This can be checked to select an mp3 download profile and divide the track playtime by the measure time before downloading a track starts.

Code: Select all

Example:
Playtime 6:51 = 411 seconds
Measured time 59 seconds
411 / 59 = 7 x real-time
How higher this value how faster a track starts after pressing stream.
There are also differences between media players how and how long they buffer streaming.
With the limited processor power I would advice to use Winamp or alike because it only buffers 64KB.
Smakodak
User
Posts: 3
Joined: Sun Apr 08, 2007 11:30 pm

Post by Smakodak »

Thank you wbartels

Since I want to use the service from different locations, I'll just stay with "source", as long as I'm running on my current hardware platform.

How do I permanently change the desired streaming profile to source.
I assume that I'll have to add something in the "config.inc.php". I tried editing this line into this:
$cfg['codec_dir'] = 'start /source C:\wamp\njb_codecs\\';

(C:\wamp\njb_codecs is where I unzipped the codecs!!!)

But since I'm a complete newbie in php, I don't now why it is not working!?
User avatar
wbartels
netjukebox developer
Posts: 881
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Post by wbartels »

The default value for streaming is set in the database.
If you have phpMyAdmin you can set the value of configuration_session > stream_id > DEAFAULT to –1

You can also run a little script from the netjukebox folder that will also set the default stream_id value to -1

Code: Select all

<?php
require_once('include/initialize.inc.php');
mysql_query("ALTER TABLE `configuration_session` CHANGE `stream_id` `stream_id` INT( 10 ) NOT NULL DEFAULT '-1'");
?>
If you want to set it back use:

Code: Select all

<?php
require_once('include/initialize.inc.php');
mysql_query("ALTER TABLE `configuration_session` CHANGE `stream_id` `stream_id` INT( 10 ) NOT NULL DEFAULT '0'");
?>
Smakodak
User
Posts: 3
Joined: Sun Apr 08, 2007 11:30 pm

That did it...

Post by Smakodak »

Hi wbartels

That did it. Thank you :D
User avatar
wbartels
netjukebox developer
Posts: 881
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Post by wbartels »

Since netjukebox 4.02 you can set the default steam and download profile with the web interface.
Post Reply