Lots of questions… all about tweaking the NDI settings and playing the trade-off between Quality, Bandwidth, Latency.
I have a PT20X-NDI camera, and using NDI as the primary output.
Currently I’m following the settings from the guide, using 1080@50hz as I’m located in the UK (page 3, right column).
My network has a good amount of bandwidth – all edge switches are Gigabit ports, with dual 10GbE uplinks back to the core.
In the bitrate settings of the guide, the recommended bitrate is well below the camera’s maximum allowed in the GUI. Per the above, I’ve got plenty of network capacity. So can I turn the bitrate up, achieving a better quality? Is there any trade off with latency? If my network has the bandwidth then “Why not turn it up to the max?”
On that point, are there any settings to reduce the latency to a theoretical NDI minimum? Again I’m happy to sacrifice some network bandwidth if there’s a setting with the I-Frames etc that reduces latency further.
In the settings, can anyone clarify what the encode levels do? Is this actual profiles for H264 per the standard (Baseline/Extended/Main/High/etc)? Or is this just PTZO’s own bitrate etc presets? In the guide it only mentions using these for 60Hz not 50Hz? Is there any harm in selecting “High Profile”, and then manually changing the frequency to 50Hz?
In the Web GUI there’s two sets of stream settings. Am I right in presuming that NDI outputs are always Stream 1?
If I need to have a second client viewing the stream, but this time a pure RTSP H264 client like VLC, should I use Stream 2? I.e. leaving Stream 1 reserved only for NDI outputs?
A bunch of questions indeed but all excellent ones :-)
So let's start with "turning it up to 11," in regards to bitrate, and why that's not going to achieve exactly what you're after...
The image sensor only has a set number of pixels and color depth that it offers setting our maximum bandwidth for video possible on the platform.
We then encode, and compress, the video data into H264 which sets a new maximum threshold for bitrate that will depend upon the desired resolution, fps and i-frame interval for our topic.
The current bitrates settings for NDI High, Medium and Low have been calculated to provide the highest possible quality and reliability.
Of note our next round of firmware updates will include an option to set the i-frame interval much higher, 10 seconds being the highest I would recommend using, resulting in a higher quality stream when used with NDI.
The only form of "turning it up to 11" I can offer, and does not work with NDI, is the MJPG option available on the PTZOptics platform... since MJPG has less compression you are able to achieve a higher bandwidth / higher quality stream.
Latency with NDI has a lot of possible variables to look at...
I can provide some topics of interest to explore when trying to achieve the lowest possible latency.
I am also happy to talk in more depth about anything mentioned below.
Network Configuration Topics
Is the production equipment on an isolated network?
Are the cameras on an isolated network?
Is internet traffic being allowed to flow into the isolated networks?
Have you minimized hops between source and ingestion?
Have you properly configured the network to support mDNS and multicast traffic?
I'm sure there's a few more but this is what comes to the top of my mind
Have you made sure all network cables have been certified to produce the highest quality connection?
Are all networks cables within their specified by cable manufacturer maximum distance typically 328' / 100m?
Please make sure to add 10' / 3m for any wall plates or patch panels and don't forget the patch cable lengths
Are all cables routed to be free of electronic interference from compressors, pumps, ballasts, microwaves, etc... ?
It looks like you've already done your homework on this topic.
Once the new firmware launches you will have a few more options to test.
This would be ensuring the ingestion system meets proper requirements for the amount of NDI sources being used.
vMix maintains an excellent page on this topic vMix Reference Systems
Encode Settings are indeed actual profiles for H264 and there would no harm in changing the settings much as you have mentioned.
NDI Outputs are actually both Stream 1 and Stream 2, it utilizes both simultaneously as I'll explain below.
NDI has two modes of operation, currently, which offer an HD stream or Stream 1, and an SD or "Low Bandwidth" stream which would be Stream 2.
If you right click on an NDI video source, in Studio Monitor, and go to settings --> video >> low bandwidth you will see the stream turn to a 360 feed.
For many systems this SD stream is used for the thumbnail previews in an effort to conserve bandwidth and resources.
Of note here our camera is only capable of supporting two (2) simultaneous streams so NDI utilizes both of them.
If you need to be able to send this source, the camera, to more locations you would need to enable multicast and ensure your network is configured to support multicast.
If of interest I have put together the following guide for Unifi equipment but the general concepts should apply beyond just Unifi "Setting up a Network for PTZOptics & NDI"
I hope I was able to appropriately address all of your inquiries but please feel free to follow up for further clarification or with follow up / new questions if needed.
Thanks for the reply.
It’s running on the main corporate VLAN currently. I’m happy to split it off into its own VLAN if required.
For my testing the camera and the NDI Studio Monitor PC are on the same switch to minimize hops. NDI Studio Monitor is only viewing the one PTZOptics stream, and has hardware acceleration enabled.
I haven’t explicitly tested mDNS and Multicast, but I know Airplay to AppleTVs etc works in this VLAN so I’m pretty sure mDNS is okay.
Cabling I’m happy to rule out. I‘m fortunate in that I specified the cabling in this building – all BlackBox ETL Verified Shielded Cat6A.
Thanks for the reply about bitrate. I’ll keep it at the recommended 10,240Kbps rather than turning it up to 20,480Kbps.
My warped logic was more bitrate = less compression = less camera processing = quicker to send = less latency. (Plus a bit of quality too).
Thanks for the information about upcoming firmware providing more adjustments. Is there an eta on that?
Thanks for the guide – I’ll take a look.
When fully optimised, what’s the latency that I should be seeing from camera to NDI Studio Monitor?
Glad I could be of some help so far... let's see if I can address your excellent follow up questions.
If possible to separate them into their own VLAN it is highly recommended, especially if you plan to implement multicast, in an effort to secure the highest quality streams.
We have a lot of users that do not take this step... but since you're trying to go the extra mile to tune everything it is a step I would take.
Sounds like mDNS is enabled, most likely, but worth double checking on as those other devices can operate "OK" without it enabled; I don;t see it often but have seen it.
Yay on the cabling!
My pleasure to let you know of this coming firmware... there is no current ETA for an official release but we are about halfway through producing and testing the new firmware.
If you wouldn't mind sharing your specific PTZOptics model... and super awesome if you have the serial (http string to get serial - http://<camera ip>/cgi-bin/param.cgi?get_serial_number)
I might be able to work with you to provide some "beta" firmware with this new i-frame feature to add to your arsenal if I have a finished version.
If you have any questions about the guide just let me know... I don't know everything but happy to share what I do know.
NDI Latency... so this can obviously vary but I'll try to provide some idea in the form of ranges below
Low for Clients: 80ms - 110ms
Normal for Clients: 110ms - 250ms
Bad for Clients: 250ms - 3000ms
And now to set unrealistic expectations... best for me: 63ms
In my scenario I cannot state what allowed me to specifically achieve such low latency in comparison.
It may have been a properly tuned network, PC and camera... on same switch and just playing with the variables we have been talking about above and being viewed in NewTek NDI Studio Monitor.
If there is anything else I can do to be of assistance just let me know.
I have tested it today. PT20X-NDI on the latest firmware release, and the settings exactly as per 1080@50hz in the guide.
From the lens to NDI Studio Monitor on the PC I’m seeing 195ms latency.
In my setup I also then have another 45ms after the PC before the image hits the display screens. So my audience is seeing a total of 240ms delay, and that quarter of a second is noticeable.
Obviously though it’s only the first 80% of that quarter of a second that’s within the PTZOptics boundary and the last 20% I’ll chase separately.
I guess 195ms is about middle of the normal range @Matthew Davis posted above... But anything to get it down would be great!