vod_max_frames_size
The `vod_max_frames_size` directive sets the maximum buffer size for video frames in the NGINX-based VOD Packager module.
Description
The vod_max_frames_size directive defines the upper limit on the size of video frames that can be processed by the NGINX-based VOD Packager. This directive helps manage memory usage effectively when handling video streaming requests, particularly for high-resolution content. By specifying a maximum frame size, you ensure that the server does not allocate excessive memory for video buffers, which can lead to performance degradation or even crashes under high load scenarios.
Given the context in which it operates (http, server, or location), vod_max_frames_size can be configured at various levels in your NGINX configuration. Setting this directive allows you to tune the performance of your video streaming services based on the expected traffic and the characteristics of the video content being served. For instance, lower frame sizes could be beneficial for devices with lower memory capabilities or bandwidth limits, while higher values might improve throughput for high-definition video delivery.
The single argument takes an integer value that represents the maximum allowed frame size in bytes. When the memory allocation for a video frame exceeds this limit, NGINX will trigger error handling routines to avoid potential overloads. It's crucial to monitor the actual memory usage and adjust this parameter accordingly based on the streaming workload and available server resources.
Config Example
vod_max_frames_size 1048576; # Sets the maximum frame size to 1MB
Be cautious when setting the value too low, as this may lead to increased buffering or dropped frames during playback.
If the value is set too high, it could lead to excessive memory consumption, especially under peak traffic. Monitor server memory usage accordingly.