Can not decode incoming RTP packet

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Can not decode incoming RTP packet

孝恆 呂
hi, all,

I wrote a simple RTSP client to contact an existing RTSP IP CAM,

and take a conversation to the CAM:

>> OPTIONS * RTSP/1.0
>> CSeq: 30

  << RTSP/1.0 200 OK
  << CSeq: 30
  << Public: DESCRIBE,SETUP,PLAY,OPTIONS,PAUSE,TEARDOWN

>> DESCRIBE rtsp://myipcam/h264.sdp RTSP/1.0
>> CSeq: 31

  << RTSP/1.0 200 OK
  << CSeq: 31
  << Cache-Control: no-cache
  << Content-Length: 171
  << Content-Type: application/sdp
  << x-Accept-Retransmit: our-retransmit
  << x-Accept-Dynamic-Rate: 1

  << v=0
  << m=video 0 RTP/AVP 96
  << a=rtpmap:96 H264/90000
  << a=control:trackID=1
  << a=fmtp:96 packetization-mode=1;profile-level-id=428032;sprop-parameter-sets=Z0KAMukGCcg=,aM48gA==

>> SETUP rtsp://myipcam/h264.sdp/trackID=1 RTSP/1.0
>> CSeq: 32
>> Transport: RTP/AVP;unicast;client_port=54962-54963

  << RTSP/1.0 200 OK
  << CSeq: 32
  << Cache-Control: no-cache
  << Session: 135514808124572
  << Transport: RTP/AVP;unicast;client_port=-10574--10573;server_port=6970-6971

>> PLAY rtsp://myipcam/h264.sdp RTSP/1.0
>> CSeq: 33
>> Session: 135514808124572
>> Range: npt=0.000-

  << RTSP/1.0 200 OK
  << CSeq: 33
  << Session: 135514808124572
  << Range: npt=now-

it works and now the RTSP IP CAM continuously streams packets to my local port number (#54962)

but for some purpose I didn't create an UDP listener on port #54962,

instead, I want to use gstreamer to playback the incoming video stream,

the below is my command:

  gst-launch -v udpsrc port=54962 caps="application/x-rtp, media=video, clock-rate=90000, encoding-name=H264" ! rtph264depay ! decodebin2 ! ffmpegcolorspace ! autovideosink

it works to receive the incoming packets,

but error occurs at the decoding stage,

...
...
0:00:53.466058000  4272   019F78E8 ERROR                 ffmpeg .:0:: decode_slice_header error
0:00:53.468058000  4272   019F78E8 ERROR                 ffmpeg .:0:: no frame!
0:00:53.677070000  4272   019F78E8 ERROR                 ffmpeg .:0:: non-existing PPS referenced
0:00:53.680071000  4272   019F78E8 ERROR                 ffmpeg .:0:: non-existing PPS 0 referenced
0:00:53.682071000  4272   019F78E8 ERROR                 ffmpeg .:0:: decode_slice_header error
0:00:53.683071000  4272   019F78E8 ERROR                 ffmpeg .:0:: no frame!
0:00:53.685071000  4272   019F78E8 ERROR                 ffmpeg .:0:: non-existing PPS referenced
0:00:53.687071000  4272   019F78E8 ERROR                 ffmpeg .:0:: non-existing PPS 0 referenced
0:00:53.689071000  4272   019F78E8 ERROR                 ffmpeg .:0:: decode_slice_header error
0:00:53.691071000  4272   019F78E8 ERROR                 ffmpeg .:0:: no frame!
...
...

can anyone helps??



--
Hsiao-heng Lu

------------------------------------------------------------------------------


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Can not decode incoming RTP packet

Wim Taymans
On Tue, 2010-05-18 at 15:22 +0800, 孝恆 呂 wrote:

> hi, all,
>
> I wrote a simple RTSP client to contact an existing RTSP IP CAM,
>
> and take a conversation to the CAM:
>
> >> OPTIONS * RTSP/1.0
> >> CSeq: 30
>
>   << RTSP/1.0 200 OK
>   << CSeq: 30
>   << Public: DESCRIBE,SETUP,PLAY,OPTIONS,PAUSE,TEARDOWN
>
> >> DESCRIBE rtsp://myipcam/h264.sdp RTSP/1.0
> >> CSeq: 31
>
>   << RTSP/1.0 200 OK
>   << CSeq: 31
>   << Cache-Control: no-cache
>   << Content-Length: 171
>   << Content-Type: application/sdp
>   << x-Accept-Retransmit: our-retransmit
>   << x-Accept-Dynamic-Rate: 1
>
>   << v=0
>   << m=video 0 RTP/AVP 96
>   << a=rtpmap:96 H264/90000
>   << a=control:trackID=1
>   << a=fmtp:96
> packetization-mode=1;profile-level-id=428032;sprop-parameter-sets=Z0KAMukGCcg=,aM48gA==
>
> >> SETUP rtsp://myipcam/h264.sdp/trackID=1 RTSP/1.0
> >> CSeq: 32
> >> Transport: RTP/AVP;unicast;client_port=54962-54963
>
>   << RTSP/1.0 200 OK
>   << CSeq: 32
>   << Cache-Control: no-cache
>   << Session: 135514808124572
>   << Transport:
> RTP/AVP;unicast;client_port=-10574--10573;server_port=6970-6971
>
> >> PLAY rtsp://myipcam/h264.sdp RTSP/1.0
> >> CSeq: 33
> >> Session: 135514808124572
> >> Range: npt=0.000-
>


>   << RTSP/1.0 200 OK
>   << CSeq: 33
>   << Session: 135514808124572
>   << Range: npt=now-
>
> it works and now the RTSP IP CAM continuously streams packets to my
> local port number (#54962)
>
> but for some purpose I didn't create an UDP listener on port #54962,
>
> instead, I want to use gstreamer to playback the incoming video
> stream,
>
> the below is my command:
>
>   gst-launch -v udpsrc port=54962 caps="application/x-rtp,
> media=video, clock-rate=90000, encoding-name=H264" ! rtph264depay !
> decodebin2 ! ffmpegcolorspace ! autovideosink
>

You forgot to pass the fmtp parameters to the depayloader on the caps.
In particular, the depayloader does not have sprop-parameter-sets which
contains SPS and PPS for the decoder.

Wim



> it works to receive the incoming packets,
>
> but error occurs at the decoding stage,
>
> ...
> ...
> 0:00:53.466058000  4272   019F78E8 ERROR                 ffmpeg .:0::
> decode_slice_header error
> 0:00:53.468058000  4272   019F78E8 ERROR                 ffmpeg .:0::
> no frame!
> 0:00:53.677070000  4272   019F78E8 ERROR                 ffmpeg .:0::
> non-existing PPS referenced
> 0:00:53.680071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> non-existing PPS 0 referenced
> 0:00:53.682071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> decode_slice_header error
> 0:00:53.683071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> no frame!
> 0:00:53.685071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> non-existing PPS referenced
> 0:00:53.687071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> non-existing PPS 0 referenced
> 0:00:53.689071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> decode_slice_header error
> 0:00:53.691071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> no frame!
> ...
> ...
>
> can anyone helps??
>
>
>
> --
> Hsiao-heng Lu
> ------------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Can not decode incoming RTP packet

孝恆 呂
thanks for your reply,

it works now.

gst-launch udpsrc port=54962 caps="application/x-rtp,media=video,clock-rate=90000,encoding-name=H264,profile-level-id=428032,sprop-parameter-sets=\"Z0KAMukGCcg\=,aM48gA\=\=\",payload=96" ! rtph264depay ! decodebin2 ! ffmpegcolorspace ! autovideosink -v

2010/5/18 Wim Taymans <[hidden email]>
On Tue, 2010-05-18 at 15:22 +0800, 孝恆 呂 wrote:
> hi, all,
>
> I wrote a simple RTSP client to contact an existing RTSP IP CAM,
>
> and take a conversation to the CAM:
>
> >> OPTIONS * RTSP/1.0
> >> CSeq: 30
>
>   << RTSP/1.0 200 OK
>   << CSeq: 30
>   << Public: DESCRIBE,SETUP,PLAY,OPTIONS,PAUSE,TEARDOWN
>
> >> DESCRIBE rtsp://myipcam/h264.sdp RTSP/1.0
> >> CSeq: 31
>
>   << RTSP/1.0 200 OK
>   << CSeq: 31
>   << Cache-Control: no-cache
>   << Content-Length: 171
>   << Content-Type: application/sdp
>   << x-Accept-Retransmit: our-retransmit
>   << x-Accept-Dynamic-Rate: 1
>
>   << v=0
>   << m=video 0 RTP/AVP 96
>   << a=rtpmap:96 H264/90000
>   << a=control:trackID=1
>   << a=fmtp:96
> packetization-mode=1;profile-level-id=428032;sprop-parameter-sets=Z0KAMukGCcg=,aM48gA==
>
> >> SETUP rtsp://myipcam/h264.sdp/trackID=1 RTSP/1.0
> >> CSeq: 32
> >> Transport: RTP/AVP;unicast;client_port=54962-54963
>
>   << RTSP/1.0 200 OK
>   << CSeq: 32
>   << Cache-Control: no-cache
>   << Session: 135514808124572
>   << Transport:
> RTP/AVP;unicast;client_port=-10574--10573;server_port=6970-6971
>
> >> PLAY rtsp://myipcam/h264.sdp RTSP/1.0
> >> CSeq: 33
> >> Session: 135514808124572
> >> Range: npt=0.000-
>


>   << RTSP/1.0 200 OK
>   << CSeq: 33
>   << Session: 135514808124572
>   << Range: npt=now-
>
> it works and now the RTSP IP CAM continuously streams packets to my
> local port number (#54962)
>
> but for some purpose I didn't create an UDP listener on port #54962,
>
> instead, I want to use gstreamer to playback the incoming video
> stream,
>
> the below is my command:
>
>   gst-launch -v udpsrc port=54962 caps="application/x-rtp,
> media=video, clock-rate=90000, encoding-name=H264" ! rtph264depay !
> decodebin2 ! ffmpegcolorspace ! autovideosink
>

You forgot to pass the fmtp parameters to the depayloader on the caps.
In particular, the depayloader does not have sprop-parameter-sets which
contains SPS and PPS for the decoder.

Wim



> it works to receive the incoming packets,
>
> but error occurs at the decoding stage,
>
> ...
> ...
> 0:00:53.466058000  4272   019F78E8 ERROR                 ffmpeg .:0::
> decode_slice_header error
> 0:00:53.468058000  4272   019F78E8 ERROR                 ffmpeg .:0::
> no frame!
> 0:00:53.677070000  4272   019F78E8 ERROR                 ffmpeg .:0::
> non-existing PPS referenced
> 0:00:53.680071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> non-existing PPS 0 referenced
> 0:00:53.682071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> decode_slice_header error
> 0:00:53.683071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> no frame!
> 0:00:53.685071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> non-existing PPS referenced
> 0:00:53.687071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> non-existing PPS 0 referenced
> 0:00:53.689071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> decode_slice_header error
> 0:00:53.691071000  4272   019F78E8 ERROR                 ffmpeg .:0::
> no frame!
> ...
> ...
>
> can anyone helps??
>
>
>
> --
> Hsiao-heng Lu
> ------------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Hsiao-heng Lu

------------------------------------------------------------------------------


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel