zero duration for some media

by Peter Jeffe » Thu, 09 Apr 2009 04:13:44 GMT

Sponsored Links
 Some audio files return 0 from MediaPlayer.getDuration(), even though
they're perfectly valid files that play ok and that players on Windows
can find the duration of.

There seem to be two different cases here: certain file types such
as .wma and .wav always return 0 duration, and others only do so
sometimes.  I haven't been able to find any pattern in the latter
case, but it does seem consistent per file.

The music player displays 0:00 duration for these, so it's not just my
code.  Any ideas on what's causing this and whether there's a
workaround?  Thanks.

-- Peter


zero duration for some media

by l hx » Thu, 09 Apr 2009 20:00:45 GMT

 today, i found this matter. and i see some code and found that the duration
of the file such as wma and wmv in the datebase is also 0. i will go on it.
who know why and how to solve, please give some advise.


Sponsored Links

zero duration for some media

by Peter Jeffe » Mon, 13 Apr 2009 07:34:46 GMT

 Hey Dave Sparks, any comment on this?  I understand that wma decoding
isn't handled by opencore, but that doesn't really answer why the
scanner shouldn't get durations from the codec through a standard
interface.  But my main concern is why do I get 0 duration from mp3s,
m4as, oggs, etc.?  To repeat, these are perfectly valid files that
play OK, and from which other media players can grok the duration.
It's a pretty big problem, so any ideas?  Thanks!

-- Peter


Other Threads

1. no network connectivity when running android in virtual box

is network connectivity supported in Android Live?  because i cannot
visit any url pages online.

if so, what is the appropriate config?

2. iPhone versus Android securit

Any ideas about this?

Personally I think jail-breaking should be harder to do if the
root of trust started in HW.  I you can install anything, it seems
that all bets are off and that should be limited to "dev-phones".


3. Soft references freed too early

4. I have attached example of intent.putextra intent.getExtras please check it its not working

5. Get contents of EditText to string

6. Yaffs2 Image Help

7. Home Screen Sample