[gstreamer-bugs] [Bug 619548] qtdemux: Guess bitrate if only one stream's bitrate is unknown
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Jun 1 06:39:25 PDT 2010
https://bugzilla.gnome.org/show_bug.cgi?id=619548
GStreamer | gst-plugins-good | unspecified
Edward Hervey <bilboed> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bilboed at gmail.com
--- Comment #5 from Edward Hervey <bilboed at gmail.com> 2010-06-01 13:39:20 UTC ---
gst/qtdemux/qtdemux.c
7960 * the overall bitrate minus the sum of the bitrates of all other
streams. This
7961 * should be useful for the common case where we have one audio and one
video
7962 * stream and can estimate the bitrate of one, but not the other. */
You're forgetting to take into account the size of the header. This might have
a non-trivial impact on files with small duration.
8009
8010 sys_bitrate = (size / (duration / GST_SECOND)) * 8;
8011
Use the scale_uint64 functions just in case, and remove the size of the header
from 'size'.
scale(size, GST_SECOND * 8, duration);
(Sorry about the uglyness of this, looks like splinter is broken right now)
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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