Gstreamer udpsrce using Gopro H10 livestream - invalid RTP payload

Trying to decode a live stream from a gopro hero 10 using gstreamer but whilst it opens fine using openCV or vlc, I can’t seem to get gstreamer to decode the feed:

“WARNING: from element /GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0: Could not decode stream.
Additional debug info:
gstrtpbasedepayload.c(466): gst_rtp_base_depayload_handle_buffer (): /GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0:
Received invalid RTP payload, dropping
0:00:04.469022853 10663 0x55917a2770 WARN rtpbasedepayload gstrtpbasedepayload.c:466:gst_rtp_base_depayload_handle_buffer: warning: Received invalid RTP payload, dropping”

I got the above using:

gst-launch-1.0 -v udpsrc port=8554 ! “application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96” ! rtph264depay ! h264parse ! decodebin ! videoconvert ! autovideosink sync=false

Any pointers in the right direction would be appreciated.

Hi,
Please make sure the protocol is UDP. If it is valid source, this command should work:

$ gst-launch-1.0 -v udpsrc port=8554 ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! fakesink

The error shows it cannot get valid h264 stream. Another possibility is the source is encoded into h265 stream or other type.

Hey @DaneLLL thanks for the reply!

using the aformentioned, it hangs after the following:

gst-launch-1.0 -v udpsrc port=8554 ! “application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96” ! fakesink

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96

So then I checked the stream in vlc, and got the following codec information: Imgur: The magic of the Internet

"Codec: H264 - MPEG-4 AVC (part 10) (h264)"

which lead me to this post explaining that I need to demux a MPEG-TS stream using “tsdemux”.

After a bit more fiddling, landed on:

"gst-launch-1.0 -v udpsrc port=8554 ! tsdemux ! decodebin ! autovideosink fps-update-interval=1000 sync=false "

The video plays through pretty cleanly now.

I have to set sync=false otherwise it came through quite pixelated and in strange field orders.

Any reccomendations to improve please let me know, new to gstreamer so keen to learn better processes.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.