NCast Presentation Recorder Reference Manual
compression_level - png compression level 0 to 9
With no parameters the default settings are format=jpg, quality=85, and the width and height will match the
current settings of the session frame size.
The interface is password protected, so each “wget” must include a username and password as two
additional arguments. The required username is “api” and the password is set on the Configuration →
Passwords page at the “HTTP API” entry:
wget --http-user=api --http-passwd=passwd
9.5. HTTP I
NTERFACE
– G
RAPHICS
O
VERLAY
U
PLOAD
Overlay graphics used in presentations may be uploaded dynamically through use of an upload utility
program. When used in conjunction with a scheduler or serial interface command controller this leads to a
powerful method to configure all aspects of a Presentation Recorder for a given Session. It allows custom
templates to be changed on an hourly basis, for example.
A single command line using a widely available utility is enough to upload a single graphic:
curl -u api:ncast -F "[email protected]" http://w.x.y.z/api.cgi
The following program is an example of a Python utility which may be used to upload multiple new graphics
images on command (check the NCast website for the latest version of this program):
#!/usr/bin/env python
'''
Tool to upload graphical overlays to an NCast Presentation Recorder.
Rewritten version by Matt Eastman
Updated by H. S. Magnuski
Usage: ncgo.py <options> <host>
-d, --debug Turn debug statements on (not used)
-h, --help Print usage information
-p, --pswd=password Use "password"
-v, --version Report program version
-1, --g1 Overlay graphic 1
-2, --g2 Overlay graphic 2
-3, --g3 Overlay graphic 3
-4, --g4 Overlay graphic 4
'''
__author__ = 'Matt Eastman <[email protected]>'
__version__ = '2.1 (meastman rewrite, updated)'
import getopt
import mimetools
import mimetypes
import os
import sys
import urllib
import urllib2
def main():
debug = False
username = 'api'
password = 'ncast'
images = {}
NCast Corporation
Revision 1.1
Page 93