Search code examples
tcpgstreamerrtspip-camera

Gstreamer rtsp receiving from ipcamera


I have cheap ip camera based on Ambarella soc, and I'm trying to recive rtsp stream from it. It works with ffmpeg

ffplay -rtsp_transport tcp -i rtsp://admin:[email protected]:80/0

but when I'm trying to get it with gstreamer

gst-launch-1.0 -m tcpclientsrc rtspsrc location=rtsp://admin:[email protected] port=80 ! decodebin ! autovideosink

I have a problem:

Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Got message #0 from element "streamsynchronizer0" (state-changed): GstMessageSta teChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_REA DY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #1 from element "playsink" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending -state=(GstState)GST_STATE_VOID_PENDING; Got message #2 from element "playbin0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending -state=(GstState)GST_STATE_PAUSED; Got message #6 from element "streamsynchronizer0" (state-changed): GstMessageSta teChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PA USED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #7 from element "uridecodebin0" (state-changed): GstMessageStateChan ged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pe nding-state=(GstState)GST_STATE_PAUSED;


Solution

  • try this,

    gst-launch-1.0 rtspsrc location="rtsp://admin:[email protected]:80" ! rtph264depay ! h264parse ! nv_omx_h264dec ! ffmpegcolorspace ! queue ! xvimagesink
    

    you can obtain the correct rtsp id from source code of the web browser, if you try to stream it there.