gst-launch-1.0 using rtspsrc can't play rtsp stream, but using playbin can play rtsp stream ?

Dear Sir,

I am using a IP Camera connect to TX2 through ethernet cable. Below is my tests.
Can anyone give me some advice about gstream “rtspsrc”?

  1. Using “gst-launch-1.0 playbin”, IP Camera display correctly.
    gst-launch-1.0 playbin uri=rtsp://admin:123456@192.168.1.64:554 --gst-debug=3
nvidia@tegra-ubuntu:~$ gst-launch-1.0 playbin uri=rtsp://admin:123456@192.168.1.64:554  --gst-debug=3
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://admin:wxt123456@192.168.1.64:554
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
0:00:00.162395028 11098   0x7f780570a0 FIXME                default gstutils.c:3766:gst_pad_create_stream_id_internal:<fakesrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Progress: (request) Sent PLAY request
0:00:00.423336537 11098   0x7f5c002190 WARN                     omx gstomx.c:2826:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/nvidia/.config:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
0:00:00.428924005 11098   0x7f5c002190 FIXME           videodecoder gstvideodecoder.c:946:gst_video_decoder_drain_out:<omxh264dec-omxh264dec0> Sub-class should implement drain()
NvMMLiteOpen : Block : BlockType = 261 
TVMR: NvMMLiteTVMRDecBlockOpen: 7647: NvMMLiteBlockOpen 
NvMMLiteBlockCreate : Block : BlockType = 261 
0:00:00.432040647 11098   0x7f5c002190 FIXME           videodecoder gstvideodecoder.c:946:gst_video_decoder_drain_out:<omxh264dec-omxh264dec0> Sub-class should implement drain()
TVMR: cbBeginSequence: 1179: BeginSequence  1920x1088, bVPR = 0
TVMR: LowCorner Frequency = 180000 
TVMR: cbBeginSequence: 1529: DecodeBuffers = 5, pnvsi->eCodec = 4, codec = 0 
TVMR: cbBeginSequence: 1600: Display Resolution : (1920x1080) 
TVMR: cbBeginSequence: 1601: Display Aspect Ratio : (1920x1080) 
TVMR: cbBeginSequence: 1669: ColorFormat : 5 
TVMR: cbBeginSequence:1683 ColorSpace = NvColorSpace_YCbCr601
TVMR: cbBeginSequence: 1809: SurfaceLayout = 3
TVMR: cbBeginSequence: 1902: NumOfSurfaces = 12, InteraceStream = 0, InterlaceEnabled = 0, bSecure = 0, MVC = 0 Semiplanar = 1, bReinit = 1, BitDepthForSurface = 8 LumaBitDepth = 8, ChromaBitDepth = 8, ChromaFormat = 5
TVMR: cbBeginSequence: 1904: BeginSequence  ColorPrimaries = 2, TransferCharacteristics = 2, MatrixCoefficients = 2
Allocating new output: 1920x1088 (x 12), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3464: Send OMX_EventPortSettingsChanged : nFrameWidth = 1920, nFrameHeight = 1088 
TVMR: FrameRate = 26 
TVMR: NVDEC LowCorner Freq = (156000 * 1024) 
TVMR: FrameRate = 25.125944 
TVMR: FrameRate = 24.998875 
TVMR: FrameRate = 25.001563
  1. Using “gst-launch-1.0 rtspsrc” can’t open camera, and get " Internal data flow error "
    GST_DEBUG=3 gst-launch-1.0 rtspsrc location=rtsp://admin:123456@192.168.1.64:554 ! rtph264depay ! omxh264dec ! nvvidconv ! video/x-raw, width=1920, height=1280, format=BGRx ! videoconvert ! ximagesink 2>&1 | tee gst-launch-rtspsrc.level3.log
nvidia@tegra-ubuntu:~$ GST_DEBUG=3 gst-launch-1.0 rtspsrc location=rtsp://admin:123456@192.168.1.64:554 ! rtph264depay ! omxh264dec ! nvvidconv ! video/x-raw, width=1920, height=1280, format=BGRx ! videoconvert ! ximagesink
]0:00:00.063072453  [336m10949 [00m       0x58a6a0  [33;01mWARN    [00m  [00m                 omx gstomx.c:2826:plugin_init: [00m Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/nvidia/.config:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://admin:wxt123456@192.168.1.64:554
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
0:00:00.196424931  [336m10949 [00m   0x7f880320a0  [32;01mFIXME   [00m  [00;04m             default gstutils.c:3766:gst_pad_create_stream_id_internal:<fakesrc0:src> [00m Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
0:00:00.303930241  [336m10949 [00m   0x7f68003190  [32;01mFIXME   [00m  [00m        videodecoder gstvideodecoder.c:946:gst_video_decoder_drain_out:<omxh264dec-omxh264dec0> [00m Sub-class should implement drain()
0:00:00.338563175  [336m10949 [00m   0x7f88032190  [33;01mWARN    [00m  [00m             basesrc gstbasesrc.c:2948:gst_base_src_loop:<udpsrc1> [00m error: Internal data flow error.
0:00:00.338729808  [336m10949 [00m   0x7f88032190  [33;01mWARN    [00m  [00m             basesrc gstbasesrc.c:2948:gst_base_src_loop:<udpsrc1> [00m error: streaming task paused, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1: Internal data flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:00.147134143
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
0:00:00.350641026  [336m10949 [00m       0x5dff20  [33;01mWARN    [00m  [00m             rtspsrc gstrtspsrc.c:5670:gst_rtspsrc_send:<rtspsrc0> [00m error: Got error response: 551 (Option not supported).
0:00:00.350900747  [336m10949 [00m       0x5dff20  [33;01mWARN    [00m  [00m             rtspsrc gstrtspsrc.c:7550:gst_rtspsrc_pause:<rtspsrc0> [00m error: Could not send message. (Generic error)
Setting pipeline to NULL ...
Freeing pipeline ...

Thanks.

Dear,

More information:
1.
On TX2 vlc and kmplayer can’t play the IP Camera, but on Ubuntu host(x86) vlc and kmplayer can play the IP Camera.
url: rtsp://admin:wxt123456@192.168.1.64:554

On Ubuntu host(x86) can use “gst-launch-1.0 playbin” to play IP Camera, but can’t use “gst-launch-1.0 rtspsrc” to play IP Camera too.

Here is an reference link:
https://devtalk.nvidia.com/default/topic/1043770/jetson-tx2/problems-minimizing-latency-and-maximizing-quality-for-rtsp-and-mpeg-ts-/post/5295828/#5295828

You should need to put h264parse:

... ! rtph264depay ! <b>h264parse</b> ! omxh264dec ! ...

Dear DaneLLL,

Thanks so much.

U r right. It works with “h264parse” parameter.