bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
10.78k stars 1.4k forks source link

rtsp connection problem from openCV c++ #3186

Closed MyraBaba closed 3 months ago

MyraBaba commented 3 months ago

Hi,

I starting docker :

docker run --rm -it --network=host bluenviron/mediamtx:latest

and publishing the video :

ffmpeg -re -stream_loop -1 -i /home/acc//4K_1920.ts -c copy -f rtsp -rtsp_transport tcp rtsp://localhost:8554/mystream

I can see with ffplay but it waits 5-10 seconds to start.

on the other hand I cant connect through c++ openCV cap.open..

the c++ code connect normal camera rtsp but cant connect rtsp://localhost:8554/mystream .

Best

ERROR: [ WARN:4] global ./modules/videoio/src/cap_gstreamer.cpp (963) open OpenCV | GStreamer warning: cannot find appsink in manual pipeline [ WARN:4] global ./modules/videoio/src/cap_gstreamer.cpp (616) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ERROR:4] global ./modules/videoio/src/cap.cpp (164) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.4) ./modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://127.0.0.1:8554/mystream in function 'icvExtractPattern'

Error opening video sources video Okundu - 2

Thread ID: 0x7fb44ef8c600 Processing frame for stream: 2 ::::::::............

github-actions[bot] commented 3 months ago

This issue is being automatically closed because it does not follow the issue template. Please reopen the issue and make sure to include all sections of the template.