[Bug 750131] mp3: Duration reported on short MP3 file is 0
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu Jul 9 06:28:48 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=750131
--- Comment #14 from Vineeth <vineeth.tm at samsung.com> ---
The duration is estimated using
src_value * duration / bytes
where src_value is the bytes queried from pad
duration is the cumulative buffer duration
bytes is the cumulative size of frames being passed to push frame
In case of files encoded using lame encoder with default quality
the first frame size is 731, 2nd is 130 and from there it maintains a constant
104 till almost the end of the file..
This explains why i chose 3 frames :).... after 2nd frame the frame size is
constant, so the estimations are not changing much because of that...
if we change the quality, for example to 9
then first frame size is 365, then next 156 and later almost constant 26
I verified with different set of mp3 files, some of them blank mp3 and with
data
for all of them, it remains constant from the beginning, and in case of many
files, the estimation is also necessary, as the header might contain the actual
duration..
The estimation is being done and used for few files...
I am thinking, maybe i am wasting time on a not so important issue :P...
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list