Gstreamer omxh264enc framerate=0/1 problem

When I use this Gstreamer pipeline:

gst-launch-1.0 videotestsrc ! "video/x-raw,width=640,height=480,framerate=24/1" ! videoconvert ! omxh264enc ! h264parse ! rtph264pay ! udpsink port=9000

With this receiver pipeline:

gst-launch-1.0 -v udpsrc port=9000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! avdec_h264 ! videoconvert ! xvimagesink

avdec_h264 outputs that framerate=(fraction)0/1
Gstreamer isn’t able to determine the framerate, because of this a lot of (RTP) players aren’t able to play this RTP stream.
When I try this pipeline with the same receiver pipeline but with x264enc encoder:

gst-launch-1.0 videotestsrc ! "video/x-raw,width=640,height=480,framerate=24/1" ! videoconvert ! x264enc ! h264parse ! rtph264pay ! udpsink port=9000

The output of the same receiver pipeline is this:

/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)0164001effe1001d6764001eacd940a03db016a0c020b4a0000003002000000611e2c5b2c001000568ebecb22c, level=(string)3, profile=(string)high
/GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)0164001effe1001d6764001eacd940a03db016a0c020b4a0000003002000000611e2c5b2c001000568ebecb22c, level=(string)3, profile=(string)high
/GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)24/1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)24/1
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)24/1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)24/1
Redistribute latency...

Here you can see that the framerate is set correctly.

I think there is some missing information in the omxh264enc H264 stream. How can I fix this?

Hi,
Please try nvv4l2h264enc. We are deprecating omx plugins and move to use v4l2 plugins. Please check if you also see the issue in using v4l2 plugins.