Need a REST API Method to get the simultaneous transcoding sessions limit value
AnsweredI have noticed, there is a limitation on the number of simultaneous HTTP video connections.
Specifically the first two HTTP WebM(GET/media/<cameraId>.webm) load video as expected.
But, subsequent requests return a JSON response of:
{"error":"4","errorString":"Too many opened connections","reply":null}
Then I found an article(link is given below) where I came to know about the limitation on the number of simultaneous transcoding sessions. As per the article, default limit value of simultaneous transcoding sessions is 2 and this limit value can be changed by modifying the "maxWebMTranscoders" parameter from the Server's advance setting page.
My requirement is little bit different. I was wondering if there is any REST API method/command exist, through which I can get this "limit value" from my application code.
The reason I am asking for such API method is that I would like to alert or inform the end-user whenever the number of concurrent camera video request exceed the transcoding sessions limit value.
I am working on Desktop application using Microsoft WPF. In my application, I am using VLC player to show the live camera streaming using HTTP WebM(GET/media/<cameraId>.webm) URL. My application allow end user to view multiple camera videos at the same time. Currently, if the concurrent video request exceeds the transcoding sessions limit value, the VLC player turn into a black panel which can confused my end users.
Due to this reason, it would be great if I have an API method which can give the simultaneous transcoding sessions limit value. Whenever, an user make a request for camera streaming, I will first check this API and if the total number of concurrent video request exceeds the limit value, I can give user a proper alert message.
-
Hello Anirban,
The default transcoding session limit is 2 per server. Every server has embedded counter for that.
As soon as the limit is reached, the user will get "Too many transcoding threads" error message in the JSON response body on trying to call the video stream.
In other words, the feature you want already exists and it's just a part of the common functionality.
One more thing, feel free to check out the /api/metrics call that will return a lot of technical information from the server including number of the active transcoding sessions.
0 -
Hello Anirban,
Here you can find an article on how to change transcoding session limit.
0 -
Hello Sergey,
Thanks for all those API information. It really helps me.
I have checked the API method "/api/metrics" and just like you mentioned, I have found the following JSON object:
"transcoders": {
"description": "Amount of video transcoding threads",
"value": 0
}I also would like to share that I have just noticed another method "/api/systemSettings" which gives me the exact value of the "maxWebMTranscoders" parameter. I was wondering can I consider the value of "maxWebMTranscoders" parameter as the simultaneous transcoding session limit value of a specific Nx Server. Below I also have mentioned a sample URL for the systemSettings:
https://<system_id>.relay.vmsproxy.com/api/systemSettings?auth={<authentication_hash>}
Hello Andrey,Thanks for the link. I already check the article and also mentioned in my post. The article is really helpful. I came to know the concept of simultaneous transcoding session limit from this article.
0 -
Hello, I was wondering if there is any update on my last query.
0
Please sign in to leave a comment.
Comments
4 comments