mp3 not loading
-
- User
- Posts:9
- Joined:Tue Mar 12, 2013 2:56 am
- Are you a spambot?:no
Hi
we have a problem hope we can get an answer to it.
we using mp3 on our pages sometimes.
we have changed server than all the sudden the mp3 stoped working.
after few tests we have found that file sizes such as 600kb works fine but larger files “5 or 20 mb ” not loading.
there is no errors not so ever.
the mp3 feature was working fine in the old server.
is there specific configurations that we need to check in the new server?
the mp3 feature uses the getID3()
regards
we have a problem hope we can get an answer to it.
we using mp3 on our pages sometimes.
we have changed server than all the sudden the mp3 stoped working.
after few tests we have found that file sizes such as 600kb works fine but larger files “5 or 20 mb ” not loading.
there is no errors not so ever.
the mp3 feature was working fine in the old server.
is there specific configurations that we need to check in the new server?
the mp3 feature uses the getID3()
regards
-
- getID3() v1 developer
- Posts:1477
- Joined:Fri May 04, 2001 4:00 pm
- Are you a spambot?:no
- Location:Northern Ontario, Canada
- Contact:
Re: mp3 not loading
Please describe what output getID3->analyze does give you. Run this and tell me what the output is:worldobservers wrote:there is no errors not so ever.
Code: Select all
require_once('getid3.php');
$getID3 = new getID3;
$ThisFileInfo = $getID3->analyze($filename);
echo '<pre>'.htmlentities(print_r($ThisFileInfo, true)).'</pre>';
-
- User
- Posts:9
- Joined:Tue Mar 12, 2013 2:56 am
- Are you a spambot?:no
Re: mp3 not loading
Hi
where i should insert this code?
regards
where i should insert this code?
regards
-
- getID3() v1 developer
- Posts:1477
- Joined:Fri May 04, 2001 4:00 pm
- Are you a spambot?:no
- Location:Northern Ontario, Canada
- Contact:
Re: mp3 not loading
Nowhere, just create a small test file, call it whatever you want. This is just to test what errors getID3 is reporting.
Of course you'll have you point the require_once to the correct path to getid3.php, and make sure that $filename points to an MP3 file on your server.
Maybe you can also post the code that you're currently using to call getID3?
Of course you'll have you point the require_once to the correct path to getid3.php, and make sure that $filename points to an MP3 file on your server.
Maybe you can also post the code that you're currently using to call getID3?
-
- User
- Posts:9
- Joined:Tue Mar 12, 2013 2:56 am
- Are you a spambot?:no
Re: mp3 not loading
Hi
pls see attached if this is the one.
regards
pls see attached if this is the one.
regards
- Attachments
-
podcast.modifier.php
- (1.33KiB)Downloaded 688 times
-
- getID3() v1 developer
- Posts:1477
- Joined:Fri May 04, 2001 4:00 pm
- Are you a spambot?:no
- Location:Northern Ontario, Canada
- Contact:
Re: mp3 not loading
Sure, you can add some debugging output in that file, between the last two lines of get_fileduration:
This will make some ugly on your site, so do this in a test environment if possible, or if you're working on the live site then comment it out as soon as you've copied some sample output.
Code: Select all
$ThisFileInfo = $getID3->analyze(VIVVO_FS_ROOT . VIVVO_FS_FILES_DIR . $attachment->real_path);
// debugging output:
echo '<pre>'.htmlentities(print_r($ThisFileInfo, true)).'</pre>';
return round($ThisFileInfo['playtime_seconds']);
-
- getID3() v1 developer
- Posts:1477
- Joined:Fri May 04, 2001 4:00 pm
- Are you a spambot?:no
- Location:Northern Ontario, Canada
- Contact:
Re: mp3 not loading
If you want a more precise error output that's less ugly, use this instead:
Code: Select all
// debugging output
if (!empty($ThisFileInfo['error'])) {
echo '<hr>getID3 errors:<pre>'.htmlentities(print_r($ThisFileInfo['error'], true)).'</pre><hr>';
}
if (!empty($ThisFileInfo['warning'])) {
echo '<hr>getID3 warnings:<pre>'.htmlentities(print_r($ThisFileInfo['warning'], true)).'</pre><hr>';
}
-
- User
- Posts:9
- Joined:Tue Mar 12, 2013 2:56 am
- Are you a spambot?:no
Re: mp3 not loading
Hi
i did not check as yet because the server is down
could u pls see if ur code placed correctly in attached?
regards
i did not check as yet because the server is down
could u pls see if ur code placed correctly in attached?
regards
- Attachments
-
podcast.modifier.php
- (1.42KiB)Downloaded 661 times
-
- getID3() v1 developer
- Posts:1477
- Joined:Fri May 04, 2001 4:00 pm
- Are you a spambot?:no
- Location:Northern Ontario, Canada
- Contact:
Re: mp3 not loading
That's correct.worldobservers wrote:could u pls see if ur code placed correctly in attached?
-
- User
- Posts:9
- Joined:Tue Mar 12, 2013 2:56 am
- Are you a spambot?:no
Re: mp3 not loading
Hi
i have tested.
no error messages at all.
regards
i have tested.
no error messages at all.
regards
-
- User
- Posts:9
- Joined:Tue Mar 12, 2013 2:56 am
- Are you a spambot?:no
Re: mp3 not loading
Hi
when i open the page containing the small mp3 i got this error message above the header but the mp3 is playing
on page where the large mp3 file there is no error message no nothing
when i open the page containing the small mp3 i got this error message above the header but the mp3 is playing
Code: Select all
Array
(
[GETID3_VERSION] => 1.7.9-20090308
[filesize] => 675840
[avdataoffset] => 0
[avdataend] => 675840
[fileformat] => mp3
[audio] => Array
(
[dataformat] => mp3
[channels] => 2
[sample_rate] => 44100
[bitrate] => 128000
[channelmode] => stereo
[bitrate_mode] => cbr
[lossless] =>
[encoder_options] => CBR128
[compression_ratio] => 0.0907029478458
[streams] => Array
(
[0] => Array
(
[dataformat] => mp3
[channels] => 2
[sample_rate] => 44100
[bitrate] => 128000
[channelmode] => stereo
[bitrate_mode] => cbr
[lossless] =>
[encoder_options] => CBR128
[compression_ratio] => 0.0907029478458
)
)
)
[encoding] => ISO-8859-1
[filename] => www.mp3
[filepath] => /home/alankabo/public_html/files/media/mp3/miscellaneous
[filenamepath] => /home/alankabo/public_html/files/media/mp3/miscellaneous/www.mp3
[mime_type] => audio/mpeg
[mpeg] => Array
(
[audio] => Array
(
[raw] => Array
(
[synch] => 4094
[version] => 3
[layer] => 1
[protection] => 1
[bitrate] => 9
[sample_rate] => 0
[padding] => 0
[private] => 0
[channelmode] => 1
[modeextension] => 2
[copyright] => 0
[original] => 1
[emphasis] => 0
)
[version] => 1
[layer] => 3
[channelmode] => joint stereo
[channels] => 2
[sample_rate] => 44100
[protection] =>
[private] =>
[modeextension] => MS
[copyright] =>
[original] => 1
[emphasis] => none
[padding] =>
[bitrate] => 128000
[framelength] => 417
[bitrate_mode] => cbr
)
)
[playtime_seconds] => 42.24
[bitrate] => 128000
[playtime_string] => 0:42
)
-
- getID3() v1 developer
- Posts:1477
- Joined:Fri May 04, 2001 4:00 pm
- Are you a spambot?:no
- Location:Northern Ontario, Canada
- Contact:
Re: mp3 not loading
For starters, please upgrade to getID3 v1.9.5 -- the copy you're running is 4 years old.worldobservers wrote:[GETID3_VERSION] => 1.7.9-20090308
Nothing as a blank page? In that case it sounds like an error elsewhere in your code, before it gets to getID3. Turn on PHP error reporting and/or check your PHP error logs. You could also put a debugging line as the very first line of get_filedurationworldobservers wrote:on page where the large mp3 file there is no error message no nothing
Code: Select all
echo 'starting get_fileduration() in '.__FILE__.' on line '.__LINE__.'<br>';
But please(!), upgrade to the latest version of getID3 first before I go chasing bugs that have been fixed for years :)
-
- User
- Posts:9
- Joined:Tue Mar 12, 2013 2:56 am
- Are you a spambot?:no
Re: mp3 not loading
Hi
i did upgrades
pls see attached if the last code u have send placed in the right position
also the test page (very small mp3 file):
http://www.alankabout.com/australian_news/24444.html
here u go after inserting the last code u have send me:
i did upgrades
pls see attached if the last code u have send placed in the right position
also the test page (very small mp3 file):
http://www.alankabout.com/australian_news/24444.html
here u go after inserting the last code u have send me:
Code: Select all
starting get_fileduration() in /home/alankabo/public_html/modifiers/podcast.modifier.php on line 28
Array
(
[GETID3_VERSION] => 1.9.5-20130220
[filesize] => 675840
[filename] => www.mp3
[filepath] => /home/alankabo/public_html/files/media/mp3/miscellaneous
[filenamepath] => /home/alankabo/public_html/files/media/mp3/miscellaneous/www.mp3
[avdataoffset] => 0
[avdataend] => 675840
[fileformat] => mp3
[audio] => Array
(
[dataformat] => mp3
[channels] => 2
[sample_rate] => 44100
[bitrate] => 128000
[channelmode] => joint stereo
[bitrate_mode] => cbr
[lossless] =>
[encoder_options] => CBR128
[compression_ratio] => 0.0907029478458
[streams] => Array
(
[0] => Array
(
[dataformat] => mp3
[channels] => 2
[sample_rate] => 44100
[bitrate] => 128000
[channelmode] => joint stereo
[bitrate_mode] => cbr
[lossless] =>
[encoder_options] => CBR128
[compression_ratio] => 0.0907029478458
)
)
)
[encoding] => UTF-8
[mime_type] => audio/mpeg
[mpeg] => Array
(
[audio] => Array
(
[raw] => Array
(
[synch] => 4094
[version] => 3
[layer] => 1
[protection] => 1
[bitrate] => 9
[sample_rate] => 0
[padding] => 0
[private] => 0
[channelmode] => 1
[modeextension] => 2
[copyright] => 0
[original] => 1
[emphasis] => 0
)
[version] => 1
[layer] => 3
[channelmode] => joint stereo
[channels] => 2
[sample_rate] => 44100
[protection] =>
[private] =>
[modeextension] => MS
[copyright] =>
[original] => 1
[emphasis] => none
[padding] =>
[bitrate] => 128000
[framelength] => 417
[bitrate_mode] => cbr
)
)
[playtime_seconds] => 42.24
[bitrate] => 128000
[playtime_string] => 0:42
)
- Attachments
-
podcast.modifier.php
- (1.5KiB)Downloaded 673 times
-
- getID3() v1 developer
- Posts:1477
- Joined:Fri May 04, 2001 4:00 pm
- Are you a spambot?:no
- Location:Northern Ontario, Canada
- Contact:
Re: mp3 not loading
That's good, that's a start. But we already know the small MP3 file works... what do you get with a larger MP3 file?
-
- User
- Posts:9
- Joined:Tue Mar 12, 2013 2:56 am
- Are you a spambot?:no
-
- getID3() v1 developer
- Posts:1477
- Joined:Fri May 04, 2001 4:00 pm
- Are you a spambot?:no
- Location:Northern Ontario, Canada
- Contact:
Re: mp3 not loading
The sample you linked to is of a 56MB MP3 file. The page loads fine, but doesn't have any of the player controls that the smaller file does, but doesn't fail to load, and yet doesn't output the "starting get_fileduration()" debug message. This tells me that somewhere higher in your code, before the part that calls the get_fileduration function, there's something checking for maximum filesize (or possibly trying, and failing, to read the file contents into memory, for example) and so the get_fileduration function is never called. In that case it's a coding issue on your site and not related to getID3.
For what it's worth, the 56MB file analyzed just fine in getID3. Your problem is elsewhere in your code.
For what it's worth, the 56MB file analyzed just fine in getID3. Your problem is elsewhere in your code.
-
- User
- Posts:9
- Joined:Tue Mar 12, 2013 2:56 am
- Are you a spambot?:no
Re: mp3 not loading
Hi
we have installed a fresh copy into test site.
also the same.
the code been used by others no problems.
don't u thing may be some miss configurations in the server perhaps?
if possible where we should check in the server?
regards
we have installed a fresh copy into test site.
also the same.
the code been used by others no problems.
don't u thing may be some miss configurations in the server perhaps?
if possible where we should check in the server?
regards
-
- getID3() v1 developer
- Posts:1477
- Joined:Fri May 04, 2001 4:00 pm
- Are you a spambot?:no
- Location:Northern Ontario, Canada
- Contact:
Re: mp3 not loading
You could check a few settings in php.ini
For example:
* memory_limit
* post_max_size
* upload_max_filesize
Although really none of those should have the effect that you're describing.
You need to investigate the part of your code that generates the mp3-playing control, since it's deciding somewhere in there NOT to generate the player, and getID3 doesn't get involved until get_fileduration is called, so look a little before there in your code.
For example:
* memory_limit
* post_max_size
* upload_max_filesize
Although really none of those should have the effect that you're describing.
You need to investigate the part of your code that generates the mp3-playing control, since it's deciding somewhere in there NOT to generate the player, and getID3 doesn't get involved until get_fileduration is called, so look a little before there in your code.