openh264enc vs cedar_h264enc

Justas P justasp.groups at gmail.com
Fri Feb 24 21:29:47 UTC 2023


Howdy,

I am trying to set-up a video stream from an embedded device to an
application in my PC using h264 codec. I can use a straightforward
gstreamer setup to get it to work using software encoding: "gst-launch-1.0
-vv videotestsrc ! openh264enc ! rtph264pay  ! udpsink host=192.168.137.1
port=5600". However, it is not working when using hw accelerated encoder:
"gst-launch-1.0 -vv --gst-plugin-path=/usr/local/lib/gstreamer-1.0
videotestsrc ! cedar_h264enc ! rtph264pay ! udpsink host=192.168.137.1
port=5600".

I know that hw encoder definitely works because:
1) I can encode local files using HW encoder just fine.
2) I can stream h264 stream encoded using HW encoder to a gst application
in my laptop using this pipeline "gst-launch-1.0 -vv
--gst-plugin-path=/usr/local/lib/gstreamer-1.0 videotestsrc !
video/x-raw,width=800,height=600,framerate=20/1 ! videoscale ! videoconvert
! cedar_h264enc ! h264parse   ! rtph264pay config-interval=10 pt=96 !
udpsink host=192.168.137.1 port=5000"
3) If I start a video stream using openh264enc, stop it and restart using
cedar_h264enc and it works in the receiver application.

Am I missing something trivial that prevents my application from starting
to decode data encoded using cedar_h264enc? Thanks in advance.

My gst-launch debug output using openh264enc and cedar_h264enc are listed
below:

gst-launch-1.0 -vv videotestsrc ! openh264enc ! rtph264pay  ! udpsink
host=192.168.137.1 port=5600

/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps =
video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1,
format=(string)I420, multiview-mode=(string)mono,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstOpenh264Enc:openh264enc0.GstPad:src: caps =
video/x-h264, stream-format=(string)byte-stream, alignment=(string)au,
profile=(string)constrained-baseline, width=(int)320, height=(int)240,
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1,
interlace-mode=(string)progressive, colorimetry=(string)bt601,
chroma-site=(string)jpeg, multiview-mode=(string)mono,
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps =
video/x-h264, stream-format=(string)byte-stream, alignment=(string)au,
profile=(string)constrained-baseline, width=(int)320, height=(int)240,
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1,
interlace-mode=(string)progressive, colorimetry=(string)bt601,
chroma-site=(string)jpeg, multiview-mode=(string)mono,
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstOpenh264Enc:openh264enc0.GstPad:sink: caps =
video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1,
format=(string)I420, multiview-mode=(string)mono,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps =
application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264, ssrc=(uint)1706411672,
timestamp-offset=(uint)236597121, seqnum-offset=(uint)27290,
a-framerate=(string)30
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps =
application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264, ssrc=(uint)1706411672,
timestamp-offset=(uint)236597121, seqnum-offset=(uint)27290,
a-framerate=(string)30
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps =
application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, packetization-mode=(string)1,
sprop-parameter-sets=(string)"Z0LADYyNQKD5APCIRqA\=\,aM48gA\=\=",
payload=(int)96, seqnum-offset=(uint)27290,
timestamp-offset=(uint)236597121, ssrc=(uint)1706411672,
a-framerate=(string)30
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps =
application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, packetization-mode=(string)1,
sprop-parameter-sets=(string)"Z0LADYyNQKD5APCIRqA\=\,aM48gA\=\=",
payload=(int)96, seqnum-offset=(uint)27290,
timestamp-offset=(uint)236597121, ssrc=(uint)1706411672,
a-framerate=(string)30
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 236597121
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 27290

gst-launch-1.0 -vv --gst-plugin-path=/usr/local/lib/gstreamer-1.0
videotestsrc ! cedar_h264enc ! rtph264pay ! udpsink host=192.168.137.1
port=5600

/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps =
video/x-raw, format=(string)NV12, width=(int)320, height=(int)240,
framerate=(fraction)30/1, multiview-mode=(string)mono,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCedarH264Enc:cedarh264enc0.GstPad:src: caps =
video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal,
profile=(string)main, width=(int)320, height=(int)240,
framerate=(fraction)30/1
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps =
video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal,
profile=(string)main, width=(int)320, height=(int)240,
framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCedarH264Enc:cedarh264enc0.GstPad:sink: caps =
video/x-raw, format=(string)NV12, width=(int)320, height=(int)240,
framerate=(fraction)30/1, multiview-mode=(string)mono,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps =
application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264, ssrc=(uint)3957142132,
timestamp-offset=(uint)1671776860, seqnum-offset=(uint)29910,
a-framerate=(string)30
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps =
application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264, ssrc=(uint)3957142132,
timestamp-offset=(uint)1671776860, seqnum-offset=(uint)29910,
a-framerate=(string)30
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps =
application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, packetization-mode=(string)1,
sprop-parameter-sets=(string)"Z00AKdoFB8Q\=\,aO4C4XES", payload=(int)96,
seqnum-offset=(uint)29910, timestamp-offset=(uint)1671776860,
ssrc=(uint)3957142132, a-framerate=(string)30
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps =
application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, packetization-mode=(string)1,
sprop-parameter-sets=(string)"Z00AKdoFB8Q\=\,aO4C4XES", payload=(int)96,
seqnum-offset=(uint)29910, timestamp-offset=(uint)1671776860,
ssrc=(uint)3957142132, a-framerate=(string)30
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 1671776860
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 29910
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230224/2e748485/attachment.htm>


More information about the gstreamer-devel mailing list