Detect rtsp encoding type

I found typefind element of gstreamer to detect media type. However, I tried to replace filesrc in this link with rtspsrc, but an error occured. So how can I make typefind works with rtspsrc to what stream encoding type is (MJPEG, H264, H265, etc…)?
Many thanks