Support for larger files?

Ask Questions or make comments about Mp3 Toolbox
Post Reply
User avatar
djamps
Posts: 28
Joined: Sun Sep 22, 2002 3:57 pm
Contact:

Support for larger files?

Post by djamps »

:?

I have a problem with large files. Seems anything over a few megs will give a [timed out] message in winamp. My goal is to be able to stream >60 meg files.. is there anything in the code I can remove that will ease the CPU load on these larger files?

I have a few different file sizes uploaded for testing purposes...

http://beatbasement.net/ass/

User avatar
djamps
Posts: 28
Joined: Sun Sep 22, 2002 3:57 pm
Contact:

Post by djamps »

it appears the larger the file, the longer it takes to start streaming, or the longer it takes while "connecting"...

the file size threshold for timing out is about 2.5 - 3 megs --- 2.5 meg times outs 50% of the time and 3.0 is hopeless.

User avatar
Jay
Will work for food (Administrator)
Posts: 2942
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

hmm well that's weird. I have not encountered this with any of my files. One thing it could be is that your files were encoded strangely and the frame decoder is not finding a header in a quick enough fashion, especially on 60MB files. But it's odd that it finds it quickly enough in the index. Could you give some specs about the encoder, how the files are encoded what type of system this script is running on?

I have passed files as large as 10MB with no problem on Windows and Unix based systems.
- Jay

User avatar
Jay
Will work for food (Administrator)
Posts: 2942
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

well I just tried a 66MB and it worked fine so the possiblilities are: a) there is something wrong with your file system. or b) your PHP version / configuration is not compatible with this script or c) your webserver is not compatible with this script.
- Jay

User avatar
djamps
Posts: 28
Joined: Sun Sep 22, 2002 3:57 pm
Contact:

Post by djamps »

the mp3's i have uploaded are a mixture of Xing, FHG, and LAME encodings. It doesn't matter which encoder is used, as the delay before the actual prebuffering starts is proportional to the file size. I was able to increase the maximum size from 3 to about 10 megs by increasing the meta interval, but thats about as large as i could get. It seems the meta data function is directly connected with this problem. If there was a way to completely disable it, I feel there would be a better chance of being able to stream large files.

PHP is fully up to date, the server is running FreeBSD, and is moderatly loaded.

User avatar
Jay
Will work for food (Administrator)
Posts: 2942
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

Well Metadata is not neccessarily a function but rather it is a value for how many bytes per pass to pull from the file. I looked at your installation and found that the stream would pause indefinately. Also it seems as though it pauses on any file function. And this doesn't relate to the header decoder. For instance if you click the Listen to just a single mp3 it opens winamp and starts the Stream command this command does not use the header decoder function in mp3toolbox beta 4, so it's not that. It is probably hanging on fread which is a PHP function. This function is designed to pull data from a file.

Do you by chance have output_buffering turned on in PHP?

Let us try something, add a file to your mp3toolbox directory called test.php and put the following code in it:

Code: Select all

<?php
$fp = fopen("/path/to/an/mp3.mp3", "rb");
while (!feof($fp))
{
echo fread($fp, 8192);
}
fclose($fp);
?>
Where "/path/to/an/mp3.mp3" is put a path to a real existing mp3 on your system. When you go to this page in your browser it should immidiately spit garbage out at you (the data from the mp3) through your browser. Let me know if this works or not.
- Jay

User avatar
Jay
Will work for food (Administrator)
Posts: 2942
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

ok scratch all that above, I have been able to reproduce your problem by turning output_buffering to On, you should go into your php.ini file to turn it off.
- Jay

User avatar
djamps
Posts: 28
Joined: Sun Sep 22, 2002 3:57 pm
Contact:

Post by djamps »

Thanks, Jay. I am not a php expert and would not have figured it out on my own. I will get back to you soon with the results, as the server admin must configure the php.ini.

User avatar
djamps
Posts: 28
Joined: Sun Sep 22, 2002 3:57 pm
Contact:

Post by djamps »

I have output_buffering now on, however it did not change the situation. Have a look at the config if you like.

http://www.beatbasement.net/test.php

Any other clues??

User avatar
Jay
Will work for food (Administrator)
Posts: 2942
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

yea output_buffer should be Off. Mp3 toolbox wants to send stuff as it's executing.

By having the output_buffer On you are in effect blocking mp3 toolbox's ability to send a stream while the script is executing.
- Jay

User avatar
Jay
Will work for food (Administrator)
Posts: 2942
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

well I just added some output buffering functions to beta 5 to disable it per session just in case you happen to have it turned on so if you want to just not worry about it, wait for beta 5 it should fix this issue.
- Jay

User avatar
djamps
Posts: 28
Joined: Sun Sep 22, 2002 3:57 pm
Contact:

Post by djamps »

Jay wrote:well I just added some output buffering functions to beta 5 to disable it per session just in case you happen to have it turned on so if you want to just not worry about it, wait for beta 5 it should fix this issue.
thanks for the new release, it works great. props on the great software, jay!!

Post Reply