Oct. 22, 2009Abhishek Mehra
I am currently using JW player V4.5.
On playing an MP3 file on the JW player the wrong duration is getting displayed.This is frequently happening in MP3 files with duration greater than 40 minutes.
A 40 min file duration is being displayed as 112 mins.Also once the file is fully loaded on clicking the control bar beyond the 40 min duration mark no audio is played(player becomes dumb).
I also tried using the JW player v4.6 but the same problem persists.
Oct. 25, 2009Zachary Ozer
Hi Abhishek,
Can you provide an example MP3 we can test against?
Oct. 26, 2009Abhishek Mehra
I have uploaded a test mp3 file of actual duration 4.48 mins.
To access it please visit the ftp portal:
-------------------------------------------------------
https://portal.fleishman.com/public/
-------------------------------------------------------
To file resides at the given folder location
-------------------------------------------------------
/Incoming/Test MP3 JW Player
-------------------------------------------------------
When we run this file it sometimes shows the correct duration and sometimes the wrong duration that is 19.13 mins.
Even if you refresh the JW player multiple times the when correct duration is displayed, then also the above problem persists.
I will get back with a sample mp3 with a longer duration(40 mins+).
I
Oct. 26, 2009hobbs
Your MP3 file is improperly encoded.
As soon as I saved the file from a high-quality audio editor, the correct duration showed in the player.
Try it here: http://willswonders.myip.org:8074/Rang_Deeni_DEV.mp3
Notice that the original file has NO header!
Original file
=============
Size: 1153358 bytes
Header found at: 0 bytes
Length: 288 seconds
MPEG 2.5 layer 3
32kbit, 5544 frames
11025Hz Joint Stereo
CRCs: No
Copyrighted: No
Original: No
Emphasis: None
After Saving from CoolEdit2000
==============================
Size: 1156663 bytes
Header found at: 1714 bytes
Length: 288 seconds
MPEG 2.5 layer 3
32kbit, 5552 frames
11025Hz Joint Stereo
CRCs: Yes
Copyrighted: No
Original: Yes
Emphasis: None
Oct. 26, 2009Abhishek Mehra
Hi hobbs , can you just tell me which tool you use to find the header information as you have listed above.
Oct. 27, 2009hobbs
WinAmp
File, View file info
Oct. 27, 2009Abhishek Mehra
Hi hobbs , from your previous comments that included "the correct duration showed in the player" implies that you were able to reproduce the problem on JW4.5.
But when I played the same file on JW4.3 it worked fine i.e showed the correct duration.Do you have any pointers on this?
Also if possible please let me know the audio editor you used to correct the mp3.
Thanks for your help.
Oct. 27, 2009hobbs
I used Cool Edit which is now Adobe Audition.
Oct. 27, 2009Abhishek Mehra
Hi hobbs, you just missed out on the other question above that:
When I played the same file(improperly encoded) on JW4.3 it worked fine i.e showed the correct duration.
Do you have any pointers on this?
Thanks
Oct. 28, 2009Zachary Ozer
Hi Abhishek,
The calculation changed between 4.3 and 4.4, and takes into account the size returned by the HTTP header. If this is incorrect, the duration duration displayed will be incorrect as well.
As a work around, you can set the duration flashvar or set it in the playlist.
Oct. 28, 2009hobbs
@Zach,
Abhishek's MP3 file is 4:48 but the player shows 19:13.
The MP3 file is missing the internal header.
As soon as I added the header, the duration showed correctly as 4:48.
I added the missing header by saving the MP3 file from an audio editor.
Oct. 28, 2009Cameron Waeland
Hi Hobbs,
The duration calculation relies upon the total size of the mp3 file in bytes. This information is contained in the mp3 header and since this information is missing the size in bytes evaluates to zero and results in the inflated duration.
In this case you can either fix the header as you did or use the workaround Zach posted.
Nov. 02, 2009Abhishek Mehra
Hi hobbs/Zach,
Can you please help me how to use the duration flashvar.
I use JW player in my application and use it to play both audio and video files stored in the Database. I stream those files via Java.
Thanks
Nov. 11, 2009eva
Hello!
I think, this still (actually in trunk (Rev. 596) is a bug!
in the sound-model the calculated duration (if not set by a flashvar) is only a estimation; just the same way the adobe flash docs propose it in there:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/index.html
... if the sound data is not fully loaded, the length property of the sound object shows only the size of the sound data that is currently loaded. An estimate of the eventual size of the full sound file is calculated by dividing the value of the current sound object's length by the value of the bytesLoaded property divided by the value of the bytesTotal property.
in the 4.3 version of jw player there was an additional 'loadedHandler' which calculated the duration of the soundModel again, when the file was loaded completly.
wouldn't it be possible to set the duration again (if it wasn't set originally by the flashvar) in the loadHandler method, when the interval is cleared?
Line 103:
item['duration'] = sound.length / 1000;
Nov. 16, 2009eva
Hello!?
is anybody reading the bug reports?
greets from a jw-player licencee.
Nov. 16, 2009hobbs
I think there must be some place in the code where Flash is reading the ID3V2 metadata and using that for the duration, because I can get the duration of a 35MB 38:16 MP3 file, which has the ID3V2 metadata in the beginning of the file, almost instantly. And it's the correct duration.
Nov. 19, 2009eva
the jw player is reading the duration you give to him via metadata (flashvar, playlist-metadata and - @hobbs - not out of id3-tags so far i know). And since 4.4 he respects it, so that you can chapterize longer audio-files by give the jw-player a starting-point and a duration.
i think thats the point where the bug-or-feature-discussion on this thread should stop at station 'feature'.
but there is also a bug in it:
if you do not give any duration-metadata for some audio-item to the player, he estimates the duration for it as long as it hasn't load it entirely. and since 4.4 he doesn't calculate the duration again, when the file is loaded completly (see my post above).
so i think there should be this line inserted after line 102 in http://developer.longtailvideo.com/trac/browser/trunk/as3/com/jeroenwijering/models/SoundModel.as
item['duration'] = sound.length / 1000;
what do you think jw player developers???
greets,
eva
Here are some helpful links to learn more about the JW Player™:
Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!
If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.