Please provide complete information as applicable to your setup.
Hardware Platform (x86_64)
Ubunto 20.04 LTS
Gst-launch-1.0*
my rstpsrc url was previously tested in VLC ans works fine.
this es the sintax of the url:
rtsp://userxxxx:pwdxxxxx@192.168.5.66:554/cam/realmonitor?channel=3&subtype=0
I am debuging this pipeline:
My command pipeline is:
gst-launch-1.0 --gst-debug=rtspsrc:3 rtspsrc location=rtsp://userxxxx:pwdxxxxx@192.168.5.66:554/cam/realmonitor?channel=3&subtype=0 ! fakesink
and I am getting this information
0:00:00.108556646 11180 0x55c14cee0b60 WARN rtspsrc gstrtspsrc.c:6536:gst_rtspsrc_send: error: Not Found (404)
0:00:00.108717860 11180 0x55c14cee0b60 WARN rtspsrc gstrtspsrc.c:7973:gst_rtspsrc_open: can’t get sdp
0:00:00.108752681 11180 0x55c14cee0b60 WARN rtspsrc gstrtspsrc.c:6032:gst_rtspsrc_loop: we are not connected
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Not found
Additional debug info:
gstrtspsrc.c(6536): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Not Found (404)
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to NULL …
Freeing pipeline …
i was trying using opencv and works fine with this code:
import cv2
import os
RTSP_URL = 'rtsp://userxxxx:pwdxxxxx@192.168.5.66:554/cam/realmonitor?channel=3&subtype=0'
os.environ['OPENCV_FFMPEG_CAPTURE_OPTIONS'] = 'rtsp_transport;udp'
cap = cv2.VideoCapture(RTSP_URL, cv2.CAP_FFMPEG)
if not cap.isOpened():
print('Cannot open RTSP stream')
exit(-1)
while True:
_, frame = cap.read()
cv2.imshow('RTSP stream', frame)
if cv2.waitKey(1) == 27:
break
cap.release()
cv2.destroyAllWindows()
Could you please help me to solve this issue?
rsc44
March 19, 2023, 12:56am
2
The moderators prefer you only ask deepstream related questions here, but anyways.
Initially, i read your error details wrong.
It looks like your camera url may need some adjustments, each camera is different so i can’t say forsure what exactly is wrong with it.
this link may help you, they describe a similar issue.
opened 04:34AM - 10 Dec 18 UTC
closed 02:05AM - 11 Dec 18 UTC
I installed gstreamer-msdk **several days ago**. And I successfully captured st… ream from ip camera via rtsp with the commands:
```bash
# gst-launch-1.0 -v rtspsrc location="rtsp://192.168.1.10:554/user=admin&password=&channel=1&stream=0.sdp" latency=300 ! rtph264depay ! h264parse ! mfxh264dec ! autovideosink
# gst-launch-1.0 -v rtspsrc location="rtsp://192.168.1.10:554/user=admin&password=&channel=1&stream=0.sdp" latency=0 ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink
```
But **now**, when i run the same commands in the same machine, i get the error results:
```bash
Setting pipeline to PAUSED ...
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 1.2.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_2
libva info: va_openDriver() returns 0
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0': gst.mfx.Aggregator=context, gst.mfx.Aggregator=(GstMfxTaskAggregator)NULL;
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.1.10:554/user=admin&password=&channel=1&stream=0.sdp
Progress: (open) Retrieving server options
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource.
Additional debug info:
gstrtspsrc.c(5508): gst_rtspsrc_try_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Could not receive message. (Received end-of-file)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
```
I use Ubuntu 16.04 with kernel 4.15.0-42-generic and installed media-sdk with 2018 Q2 release.
Otherwise, **now** i can capture stream with vlc app via rtsp:
```bash
# cvlc "rtsp://192.168.1.10:554/user=admin&password=&channel=1&stream=0.sdp"
```
and also can capture stream with opencv:
```python
import cv2
cap = cv2.VideoCapture('rtsp://192.168.1.10:554/user=admin&password=&channel=1&stream=0.sdp')
while(True):
ret, frame = cap.read()
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
```
Except run the command with gstreamer-media-sdk.
Does anyone else meet the same problem? Thanks for your reading.