ROCK 5 gstreamer+mpp decode issues

I’m trying to decode rtsp stream using rkmpp.I have been installed gstreamer1.0-rockchip1 and other dependencies followed the guide.

But using the command below I got some errors output.

rock@rock-5b:~$ gst-launch-1.0 rtspsrc location=rtsp://192.168.1.36:554/ch0_0.h264 ! rtph264depay ! h264parse ! mppvideodec ! videoconvert ! video/x-raw, format=BGR ! appsink sync=false

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Pipeline is PREROLLED ...
Prerolled, waiting for progress to finish...
Progress: (connect) Connecting to rtsp://192.168.1.36:554/ch0_0.h264
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (request) SETUP stream 1
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
Redistribute latency...
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:03.405128040
Setting pipeline to NULL ...
Freeing pipeline ...
rock@rock-5b:~$

More details:

rock@rock-5b:~$ gst-launch-1.0 -m rtspsrc location=rtsp://192.168.1.36:554/ch0_0.h264 ! rtph264depay ! h264parse ! mppvideodec ! videoconvert ! video/x-raw, format=BGR ! appsink sync=false
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Got message #17 from element “appsink0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
Got message #18 from element “capsfilter0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
Got message #19 from element “videoconvert0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
Got message #20 from element “mppvideodec0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
Got message #21 from element “h264parse0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
Got message #22 from element “rtph264depay0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
Got message #23 from element “rtspsrc0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
Got message #24 from element “pipeline0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)paused;
Got message #26 from element “capsfilter0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #27 from element “videoconvert0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #28 from element “mppvideodec0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #29 from element “h264parse0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #30 from element “rtph264depay0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #31 from element “rtspsrc0” (progress): GstMessageProgress, type=(GstProgressType)start, code=(string)open, text=(string)“Opening\ Stream”, percent=(int)0, timeout=(int)-1;
Progress: (open) Opening Stream
Got message #32 from element “rtspsrc0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #33 from element “pipeline0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Pipeline is PREROLLED …
Prerolled, waiting for progress to finish…
Got message #34 from element “rtspsrc0” (progress): GstMessageProgress, type=(GstProgressType)continue, code=(string)connect, text=(string)“Connecting\ to\ rtsp://192.168.1.36:554/ch0_0.h264”, percent=(int)0, timeout=(int)-1;
Progress: (connect) Connecting to rtsp://192.168.1.36:554/ch0_0.h264
Got message #35 from element “rtspsrc0” (progress): GstMessageProgress, type=(GstProgressType)continue, code=(string)open, text=(string)“Retrieving\ server\ options”, percent=(int)0, timeout=(int)-1;
Progress: (open) Retrieving server options
Got message #36 from element “rtspsrc0” (progress): GstMessageProgress, type=(GstProgressType)continue, code=(string)open, text=(string)“Retrieving\ media\ info”, percent=(int)0, timeout=(int)-1;
Progress: (open) Retrieving media info
Got message #43 from element “rtspsrc0” (progress): GstMessageProgress, type=(GstProgressType)continue, code=(string)request, text=(string)“SETUP\ stream\ 0”, percent=(int)0, timeout=(int)-1;
Progress: (request) SETUP stream 0
Got message #44 from element “manager” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)paused;
Got message #45 from element “manager” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #46 from element “rtpssrcdemux0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)paused;
Got message #47 from element “rtpssrcdemux0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #48 from element “rtpsession0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)paused;
Got message #49 from element “rtpsession0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #50 from element “rtpstorage0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)paused;
Got message #51 from element “rtpstorage0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #87 from element “rtspsrc0” (progress): GstMessageProgress, type=(GstProgressType)continue, code=(string)request, text=(string)“SETUP\ stream\ 1”, percent=(int)0, timeout=(int)-1;
Progress: (request) SETUP stream 1
Got message #88 from element “rtpssrcdemux1” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)paused;
Got message #89 from element “rtpssrcdemux1” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #90 from element “rtpsession1” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)paused;
Got message #91 from element “rtpsession1” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #92 from element “rtpstorage1” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)paused;
Got message #93 from element “rtpstorage1” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #123 from element “rtspsrc0” (progress): GstMessageProgress, type=(GstProgressType)complete, code=(string)open, text=(string)“Opened\ Stream”, percent=(int)100, timeout=(int)-1;
Progress: (open) Opened Stream
Setting pipeline to PLAYING …
Got message #124 from element “pipeline0” (new-clock): GstMessageNewClock, clock=(GstClock)"(GstSystemClock)\ GstSystemClock";
New clock: GstSystemClock
Got message #126 from element “capsfilter0” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #127 from element “videoconvert0” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #128 from element “mppvideodec0” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #129 from element “h264parse0” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #130 from element “rtph264depay0” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #131 from element “rtspsrc0” (progress): GstMessageProgress, type=(GstProgressType)start, code=(string)request, text=(string)“Sending\ PLAY\ request”, percent=(int)0, timeout=(int)-1;
Progress: (request) Sending PLAY request
Got message #132 from element “rtspsrc0” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #133 from element “udpsink0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)playing;
Got message #134 from element “udpsink0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)playing;
Got message #135 from element “udpsink0” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #136 from element “fakesrc0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)playing;
Got message #139 from pad “fakesrc0:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)create, owner=(GstElement)"(GstFakeSrc)\ fakesrc0", object=(GstTask)"(GstTask)\ fakesrc0:src";
Got message #140 from element “fakesrc0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)playing;
Got message #141 from element “fakesrc0” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #142 from element “udpsink2” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)playing;
Got message #143 from element “udpsink2” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)playing;
Got message #144 from element “udpsink2” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #145 from element “fakesrc1” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)playing;
Got message #148 from pad “fakesrc1:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)create, owner=(GstElement)"(GstFakeSrc)\ fakesrc1", object=(GstTask)"(GstTask)\ fakesrc1:src";
Got message #149 from element “fakesrc1” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)playing;
Got message #150 from element “fakesrc1” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #151 from element “rtspsrc0” (progress): GstMessageProgress, type=(GstProgressType)continue, code=(string)request, text=(string)“Sending\ PLAY\ request”, percent=(int)0, timeout=(int)-1;
Progress: (request) Sending PLAY request
Got message #152 from pad “fakesrc0:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)enter, owner=(GstElement)"(GstFakeSrc)\ fakesrc0", object=(GstTask)"(GstTask)\ fakesrc0:src";
Got message #155 from pad “fakesrc1:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)enter, owner=(GstElement)"(GstFakeSrc)\ fakesrc1", object=(GstTask)"(GstTask)\ fakesrc1:src";
Got message #166 from element “rtpssrcdemux1” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #167 from element “rtpstorage1” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #168 from element “rtpsession1” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #169 from element “rtpssrcdemux0” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #170 from element “rtpstorage0” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #171 from element “rtpsession0” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #172 from element “manager” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #175 from pad “udpsrc1:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)create, owner=(GstElement)"(GstUDPSrc)\ udpsrc1", object=(GstTask)"(GstTask)\ udpsrc1:src";
Got message #176 from element “udpsrc1” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)playing;
Got message #177 from element “udpsrc1” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #180 from pad “udpsrc2:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)create, owner=(GstElement)"(GstUDPSrc)\ udpsrc2", object=(GstTask)"(GstTask)\ udpsrc2:src";
Got message #181 from pad “udpsrc1:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)enter, owner=(GstElement)"(GstUDPSrc)\ udpsrc1", object=(GstTask)"(GstTask)\ udpsrc1:src";
Got message #182 from element “udpsrc2” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)playing;
Got message #184 from element “udpsrc2” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #187 from pad “udpsrc4:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)create, owner=(GstElement)"(GstUDPSrc)\ udpsrc4", object=(GstTask)"(GstTask)\ udpsrc4:src";
Got message #188 from pad “udpsrc2:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)enter, owner=(GstElement)"(GstUDPSrc)\ udpsrc2", object=(GstTask)"(GstTask)\ udpsrc2:src";
Got message #192 from element “udpsrc4” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)playing;
Got message #193 from element “udpsrc4” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #196 from pad “udpsrc5:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)create, owner=(GstElement)"(GstUDPSrc)\ udpsrc5", object=(GstTask)"(GstTask)\ udpsrc5:src";
Got message #197 from element “udpsrc5” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)playing;
Got message #198 from element “udpsrc5” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #199 from element “rtspsrc0” (progress): GstMessageProgress, type=(GstProgressType)complete, code=(string)request, text=(string)“Sent\ PLAY\ request”, percent=(int)100, timeout=(int)-1;
Progress: (request) Sent PLAY request
Got message #200 from pad “udpsrc4:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)enter, owner=(GstElement)"(GstUDPSrc)\ udpsrc4", object=(GstTask)"(GstTask)\ udpsrc4:src";
Got message #202 from pad “udpsrc5:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)enter, owner=(GstElement)"(GstUDPSrc)\ udpsrc5", object=(GstTask)"(GstTask)\ udpsrc5:src";
Got message #212 from element “rtpjitterbuffer0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)playing;
Got message #213 from pad “rtpjitterbuffer0:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)create, owner=(GstElement)"(GstRtpJitterBuffer)\ rtpjitterbuffer0", object=(GstTask)"(GstTask)\ rtpjitterbuffer0:src";
Got message #214 from element “rtpjitterbuffer0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)playing;
Got message #215 from element “rtpjitterbuffer0” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #216 from pad “rtpjitterbuffer0:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)enter, owner=(GstElement)"(GstRtpJitterBuffer)\ rtpjitterbuffer0", object=(GstTask)"(GstTask)\ rtpjitterbuffer0:src";
Got message #217 from element “rtpjitterbuffer0” (latency): no message details
Redistribute latency…
Got message #221 from element “rtpptdemux0” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)playing;
Got message #222 from element “rtpptdemux0” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)playing;
Got message #223 from element “rtpptdemux0” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #237 from element “rtpjitterbuffer1” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)playing;
Got message #238 from pad “rtpjitterbuffer1:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)create, owner=(GstElement)"(GstRtpJitterBuffer)\ rtpjitterbuffer1", object=(GstTask)"(GstTask)\ rtpjitterbuffer1:src";
Got message #239 from element “rtpjitterbuffer1” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)playing;
Got message #240 from element “rtpjitterbuffer1” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #241 from pad “rtpjitterbuffer1:src” (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)enter, owner=(GstElement)"(GstRtpJitterBuffer)\ rtpjitterbuffer1", object=(GstTask)"(GstTask)\ rtpjitterbuffer1:src";
Got message #242 from element “rtpjitterbuffer1” (latency): no message details
Redistribute latency…
Got message #246 from element “rtpptdemux1” (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)playing;
Got message #247 from element “rtpptdemux1” (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)playing;
Got message #248 from element “rtpptdemux1” (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #278 from element “pipeline0” (stream-start): GstMessageStreamStart, group-id=(uint)7;
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1: Internal data stream error.
Additional debug info:
…/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1:
streaming stopped, reason not-negotiated (-4)
Got message #288 from element “udpsrc1” (error): GstMessageError, gerror=(GError)NULL, debug=(string)"…/libs/gst/base/gstbasesrc.c(3127):\ gst_base_src_loop\ ():\ /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1:\012streaming\ stopped,\ reason\ not-negotiated\ (-4)", details=(structure)“details,\ flow-return=(int)-4;”;
Execution ended after 0:00:02.415405469
Setting pipeline to NULL …
Freeing pipeline …
rock@rock-5b:~$

Is the gstreamer1.0-rockchip1 package incompatible with ROCK 5?

You need to build it from the source code for rk3588.
I think there is no hw decoding available yet.

I was pretty sure i had hw decoding working in my image with debian11 but unfortunately everything in that eMMC was lost. I tried to remember the changes i made and rebuild everything from scratch but no hw decoding yet. Maybe i missed something and i need to build the whole gstreamer but that will break a lot of things.

By hw decoding i mean in gstreamer and ffmpeg. HW decoding works with mpp.

Thanks.I will try it out.

How to build gstreamer for rockchip, when the github repo is not there anymore?

If I’m not mistaken it was here before:

https://github.com/rockchip-linux/gstreamer-rockchip.git

The rockchip guy who supports gstreamer:

Rockchip alternative dev?:

Rockchip SDK has also a gstreamer source code.

I have halted building and rebuilding gstreamer, since my problem is with the librga that is buggy and it’s been fixed on the latest SDK (for paying customers), that is what i have been told.

Please, report back if you have success with hw decoding.