Re: Re[2]: Can Netjuke create MP3s on the fly?
Randy Perkins <[email protected]>
| Newsgroups | gmane.comp.audio.netjuke.user |
|---|---|
| Message-ID | <[email protected]> |
hello
thanks for your reply
ok i got it working and am able to recreate mp3 on the fly
however
the apache associated with the process uses over 100mb of memory
and this is for a 3 minute song originally encoded at 128kb
it also continues to use the cpu even after the song is done playing
( this is as reported by top)
if i try to restart the web server
that particular process of it has to be terminated manually
if i dont restart the web server
then when i try another song i get
Out of memory: Killed process 1201 (httpd)
on the console
( sometimes the first song wont even get completed)
this is on a P3 450mhz with 256 mb ram
and 512mb swap
redhat 8.0 with apache 2.0
here is my playmp3.php
<?php
$filename = $_REQUEST['mp3file'];
$bitrate = 64; // desired streaming bitrate
header("Content-type: audio/mp3");
set_time_limit(1800); // maximum length of a song
echo passthru("/usr/local/bin/lame -b $bitrate -f --silent
\"/var/www/html/downloads/data/mp3/$filename\" - ");
?>
here is some output from top:
2:59am up 1:11, 1 user, load average: 1.84, 0.99, 0.79
98 processes: 92 sleeping, 6 running, 0 zombie, 0 stopped
CPU states: 85.7% user, 9.5% system, 0.0% nice, 4.6% idle
Mem: 255460K av, 251428K used, 4032K free, 0K shrd, 480K
buff
Swap: 586364K av, 196496K used, 389868K free 8064K
cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
1272 apache 15 0 338M 189M 1452 S 7.0 76.1 0:04 httpd
592 ntp 15 0 1972 1972 1932 S 0.0 0.7 0:00 ntpd
1274 apache 15 0 9236 1464 1464 S 0.0 0.5 0:00 httpd
1275 apache 15 0 9288 1464 1464 S 0.0 0.5 0:00 httpd
1277 apache 15 0 9244 1464 1464 S 0.0 0.5 0:00 httpd
1276 apache 16 0 9256 1460 1460 S 0.0 0.5 0:00 httpd
1273 apache 15 0 9300 1448 1448 S 0.0 0.5 0:00 httpd
1278 apache 15 0 9232 1448 1448 S 0.0 0.5 0:00 httpd
1279 apache 15 0 9208 1448 1448 S 0.0 0.5 0:00 httpd
1269 root 15 0 7736 1428 1396 S 0.0 0.5 0:01 httpd
550 named 16 0 1604 1248 1068 S 0.0 0.4 0:00 named
552 named 15 0 1604 1248 1068 S 0.0 0.4 0:00 named
thanks for your help
randy
On Sun, 2003-03-23 at 12:24, Florian Maul wrote:
> Hello Randy,
>
> > but no matter what, the playmp3.php is not called. i have verified
> > this because i have renamed the file and i dont bomb out. i also put
> > an echo command in the top of it but it is never echoed
> Netjuke only uses play.php to stream the mp3s if you enable 'protect
> media' in the content settings. If you did not enable it the mp3s are
> streamed directly via http://yourhost/path/to/mp3s/file.mp3 without
> any processing by default. I hope that helps.
>
> Florian <[email protected]>
>
--
Randy Perkins <[email protected]>
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en