Wowza Community

Faster updates for Static Overlays

I have some questions relating to static overlay images…

(1) The overlay file is checked every 750ms when CheckForUpdate=true. Is there any way to change this refresh rate? I do not need the frame-by-frame resolution of a dynamic overlays, but would like checks to be at a rate closer to 250ms.

(2) Some configuration items refer to variables, such as ${SourceStreamName}. Is there a way to use the stream name in ImagePath, so that I can make the overlay image file something like “${SourceStreamName}_overlay.png”? Otherwise, I must define a new transcoder for each overlay file.

(3) Is there a best practices way to update image files? I’m concerned about conflicts when the file is simultaneously updated and accessed. Does the filesystem take care of this? Right now I’m using unix cp and keeping the file on a ramdisk to speed up updates.

For reference…

Image file is specified in the transcoder .xml file, in this XML area: Root/Transcode/Encodes/Encode/Video/Overlays/Overlay/ImagePath

750ms update rate:

https://www.wowza.com/docs/how-to-set-up-and-run-wowza-transcoder-for-live-streaming

Hi @Ben Jun, thanks for your patience on this.There is a property called

  1. There is a property called overlayCheckFrequency that can be set which modifies the default value of 750ms.
  2. Still checking on this one.
  3. On unix file systems, moving mv a file is an atomic operation, but copying cpis not. The user can copy their new image to a temporary file, and then use move to move it to the final file they want (e.g. cp /path/to/myfile.jpg /path/to/overlay/myfile.jpg.tmp && mv /path/to/overlay/myfile.jpg.tmp /path/to/overlay/myfile.jpg

Thank you @Rose Power-Wowza Community Manager, the mv operation works great.

I have searched for awhile and have not been able to find the overlayCheckFrequency property.

Where can I find this parameter and how can I adjust it?

Hello @Ben Jun. It should be added as a custom property to the application, under /Root/Application/Transcoder

Here are some examples of custom properties and parameters with overlay code that may be helpful to you.

https://www.wowza.com/downloads/forums/transcoderoverlayexamplefiles/TranscoderOverlayExampleFiles.zip

Ben,

You should be able to apply this property in 2 ways:

  1. Application level (via Application.xml or Wowza Manager)

  2. Stream level (via transcoder template)

At the application level, you can apply this to all streams inbound to the specified application (ex: live).

<Transcoder>
      <!-- To turn on transcoder set to: transcoder -->
      <LiveStreamTranscoder></LiveStreamTranscoder>
      <!-- [templatename].xml or ${SourceStreamName}.xml -->
      <Templates>${SourceStreamName}.xml,transrate.xml</Templates>
      <ProfileDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles</ProfileDir>
      <TemplateDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/templates</TemplateDir>
      <Properties>
    <Property>
        <Name>overlayCheckFrequency</Name>
        <Value>250</Value>
        <Type>Integer</Type>
    </Property>
      </Properties>
  </Transcoder>

The other option is per transcoder template (stream level) if stream name specific.

Example: Transcode template

At the very bottom there is a property container like below:

  <Properties>
      <Property>
           <Name>overlayCheckFrequency</Name>
           <Value>250</Value>
           <Type>Integer</Type>
       </Property>
  </Properties>

I hope this is helpful to your workflow needs.

Regards,

Mac