Closed yockgen closed 2 years ago
Can you provide more details about your environment (software and hardware), please? Which version of PipelineServer do you use, how do you use it, how have you configured it, how did you start your usecase? Looks like a permission-related issue.
This is how I started the pipeline server:
Terminal 1:
Terminal 2: curl localhost:8080/pipelines/object_detection/person_vehicle_bike -X POST -H 'Content-Type: application/json' -d '{ "source": { "uri": "rtsp://xxxx:xxxx@192.168.1.226:554/videoMain.sdp", "type": "uri" }, "destination": { "metadata": { "type": "file", "format": "json-lines", "path": "/tmp/results.jsonl" }, "frame": { "type": "rtsp", "path": "person-detection" } }
}'
I'm using master branch of pipeline-server.
Another finding, it seems only happened to RTSP source, I've tried Internet RTSP source as below and confirmed I could use VLC to play the stream on the machine run pipeline-server: rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4
I can occasionally get it work after like tried for 20+ times on the curl, once I restart the container, then I need to try with my luck again, and I'm seeing this error if the curl failed:
{"levelname": "INFO", "asctime": "2022-06-27 11:48:22,961", "message": "Creating Instance of Pipeline object_detection/person_vehicle_bike", "module": "pipeline_manager"} {"levelname": "ERROR", "asctime": "2022-06-27 11:48:23,235", "message": "Error on Pipeline 0c1a2084f60f11ec9ab00242ac110002: gst-resource-error-quark: Could not open resource for reading and writing. (7): ../gst/rtsp/gstrtspsrc.c(8025): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline19/GstURISourceBin:source/GstRTSPSrc:source:\nFailed to connect. (Generic error)", "module": "gstreamer_pipeline"}
Hope the info is enough.
I think decodebin is struggling to deal with your RTSP camera. Switch out the source part of your request for this and let me know how it goes.
"source": {
"type": "gst",
"element": " urisourcebin",
"properties": {
"uri": "rtsp://xxxx:xxxx@192.168.1.226:554/videoMain.sdp",
"latency": 0
},
"postproc": "rtph264depay"
}
Thanks! The solution work like a charm.
curl localhost:8080/pipelines/object_detection/person_vehicle_bike -X POST -H 'Content-Type: application/json' -d '{ "source": { "type": "gst", "element": " urisourcebin", "properties": { "uri": "rtsp://xxxxx:xxxxx@192.168.1.226:554/videoMain.sdp", "latency": 0 }, "postproc": "rtph264depay" }, "destination": { "metadata": { "type": "file", "format": "json-lines", "path": "/tmp/results.json1" }, "frame": { "type": "rtsp", "path": "person-detection" } }
}'
I've a RTSP camera is running, and confirm able to access from the host (tested via VLC), however, receiving following error:
{"levelname": "INFO", "asctime": "2022-06-25 11:18:23,224", "message": "Creating Instance of Pipeline object_detection/person_vehicle_bike", "module": "pipeline_manager"} {"levelname": "ERROR", "asctime": "2022-06-25 11:18:23,501", "message": "Error on Pipeline 868ccefef47811ecbc670242ac110002: gst-resource-error-quark: Could not write to resource. (10): ../gst/rtsp/gstrtspsrc.c(7562): gst_rtspsrc_setup_streams_start (): /GstPipeline:pipeline18/GstURISourceBin:source/GstRTSPSrc:source:\nError (500): Internal Server Error", "module": "gstreamer_pipeline"}
Restful call as below:
curl localhost:8080/pipelines/object_detection/person_vehicle_bike -X POST -H 'Content-Type: application/json' -d '{ "source": { "uri": "rtsp://xxxx:xxxx@192.168.1.226:554/videoMain.sdp", "type": "uri" }, "destination": { "metadata": { "type": "file", "format": "json-lines", "path": "/tmp/results.jsonl" }, "frame": { "type": "rtsp", "path": "person-detection" } }
}'
Any advice for next step is appreciated!