After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 610172 - inconsistent h263pay/h263depay behaviour
inconsistent h263pay/h263depay behaviour
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.17
Other Linux
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-16 16:41 UTC by Marc Leeman
Modified: 2010-04-30 14:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marc Leeman 2010-02-16 16:41:09 UTC
I am trying to decode h263 coming from a Bosch encoder. By coincidence I noticed the following:

does NOT decode:
gst-launch udpsrc uri=udp://226.255.0.68:6000 caps="application/x-rtp, clock-rate=(int)90000, encoding-name=(string)H263, media=(string)video, payload=(int)34" ! rtph263depay ! ffdec_h263 ! xvimagesink force-aspect-ratio=True sync=True


does decode:
gst-launch udpsrc uri=udp://226.255.0.68:6000 caps="application/x-rtp, clock-rate=(int)90000, encoding-name=(string)H263, media=(string)video, payload=(int)34" ! rtph263depay ! rtph263pay ! rtph263depay ! ffdec_h263 ! xvimagesink force-aspect-ratio=True sync=True

instead of just 

... ! rtph263depay ! ...
... ! rtph263depay ! rtph263pay ! rtph263depay ! ...

behaves better.

I can only guess at this time that feeding it through the payloader parses the data in some format that the depayloader or decoder can handle better.
Comment 1 Olivier Crête 2010-02-16 16:52:57 UTC
Can you attach some sample data? like a tcpdump of the udp packets?
Comment 2 Tim-Philipp Müller 2010-02-16 16:59:51 UTC
Or gdp dump (udpsrc ! ... ! gdppay ! filesink location=h263.gdp)
Comment 3 Marc Leeman 2010-02-16 17:07:59 UTC
yeah, in a sec, was still writing the reports ;-)
Comment 4 Marc Leeman 2010-02-16 17:15:15 UTC
gst-launch udpsrc uri=udp://226.255.0.68:6000 caps="application/x-rtp, clock-rate=(int)90000, encoding-name=(string)H263, media=(string)video, payload=(int)34" ! gdppay ! filesink location=h263pay.gdp

see
http://crichton.homelinux.org/~marc/downloads/h263pay-bug-610172.gdp.gz
Comment 5 Mark Nauwelaerts 2010-04-16 15:47:32 UTC
The problem seems to be in the h263 payload header coming from the encoder.
It marks every frame's first fragment as being keyframe and subsequent fragment as not being a keyframe.  The net effect with rtph263depay is that all output buffers are marked as delta unit, so ffdec_h263 discards waiting for a keyframe.

It works running it through rtph263pay because that one does some bitpicking and then marks the I bit properly.

I have some patches pending for rtph263depay that should also take care of this (basically bitpick each frame's Mode A first fragment for the correct I bit).
Comment 6 Mark Nauwelaerts 2010-04-30 14:39:53 UTC
Previous commits also help, but the following one finishes it:

commit 0206b67b1dad066472e6557f6ada167a91c8ea6f
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Fri Apr 16 17:21:50 2010 +0200

    rtph263depay: extra keyframe info from PTYPE header

    ... as opposed to taking it from h263 payload header, which need not
    be so reliable.

    Fixes #610172.