[Bug 737599] Some decoders need AVI's header suggested buffer size

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Oct 16 00:09:10 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=737599
  GStreamer | gst-plugins-base | git

--- Comment #12 from alfonso.sanchez-beato at canonical.com 2014-10-16 07:09:06 UTC ---
Created an attachment (id=288646)
 --> (https://bugzilla.gnome.org/attachment.cgi?id=288646)
Micayala decoded CSD

I have decoded the CSD for the Micayala video, which is composed of MPEG4
headers. You can find the CSD and all the fields in the attached text file. The
more interesting fields for this bug are vbv_buffer_size and vbv_occupancy,
which could be used as hints for calculating the input buffer size. The size is
in both cases 2 MBytes.

I have also analysed the file with avprobe, doing:

$ avprobe -show_packets Micayala_DivX1080p_ASP.divx

This command shows metadata for the different packets that compose the input
stream. The one with biggest size was

[packets.packet.6035]
codec_type=video
stream_index=0
pts=N/A
pts_time=N/A
dts=2317
dts_time=96.638208
duration=1
duration_time=0.041708
size=461151.000000
pos=222467064
flags=K

The number 461151 is the one we also find in the dwSuggestedBufferSize field in
the AVI header. Therefore, the codec has inserted the maximum packet size
(461151) as the suggested input buffer size. This is more accurate than the 2
MB of the MPEG4 headers, which look more like an upper limit.

So we can use the CSD data to calculate the input buffers, but it seems like
codecs tend to put there big default values, while they put the largest chunk
they found while coding in the header, which is the exact value we need. This
is just for DivX, I guess it can be interesting to see what other codecs do.

In my opinion this makes information in the AVI header useful, as you cannot
really find the same info in the CSD, unless you parse the full file to check
for the maximum packet size before starting the decoding.

-- 
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