OvenMediaEngine
OvenMediaEngine copied to clipboard
Adding new RTSP-pull origin via the API
Hey!
I have added a RTSP-pull origin in the config files and it works great. But, is it possible to add a new RTSP-pull origin via the API?
I've looked in the REST API documentation and the github issues and i dont think its mentioned.
Is there any other way to remotely create a new RTSP-pull origin on the server?
Thanks in advance!
This is undocumented, but OME has the following features: You can play with the RTSP Origin address in the WebRTC URL like this:
wss://host:port/rtsp_live/<stream name>?rtspURI=<URL encoded rtsp url>
Note that the app name must be "rtsp_live
". This app will be created automatically if it doesn't exist in Server.xml. However, it is recommended to create an app called rtsp_live in Server.xml.
E.g,
wss://ome-dev.airensoft.com:13334/rtsp_live/stream?rtspURI=rtsp%3A%2F%2F1.1.1.1%2Fapp
This way you can set the URL without OriginMap, pull the RTSP stream and play it with webrtc.
However, since this is not an official feature (we put it in because we needed it a long time ago), it may not be stable.
Thanks, this is great! Is it the same amount of time before the stream is disabled as the documented RTSP-pull?
And is there anyway to initiate the same stream headless, without the player?
e.g. sending same key and argument as a HTTP-request or some other protocol
/rtsp_live/stream?rtspURI=rtsp%3A%2F%2F1.1.1.1%2Fapp
It will probably work as you say. If you request HLS URL using CURL, it will probably work the same. It makes no difference between the player and what you request with CURL.
However, it is a very old feature, so my memory may be wrong, and many updates in the past may have affected this feature. This is an unofficial feature, so I didn't keep it under maintenance. Give it a try.
Just tested this, since I am planning to do something similar using RTSP PTZ Cams. Works mostly but h264 Transcoding does not, but this is to be expected as you mentioned this wont be maintained.
example:
https://www.wowza.com/developer/rtsp-stream-test
wss://OvenmediaDomain/rtsp_live/stream?transport=tcp&rtspURI=rtsp%3A%2F%2Fwowzaec2demo.streamlock.net%2Fvod%2Fmp4%3ABigBuckBunny_115k.mp4
I think this is a valuable feature, because there is no way to add rtsp pull without restarting the server, right?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is undocumented, but OME has the following features: You can play with the RTSP Origin address in the WebRTC URL like this:
wss://host:port/rtsp_live/<stream name>?rtspURI=<URL encoded rtsp url>
Hello!
Does this feature work in version 0.14.14?
While trying wss://host:port:3334/rtsp_live/stream?rtspURI=rtsp%3A%2F%2Fwowzaec2demo.streamlock.net%2Fvod%2Fmp4%3ABigBuckBunny_115k.mp4
server_1 | [2022-11-11 12:14:26.939] E [SPRtcSig-T3334:12] Orchestrator | orchestrator.cpp:635 | Could not find Origin for the stream: [#default#rtsp_live/stream]
server_1 | [2022-11-11 12:14:26.939] E [SPRtcSig-T3334:12] WebRTC Publisher | webrtc_publisher.cpp:461 | Cannot find stream (#default#rtsp_live/stream)
server_1 | [2022-11-11 12:14:26.939] E [SPRtcSig-T3334:12] Signalling | rtc_signalling_server.cpp:322 | Cannot find stream [#default#rtsp_live/stream]
@ptz-nerf It was removed as it conflicts with other features (ABR, etc). It will be re-developed as a full feature next time. If you want this feature, please use the old version. (I honestly can't remember when it was deleted. I'm sorry)
This feature has been released. https://github.com/airensoft/ovenmediaengine/discussions/1072
Please use the Stream Creation API.