[Bug 695728] New: x264enc plugin has a divide by zero error when framerate is "0/1"

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Mar 12 13:47:54 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=695728
  GStreamer | gst-plugins-ugly | 1.0.1

           Summary: x264enc plugin has a divide by zero error when
                    framerate is "0/1"
    Classification: Platform
           Product: GStreamer
           Version: 1.0.1
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: Normal
         Component: gst-plugins-ugly
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: tcdgreenwood at hotmail.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Created an attachment (id=238739)
 --> (https://bugzilla.gnome.org/attachment.cgi?id=238739)
Patch for the issue

Doing the following on Ubuntu 12.10 fails with divide by zero error.  Not sure
where the error is but have a patch that seems to fix.  x264enc works great in
a number of other scenarios.  I did have a similar issue on 1.0.5 using Mac but
other updates seem to fix this so I'm not 100% sure where it fails at the
moment.

The patch works by not setting the framerate on the x264 encoder and using VFR
(as the framerate is unknown) I don't have a clock rate so I put a TODO in the
patch for that as it should be used to set the timebase (though I'm not sure
what x264 uses the timebase for) - I'm using RTP so I was tempted to hard code
the timebase to the clockrate of 90000.  Also stopped setting the keyint_max
based on the framerate as it just meant it would end up being 0.  If you think
my patch is horrible I'd like to know why as I am keen to understand gstreamer
better and am just starting on this journey.

One of my work colleagues also had this issue and worked around it by patching
the rtpvp8depay element to set the framerate to "15/1".  But that wasn't just
to prove it was the cause and didn't seem right as the framerate will be
unknown in our final pipeline as we'll use RTP and SDP doesn't usually include
framerate in our experience.

BTW I understand the pipeline is stupid, but it was the simplest thing I found
reproduced this issue.

tgreenwood at tgreenwood-gstreamer:~$ gst-launch-1.0 -v videotestsrc ! vp8enc !
rtpvp8pay ! rtpvp8depay ! vp8dec ! x264enc ! rtph264pay ! udpsink
name=sender_rtp_out port=5100 host=127.0.0.1
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps =
video/x-raw, format=(string)I420, width=(int)320, height=(int)240,
framerate=(fraction)30/1
/GstPipeline:pipeline0/GstVP8Enc:vp8enc0.GstPad:sink: caps = video/x-raw,
format=(string)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1
Redistribute latency...
/GstPipeline:pipeline0/GstVP8Enc:vp8enc0.GstPad:src: caps = video/x-vp8,
profile=(string)0, streamheader=(buffer)<
4f56503830010100014000f00000010000010000001e00000001 >, width=(int)320,
height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstRtpVP8Pay:rtpvp8pay0.GstPad:src: caps =
application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)VP8-DRAFT-IETF-01, payload=(int)96,
ssrc=(uint)1423001955, timestamp-offset=(uint)80710173,
seqnum-offset=(uint)36675
/GstPipeline:pipeline0/GstRtpVP8Depay:rtpvp8depay0.GstPad:src: caps =
video/x-vp8, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstVP8Dec:vp8dec0.GstPad:sink: caps = video/x-vp8,
framerate=(fraction)0/1
/GstPipeline:pipeline0/GstRtpVP8Depay:rtpvp8depay0.GstPad:sink: caps =
application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)VP8-DRAFT-IETF-01, payload=(int)96,
ssrc=(uint)1423001955, timestamp-offset=(uint)80710173,
seqnum-offset=(uint)36675
/GstPipeline:pipeline0/GstRtpVP8Pay:rtpvp8pay0.GstPad:sink: caps = video/x-vp8,
profile=(string)0, streamheader=(buffer)<
4f56503830010100014000f00000010000010000001e00000001 >, width=(int)320,
height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstVP8Enc:vp8enc0.GstPad:src: caps = video/x-vp8,
profile=(string)0, streamheader=(buffer)<
4f56503830010100014000f00000010000010000001e00000001 >, width=(int)320,
height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstRtpVP8Pay:rtpvp8pay0.GstPad:src: caps =
application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)VP8-DRAFT-IETF-01, payload=(int)96,
ssrc=(uint)1423001955, timestamp-offset=(uint)80710173,
seqnum-offset=(uint)36675
/GstPipeline:pipeline0/GstRtpVP8Depay:rtpvp8depay0.GstPad:src: caps =
video/x-vp8, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstVP8Dec:vp8dec0.GstPad:sink: caps = video/x-vp8,
framerate=(fraction)0/1
/GstPipeline:pipeline0/GstRtpVP8Depay:rtpvp8depay0.GstPad:sink: caps =
application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)VP8-DRAFT-IETF-01, payload=(int)96,
ssrc=(uint)1423001955, timestamp-offset=(uint)80710173,
seqnum-offset=(uint)36675
/GstPipeline:pipeline0/GstRtpVP8Pay:rtpvp8pay0.GstPad:sink: caps = video/x-vp8,
profile=(string)0, streamheader=(buffer)<
4f56503830010100014000f00000010000010000001e00000001 >, width=(int)320,
height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstRtpVP8Pay:rtpvp8pay0: timestamp = 80710173
/GstPipeline:pipeline0/GstRtpVP8Pay:rtpvp8pay0: seqnum = 36675
/GstPipeline:pipeline0/GstVP8Dec:vp8dec0.GstPad:src: caps = video/x-raw,
format=(string)I420, width=(int)320, height=(int)240,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt601, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = video/x-raw,
format=(string)I420, width=(int)320, height=(int)240,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt601, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstVP8Dec:vp8dec0.GstPad:src: caps = video/x-raw,
format=(string)I420, width=(int)320, height=(int)240,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt601, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = video/x-raw,
format=(string)I420, width=(int)320, height=(int)240,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt601, framerate=(fraction)0/1
Floating point exception (core dumped)

Hope this bug goes better than my last posting which was just horrible!! Thanks
for your help.

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