Embed Video from the VMS on a Website get loading after +- 10 sec
In ProgressI get 4 streams on 1 page via a website embed. And always after about +-10 seconds, 2 cameras stop working, the other cameras continue to run. Even though I retrieve 1 stream from these two cameras, they stop after +-10 seconds
-
Hi Mark,
Thanks for your question, but can you elaborate more detail?
- When you mention the stream stopped, what kind of behavior you saw?
Is the stream lagging/jetting or completely stop?- When the stream stopped, is the video stream playing on the desktop client/web client still?
(PS.Here we are saying the Nx Witness client not the camera web interface.)- What is the server utilization? CPU/RAM/Networking?
- Which version of mediaserver you are using?
- Which stream format or protocol you were using, can you elaborate more detail?
RTSP, HTTP in mp4 or webm or others?It looks like there are some more details would be required, please provide as much information as you can so that we would be able to see what might be happened and the suggestion is a screen recording for showing the behavior, thanks.
-
When you mention the stream stopped, what kind of behavior you saw?
Is the stream lagging/jetting or completely stop? :- After 15 sec it works again for 3 sec and then loading againWhen the stream stopped, is the video stream playing on the desktop client/web client still? :- Desktop client continues to work
Which version of mediaserver you are using? :- version 5.1.3.38363
- Which stream format or protocol you were using, can you elaborate more detail?
RTSP, HTTP in mp4 or webm or others? :- Format mp4 via http, video codec is H264 -
Hi Mark,
Thanks for your question. Can you also provide the answer of your utilization of the server?
- What is the server utilization? CPU/RAM/Networking? (While the RTSP stream stopped)
- Do you use native resolution? Which stream were you pulling through (Main or Sub)?It looks like the issue can be checked from the stream but unfortunately we still need more information and likely the video recording for the detailed behavior if possible.
Thanks.
-
Hi Ichiro,
I give you the wrong information
- What is the server utilization? CPU/RAM/Networking
Intel Core Intel Core i3-12100 processor (12MB Cache, 4 Core (4P+0E), 3.3GHz
M.2 256GB PCIe NVMe Class 35 Solid State Drive16GB (2x8GB) DDR5 4800MHz, SO-DIMM, Non-ECC
Ubuntu Operating System for Nx Witness- Which stream format or protocol you were using, can you elaborate more detail?
RTSP, HTTP in mp4 or webm or others?:- Format mp4 via http, video codec is H264
See result below. 2 cameras have loading. Even if I only show one of these two cameras on the web page
-
Hi Mark,
Thanks for your response. I might be forgetting to ask if the Nx "Web" client works or not. (not the desktop client)
So if I understand correctly, you are using HTTP stream, pulling 4 main streams from the Nx mediaserver, but only two streams are likely interrupted or not smoothly played all the time.
Here are the comments for this, overall here's the recap of what's going on.
- It is expected to have delay sometimes might be loading in case of preparing the stream that does not have pre-cache. So I am thinking your stream might just in process. (Either wait for frames from camera or wait for transcoding)
- In this case, if you are using primary stream (or non-native secondary stream, ex: resolution/FPS has been changed), then the streams are issuing the transcoding which downscales the primary streams adding extra delay and resource load.
- Only native secondary stream is pre-cached specifically for hls reasons.
- General recommendation - avoid using the transcoding. I.e. avoid setting up custom resolutions as much as possible. It's better to request for native secondary stream if the streams are required to be quite timely or smooth.
Starting from 6.0 we are switching to webrtc instead of hls, even on our web client.
I am afraid this would be our suggestions at the moment - you may wait for the 6.0 and change to WEBRTC. or using the native sub stream to utilize the pre-cached.
Sorry this would not be a positive answer, but likely this is something might be expecting and will be changed in our coming new release.(v6.0)
Overall there are several options to reduce the delay:- Switch to webrtc or
/media
endpoint. - Avoid the transcoding
- In case of HLS - force secondary stream
-
Hi Ichiro,
Thanks for your answer the Nx "Web" is also slow for this 2 camera's the other 2 camera's working ok
i use the embed api option how can i force a secondary stream ? in the case below ?
https://" + systemId + ".relay.vmsproxy.com/hls/' + cameraId + '.m3u8?lo&auth=' + authKey
-
Hi Mark,
Thanks for your response. If you are using the cloud-relay, then this kind of behavior is more expected due to the nature of cloud-relay.
I think you URL in mp4 (as you mentioned before) should be like:
https://" + systemId + ".relay.vmsproxy.com/media/' + cameraId + '.mp4?resolution=640*360&auth=' + authKey
(If you know exact the resolution)Or you may user stream=1
https://" + systemId + ".relay.vmsproxy.com/media/' + cameraId + '.mp4?stream=1&auth=' + authKey
Please sign in to leave a comment.
Comments
7 comments