Closed sara990099 closed 10 months ago
In order to change the network source for a stream via API, you have to modify the config
object, that is returned by the GET /api/v3/process/restreamer-ui:ingest:***
command.
Change the network source in config.input[0].address
to http://***.m3u8
. Then make a PUT
to /api/v3/process/restreamer-ui:ingest:***
with the contents of the config
object, e.g.
curl http://127.0.0.1:8080/api/v3/process/restreamer-ui:ingest:*** \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: ***' \
-X PUT \
-d '{
"id": "restreamer-ui:ingest:***",
"input": [
{
"address": "http://***.m3u8",
...
}
],
...
}'
You might need to adjust the input's options as well if you change protocol. After successfully updating the process, it will restart in case it was already running.
Please also check the documentation for the process API: https://docs.datarhei.com/core/api-ffmpeg/process and the Beginner's guide at https://docs.datarhei.com/core/guides/beginner#id-3.-main-process
How can I change the address of the network source for a stream via API?
{ "id": "restreamer-ui:ingest:", "type": "ffmpeg", "reference": "", "created_at": 1704051711, "updated_at": 1704051711, "config": { ... }
{"code":404,"message":"Unknown process or input","details":["no playout for input ID 'input_0' and process 'restreamer-ui:***'"]}