--- title: "Setting Persistent Metadata in HLS streams for R/2, R/20, X/2, and X/20" slug: "setting-persistent-metadata-in-hls-streams-for-r2-r20-x2-and-x20-1" updated: 2026-03-25T17:14:14Z published: 2026-03-25T17:14:14Z canonical: "docs.telosalliance.com/setting-persistent-metadata-in-hls-streams-for-r2-r20-x2-and-x20-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.telosalliance.com/llms.txt > Use this file to discover all available pages before exploring further. # Setting Persistent Metadata in HLS streams for R/2, R/20, X/2, and X/20 ## Scope This document applies to - Z/IP Stream R/2 version 1.08.16 and higher - Z/IP Stream R/20 all versions - Z/IP Stream X/2 version 1.24.11 and higher - Z/IP Stream X/20 all versions ## Description By default, new metadata is inserted into the HLS fragment that is current when the metadata changes, but it does not persist in subsequent packets. In some cases, it may be beneficial to have the current data in ALL packets. This document describes how to enable this functionality in the versions listed above. ### Editing Lua Metadata Filters Lua is a lightweight scripting language, and metadata filters written in Lua can be edited using any standard text editor. While basic editors will work, using an editor that supports syntax highlighting for Lua can make development and troubleshooting easier. ### Enabling Persistent Mode To enable persistent mode in a metadata Lua filter, add the following line: ```plaintext SetOptions(OPTION_PERSISTENT) ``` This should be placed outside of metadata processing functions—typically alongside initialization calls such as `UseLineParser`. ### Disabling Persistent Mode To disable a previously enabled persistent option, use: ```plaintext SetOptions(0) ``` ## Example ![Screen shot of the configured option in the Lua filter](https://cdn.document360.io/57e3cd80-d493-453c-9672-ad1b043dadc3/Images/Documentation/image-0CDOL0XB.png) Configured option in the Lua filter to ENABLE persistent data