beautypg.com

Http interface – image and thumbnail capture, Ncast presentation recorder reference manual – NCast PR720 User Manual

Page 92

background image

NCast Presentation Recorder Reference Manual

if inputfile :
try:
f = open(inputfile, 'r')
for line in f:
host = line.strip(' \n\r')
if host == "":
continue
if host[0] == '#':
continue
if host[0:4] == 'pswd':
pswd = host[5:]
continue
print "ncfiles: Adding host", host, "to list of hosts"
hostlist.append(host)
f.close()
except IOError, (errno, strerror):
print "ncfiles I/O error(%s): %s" % (errno, strerror)
sys.exit(1)

if len(hostlist) == 0 :
print "ncfiles: No hosts listed for download"
sys.exit(1)
else:
print "ncfiles: Downloading from these hosts:", hostlist

for host in hostlist:
if remove:

removetext = "and removing files"

else:

removetext = "and keeping files"

print "ncfiles: Downloading from host", host, removetext

result = Download(host, user, pswd, realm, remove)

if not result:

print "ncfiles: Download error on host", host

print "ncfiles: Download complete"

9.4. HTTP I

NTERFACE

– I

MAGE

AND

T

HUMBNAIL

C

APTURE

The HTTP Interface may be used to capture single images from the encoder. Commonly employed utilities
such as “wget” can retrieve the current composite frame for placement of the image on a web page or
elsewhere. Here is an example of the single command line needed (without the required user/password):

wget http://w.x.y.z/api.cgi?cmd=capture -O capture.jpg

All required capture parameters like format, frame size and quality are supplied as arguments in the URL.
You can override all capture parameters, for example:

wget http://w.x.y.z/api.cgi?cmd=capture&format=png&width=1024&height=768 -O capture.png

These parameters are supported:

format

- jpg or png

width

- 128 to 1280

height

- 128 to 720

quality

- jpeg quality 0 to 100

NCast Corporation

Revision 1.1

Page 92

This manual is related to the following products: