.. _AppProps: Application Properties ====================== Here you can find the reference of all the settings that you can apply to Stamp by editing your Wowza application’s ``Application.xml`` file. You can create and edit these properties using the Wowza Streaming Engine Manager's user interface as well. These properties have to go into the ```` section of your file as follows: .. code-block:: xml live stamp.api.port 4567 ``stamp.caption.source`` ------------------------ The name of the logical caption source, which will provide the caption data. Possible values are: ``file`` (Don't put the file path here, just the word file) **Default:** ``file`` ``stamp.calibrate`` ------------------- If switched on, the module will render a grid of coordinates and font size examples over the video output, below any additional caption. This can be used to test the module working and to position the overlay accurately. **Default:** ``true`` ``stamp.calibrate.inverse`` --------------------------- Works if calibration is on. It inverts the grid color, which is by default black, but if invertion is on, it is white. **Default:** ``false`` ``stamp.encode.source`` ----------------------- This switches between applying the overlays on each output separately after transcoding them or applying the overlays on the incoming source stream once and then transcoding the result into the outgoing streams. The difference is that for example if you have multiple size outputs, the relative size of a caption will be different on each stream if you go with the default false setting. ``stamp.loop.sleep.millis`` --------------------------- The sleep time of the thread that is responsible for managing waiting and active instructions. This determines the minimum resolution of start and end times, so if you want more precise timing (e.g. animation), lower this value to around 20. **Default:** 100 ``stamp.image.cache`` --------------------- The directory on the file system that is used for storing images that are downloaded when instructions refer to HTTP urls. The default ``java.io.tempdir`` VM property that is in turn defaults to the OS tempdir File Caption Source Settings ============================ File caption source is the simplest way to feed caption instructions to Stamp as an alternative to using the UI (which in turn simply uses the REST API). All you need to do is creating a text file and put one caption instruction per line. The file should be readable by the Wowza server. The file is parsed upon Stamp startup and an OS level watch is registered, so whenever you edit the file, it is reprocessed immediately. Modified and new instructions are pushed into the caption queue sorted by ther start times. Instructions that already have been enqueued are not taken out of the queue. The file is assumed to be encoded using the default file encoding of the JVM which runs Wowza. That means it is assumed to be UTF-8 on Linux machines and ISO-8859 on Windows machines. This can be changed by using ``-Dfile.encoding property`` of the JVM. Lines starting with # are ignored, just as empty lines. Each line needs to contain exactly one caption instruction in JSON format or in direct format. The lines should not contain line breaks, even if your browser puts line breaks in the example above. Direct format means that you can put captions directly into the file, without any JSON. In this case the caption will be shown with default formatting in the default position, which is white text in the upper left corner. This is useful for testing / demonstration purposes. .. code-block:: # This is a comment. # Empty lines are simply ignored. This should be two lines below. {start: "now+1", duration: 10, text: "Hello Stamp", position: {x: 10, y: 50}, style: {font:"Broadway", size:40, style:"bolditalic", color: "green"}} {start: "not+5", duration: 60, text: "Can you see this?", position: {x: 10, y: 50}, style:{font:"Broadway", size:40, style:"bolditalic", color: "green"}} ``stamp.caption.source.file`` ----------------------------- This property should be the name of the file that is expected to contain the caption instructions. ``stamp.caption.source.file.encoding`` -------------------------------------- The caption source file is by default assumed to be the Wowza JVM's default charset that is either specified by the -Dfile.encoding startup switch, or is taken from the operating system. It is utf8 by default on Unix based systems. This switch allows you to override that, e.g. `cp1252`, `utf16` ``stamp.caption.source.file.watch.period`` ------------------------------------------ By default the file is watched using an OS level file monitoring hook. In some cases, like if the file is on NFS, this hook does not work. In this case you can set this property above zero, which will enable a periodic file re-read every N milliseconds. If set to 0, then Stamp will use the OS hook only. **Default:** 0 Excluding Renditions ==================== By default Stamp applies overlays on all outputs configured in your transcoder settings. If you would like to selectively switch it off on a certain output (starting with version 2018.09.08), you can do that by adding the below property in your transcoder xml file: .. code-block:: xml true 720p mp4:${SourceStreamName}_720p .... stamp.overlays.enabledfalse