Open amenders opened 1 month ago
I'm having this same issue. Any help would be greatly appreciated. @ryanheise
I'm having the same issue too. Any help would be greatly appreciated. @ryanheise
@ryanheise, any progress on this? Would be really helpful if this was fixed or if you could provide some direction for me.
@sethmfuller Do you have your own MP3 example?
@sethmfuller Do you have your own MP3 example?
Yes! Here is another example, @ryanheise: https://appdata.jesuslifetogether.com/appdatafiles/mp3s/audio/1166_overcoming_the_gravitational_pull/ogp04t_jesus_is_not_your_copilot.mp3
@amenders, and I are working on the same app together. So, that's why the audio urls are from the same api. Both the track @amenders put in his original post and this one are having the same issue with incorrect durations on both of our machines.
I suspected as much, which is why I immediately downgraded it on my priority list (I've had people in the past even use fake accounts to post "me too" comments just to artificially make it look like their issue is more in demand than it actually is, to pull my attention away from other issues where legitimately more people are having the issue. That type of usage of GitHub is actually against the GitHub terms of service. In your case, it seems that you pretended to independently have the same issue without disclosing that you are both in fact on the same case, which is a bit dishonest. My last question was just to bring it out in the open. I will now hide all the "me too" comments as they are not constructive.)
@sethmfuller wrote:
I'm having the same issue too. Any help would be greatly appreciated. @ryanheise
I suspected as much, which is why I immediately downgraded it on my priority list (I've had people in the past even use fake accounts to post "me too" comments just to artificially make it look...
@ryanheise - Truly sorry if what I said sounded dishonest. I did not mean for that to be the case. I mostly was trying to support @amenders so that our issue would get to the top of a long list of issues. We’d appreciate it if you could help us. Sorry again.
Which API doesn't behave as documented, and how does it misbehave?
AudioPlayer.duration
,AudioPlayer.durationStream
: Do not reflect the actual duration of the mp3. In the example 22kHz mono mp3 below, the actual duration of the file is 4:09 (based on play time as well as pulling duration from ffmpeg metadata), but the reportedduration
is over 18minutesAudioPlayer.seek
,AudioPlayer.positionStream
: When seeking to a position greater than the currentbufferedPosition
in a 22kHz mono mp3 (see url below), the position is reported correctly as the duration that was passed to theseek
method, but the audio playing is not from that part of the mp3. In the example of the url below, if I seek toDuration(seconds: 120)
when that position is greater than thebufferedPosition
, the audio plays from roughly the 30s position, even though thepositionStream
reports an advancing play from 120s on.Minimal reproduction project The example. Use the following url as a
AudioSource.uri
orProgressiveAudioSource
: "https://appdata.jesuslifetogether.com/appdatafiles/mp3s/audio/1164_lilies_sparrows_dont_have_energy_leaks/las05t_the_conservation_of_energy.mp3"To Reproduce (i.e. user steps, not code) Steps to reproduce the behavior: To observe the incorrect
duration
value:To observe the incorrect position on
seek
:bufferedPosition
(such as 120s).positionStream
will continue to be updated with values starting at 120s and incrementing.Error messages
Expected behavior The
duration
should match the actual play back time of the file, or the time contained in the metadata extracted by ffmpeg, which in this example are the same.When seeking to a position greater than the current
bufferedPosition
, the player should start playing the audio correctly from the position requested.Screenshots N/A
Desktop (please complete the following information):
Smartphone (please complete the following information):
Flutter SDK version
Additional context Additional minimal repro link: https://github.com/amenders/just_audio_example