supernginx / flowplayer-core

Automatically exported from code.google.com/p/flowplayer-core
0 stars 0 forks source link

audio: duration incorrect when browser cache empty #559

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. empty browser cache
2. go to http://flowplayer.org/demos/standalone/plugins/flash/audio.html

What is the expected output? What do you see instead?
Expected: time should display 3:25 duration
Instead: various durations 3:55 or 3:59 - only to be updated to 3:25 after some 
time

Will make sure whether this can be avoided by CBR encoding of audio, but so far 
my tests have come up with the same result.

Could be related to issue558?

Original issue reported on code.google.com by blacktrashproduct on 17 May 2012 at 10:51

GoogleCodeExporter commented 8 years ago
Nope, CBR encoding does not help here. It seems the duration is estimated and 
then updated when the audio clip has been buffered. This sample should make it 
a bit clearer:
http://flowplayer.blacktrash.org/test/minimal-audio.html

duration with empty cache on first load: 5:35 or 5:36, then 5:40 when buffered.

If this is a technical restriction, I have to document it, so please inform me.

Original comment by blacktrashproduct on 17 May 2012 at 10:58

GoogleCodeExporter commented 8 years ago
Yes thats how it works with http, it will get an initial duration, and then 
once the file has triggered a complete event it will update the duration again. 
On reload because it's cached it should update to the correct duration or is it 
not. 

Original comment by electrot...@gmail.com on 18 May 2012 at 2:07

GoogleCodeExporter commented 8 years ago
It's 5:27 then 5:40 once file has completed, your mp3 works I suggest its used 
as a demo or something with no copyright notices :)

Original comment by electrot...@gmail.com on 18 May 2012 at 2:08

GoogleCodeExporter commented 8 years ago
Will document this in the sense that if one needs precision regarding 
clip.fullDuration and clip.duration at load time, one should consider rtmp 
audio.

Before I had rtmp access I actually achieved this for php-pseudostreaming by 
putting the mp3 in a flv container with a tiny bogus video and injecting flv 
metadata ;-)

See: https://github.com/flowplayer/site/issues/481

Closing here.

Original comment by blacktrashproduct on 18 May 2012 at 10:25