Technical Reference Manual: E110 Encoder/Decoder August 2014
Technical Reference Manual: E110 Encoder/Decoder August 2014
Technical Reference Manual: E110 Encoder/Decoder August 2014
!
!
Version 1.8.9
!
E110 Encoder/Decoder
!
!
August 2014
Auvidea GmbH
Kellerberg 3
D-86920 Denklingen
Tel: +49 8243 7714 622
info@auvidea.com
www.auvidea.com
AUVIDEA GMBH
E110 ENCODER/DECODER
!1
VERSION 1.8.9
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
Copyright Notice
AUVIDEA GMBH
E110 ENCODER/DECODER
!2
VERSION 1.8.9
Introduction
!
Encoder
Compact and low cost single stream AAC audio and H.264 video encoder for recording and
streaming compressed audio/video. The compressed video may be recorded on a USB memory
device or internal micro SD card. Or it may be live streamed as RTSP stream.
Technical details
Software
AUVIDEA GMBH
E110 ENCODER/DECODER
!3
VERSION 1.8.9
Timing analyzer
The integrated timing analyzer allows to determine the timing parameters of the HDMI video input
signal precisely. This is very handy for the automatic configuration of the video processing
software. Just set the autosize parameter and the E110 will automatically configure itself for
most HDMI devices connected.
AUVIDEA GMBH
E110 ENCODER/DECODER
!4
VERSION 1.8.9
Firmware Releases
web based GUI to exercise the API and to control the E110
write custom EDID and configure programmable timer
programmable text overlay (up to 8 strings with 24 characters each)
timestamp overlay with frame counter
profile selection: H.264 baseline, main or high
decoder: play RTSP stream (720p and 1080i) - AAC audio and H.264 video
Known issues
do not disconnect the video source while recording or streaming
switch from decoder mode back to encoder mode requires cold reboot
!
!
!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!5
VERSION 1.8.9
System Control
The startup script /etc/init.d/99init initializes the functions of the E110. It sets the date and time
through ntp and starts the core executable /data/bin/auvidea_enc which supervises and manages
all functions of the E110 including the http request based API.
auvidea_enc
Initialize all hardware devices in the E110. The first 2 options have to be executed once after
power up to initialize the hardware devices in the system.
Options:
-i
reset and init HDMI devices
-a
init analog audio
-e
start normal operation
Telnet
For security reasons Telnet is disabled and should not be activated.
SSH
By default the root level access is disabled, to protect the system. Experienced users may request
the admin password for the admin API call. This password allows to enable SSH access and the
other functions of the admin interface. If you request the admin password for your system, you
need to sign the warranty release agreement, as Auvidea can not longer guarantee the operation of
the system. System operation is then the users full responsibility. Worst case, the system may
become dysfunctional, the hardware may be damaged and a complete reflash may be required. At
this time, only Auvidea can perform flashing of the system. Auvidea provides this as a service.
Please contact us at support@auvidea.com. Please include a copy of the startup.log file, which the
system copies to the USB devices at boot up time.
Please note, that the root level access will not allow you to port third party applications or custom
software to the E110, as there is no C tool chain (a C compiler) installed. The system requires a
custom cross tool chain. For customization we recommend to use the optional WLAN add-on module
and install custom software on that module.
Web server
This is the main control interface with HTTP requests as described in the following sections. Also
this web server may be used to serve standard html pages. They may be copied to the www_root
directory with the www API calls. The web server supports no server side processing such as PHP
or JSP. Please contact us, if you would require more features. Optionally a regular web server
(lighttpd) could be activated.
FTP
FTP is disabled by default.
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!6
VERSION 1.8.9
Default settings
!
VERSION=19
#######################################################################
# auvidea_enc configuration
# version 19 (July 2014)
# warning: do not modify (this file is maintained by auvidea_enc)
#######################################################################
# Audio settings
DIGITAL="1"
LN_VOL_LEFT="0"
LN_VOL_RIGHT="0"
LN_MUTE_LEFT="0"
LN_MUTE_RIGHT="0"
HP_VOL_LEFT="-10"
HP_VOL_RIGHT="-10"
HP_MUTE_LEFT="0"
HP_MUTE_RIGHT="0"
MICBIAS="0"
SAMPLERATE="48000"
# network settings
SUBNET_MASK="255.255.255.0"
# ntp time server
NTP="pool.ntp.org"
UTC_OFFSET="-2"
# audio and video capture
WIDTH="1280"
HEIGHT="720"
HSIZE="1280"
VSIZE="720"
START="0"
START="0"
CROP_LEFT="0"
CROP_TOP="0"
FPS="60"
AUTOSIZE="1"
SWAPUV="0"
# encoding (audio only not supported yet)
VIDEO="2000"
AUDIO="128"
PROFILE="2"
GOP="30"
FPS_DIVIDE="2"
AV="0"
STEREO="1"
PREVIEW="1"
# streaming
PROTOCOL="RTSP"
NAME="stream"
PORT="554"
# timer
START="0"
AUVIDEA GMBH
E110 ENCODER/DECODER
!7
VERSION 1.8.9
DURATION="0"
TIMERMODE="1"
# play
P_ADDRESS="192.168.0.160"
P_NAME="stream"
P_VIDEO="1"
P_FORMAT="2"
P_AV="0"
P_NTSC="0"
P_SAMPLERATE="48000"
# LED
LEDREC="2"
LEDSTREAM="2"
LEDPOWER="2"
This startup script initializes the functions of the E110. It sets the date and time through ntp and
start the core executable /data/bin/auvidea_enc which supervises and manages all functions of the
E110 including the http request based API. This script file is copied to the USB memory device, if
one is inserted at bootup time.
Auto start
The timer is disabled by setting both TIMERMODE to 0. To start streaming immediately after
power up, set START=0, DURATION=0 and TIMERMODE=1.
CROP_LEFT and CROP_TOP are the cropping parameters.
AUVIDEA GMBH
E110 ENCODER/DECODER
!8
VERSION 1.8.9
Encoder Settings
!
Default settings
The default settings allow to stream a 16:9 video source such as the 1280x720p60 video from an
Apple iPad mini (HDMI video via Apple AV adapter) at the original resolution of 1280x720 with 60
fps. It is recommended to lower the frame rate to 30 fps by setting fps_divide=2.
Low bandwidth
At low bandwidth settings it it recommended to increase the GOP size from 16 to a higher value. A
GOP size of 16 indicates that an i-frame is generated every 16 frames. As a rule of thumb, the iframe is approximately 10 .. 20 times larger than a P or B frame. So a larger GOP size uses the
bandwidth available more efficiently. Please note that the GOP size may be dynamically changed
while encoding to adjust the encoder to a lower or higher bandwidth available on the uplink
channel.
Scaling
Videos may be scaled to a smaller or larger size. By setting the
wrong aspect ratio, they may even be distorted. Example: the
960x720 video of the iPad should be reduced to half size
(480x360):
crop_left=160&width=960&hsize=480&vsize=360&autosize=0
The top video image shows the scaled video from the iPad.
Please note that the width must stay at 960 and the height
at 720. If this is changed to 480 and 360, than the video will not
960x720 video scaled down to 480x360
be scaled. Instead the video is cropped and only a quarter of the
source video is encoded. The second video is cropped down to
480x360 with no scaling:
crop_left=160&width=480&height=360&hsize=480&vsize=360&autosize=0
AUVIDEA GMBH
E110 ENCODER/DECODER
!9
VERSION 1.8.9
RTSP stream
The RTSP may be send to local players and servers. As it is a pull stream, it does not support
sending the stream to public streaming servers on the Internet, as it cannot cross routers with NAT
(network address translation).
If you need to stream to the Internet, please send the stream to a local protocol translator to
convert the streaming protocol to RTMP or similar protocols. Please have a look at the Wowza
server, VLC or FFMPEG for the protocol translation function. Also compact computers such as the
Raspberry Pi may be used for protocol conversion or transmuxing.
Players
The RTSP stream may be played on the following players:
Quicktime 7
Version 7.6.6 (1709) tested ok
Quicktime 10
Version up 10.2 is ok. Version 10.3 (included in MacOS 10.9) does not play RTSP streams. It no
longer falls back to the old QuickTime framework, so it will play just what AVFoundation can play.
RTSP streaming is not supported.
VLC
Version 2.1.0 Rincewind (Intel 64 bit) tested ok (on Mac OS 10.9). Please change the buffer setting
(default: 1500ms) to reduce the latency.
!
!
!
!
!
!
!
!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!10
VERSION 1.8.9
Stream Transmuxer
Transmuxer
A transmuxer converts one streaming protocol or video file to another stream protocol or video file.
In the transmuxing process the video and audio are not decoded or encoded. The audio and video
data is just repackaged. As no computing intensive software is involved, the transmuxing may be
performed by little processing resources.
This module is based of the AR9331 processor and the openWRT operating system (a special Linux
for routers). It features a 400 MHz MIPS processor, 64 MB memory, 16 MB Flash, an internal Ethernet
port to the E110 (the RJ45 Ethernet connector on the E110 must not be populated), and an external
WAN port (RJ45 connector).
openWRT supports a C cross tool chain (development platform), so custom code may be compiled
and ported to this module. This is the perfect solution, if it is desired to support streaming formats
other than RTSP and if custom software should be added to the E110.
Schedule:
!
!
!
!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!11
VERSION 1.8.9
FFMPEG
FFMPEG
FFMPEG is a very versatile transcoder (video encoder and decoder) and transmuxer. It may be
ported to various computing platforms and operating systems. For details please visit the site:
http://www.ffmpeg.org
Transmuxer
A transcoder converts one video format (codec) to another format (codec). This is very compute
intensive so it requires a high performance system. A transmuxer does not recode the audio or
video, it just reformats the data. This is a task which only requires limited processing resources, so
it may be performed on embedded systems with ARM or MIPS processors.
WLAN module
It is planned to port FFMPEG to the WLAN module.
Compiling FFMPEG
If possible please use a packet manager for your target system to install FFMPEG. Please use the
latest release and insure that the required libraries for RTSP and RTMP are installed.
AUVIDEA GMBH
E110 ENCODER/DECODER
!12
VERSION 1.8.9
Extension Port
serial port
RESET_CPU
SPI bus
network
PWM
power
AUVIDEA GMBH
E110 ENCODER/DECODER
!13
VERSION 1.8.9
AUVIDEA GMBH
E110 ENCODER/DECODER
!14
VERSION 1.8.9
Input timing
input timing
resolution
vic
active
total
timing
720p50
19
[1280,720]
[1980,750]
[40,440,220,5,5,20]
720p60
[1280,720]
[1650,750]
[40,110,220,5,5,20]
1080i25
20
[1920,540]
[2640,563]
[44,528,148,5,3,15]
1080i30
[1920,540]
[2200,562]
[44,88,148,5,2,15]
1080p24
32
[1920,1080]
[2750,1125]
[44,638,148,5,4,36]
1080p25
33
[1920,1080]
[2640,1125]
[44,528,148,5,4,36]
1080p30
34
[1920,1080]
[2200,1125]
[44,88,148,5,4,36]
NTSC
[1440,240]
[1716,263]
[124,38,114,3,5,15]
PAL
22
[1440,288]
[1728,313]
[126,24,138,3,3,19]
480p60
[720,480]
[858,525]
[62,16,60,6,9,30]
576p50
18
[720,576]
[864,625]
[64,12,68,5,5,39]
VGA 60Hz
[640,480]
[800,525]
[96,16,48,2,10,33]
SVGA 60Hz
[800,600]
[1056,628]
[128,40,88,4,1,23]
XGA 60Hz
[1024,768]
[1344,806]
[136,24,160,6,3,29]
AUVIDEA GMBH
E110 ENCODER/DECODER
!15
VERSION 1.8.9
API
The API is HTTP request based and therefore very easy to use. With a simple GET request, internal
parameters of the device may be retrieved. With a POST request parameters or commands may be
passed to the device.
The GET requests may simply be send by any web browser just by entering the API call as an URL.
Example: http://<ip-address>/api/date retrieves the date and time. POST requests my be send by
HTML form elements and interactively by some web browser plugins. The web GUI features an API
page, which lets you send any GET or POST requests to the system.
Below the Firefox browser and its HttpRequester are used to document a POST request. Just
enter the API URL in the field
on the top left and the POST
request string on the lower
left. Any number of
parameters may be specified.
The delimiter is the &
character.
The response is listed on the
right formatted in the JSON
format.
This API is implemented in a very efficient manner with fast response time and little overhead.
Many API requests execute in less than 100ms. All GET API requests have the following format:
http://<ip-address>/api/<api call>.
Please note that the options must be send as POST request. Sending them with a GET request will
not work. Please have a look at the HTML examples.
Feature enhancements
This is the description of the first release of the API. The API is still in development, so new
features will be added frequently. These are the main features currently on the to do list:
!
!
Please let us know, if you would like to recommend new features and functions.
AUVIDEA GMBH
E110 ENCODER/DECODER
!16
VERSION 1.8.9
Control
This is is master control panel. Here the main functions of the encoder (stream and record) and the
decoder (play) may be started. Click on the Status or Preview bars to collapse the fields below.
The JPG preview image is updated every 2 seconds. Click on the JPG image, to enlarge it to full
size (1280x720 pixels). live change allows to change encoding parameters while streaming or
recording.
Encoder
The video, encoding and stream settings of the encoder. Please use the action=save parameter,
to save the settings permanently.
Overlay
Up to 7 text lines and a timestamp may be overlaid in the encoded video. No overlay on the loop
through video and the decoded video are performed.
Audio
The audio control panel for setting various audio properties.
EDID
Read and write the EDID of the HDMI input.
AUVIDEA GMBH
E110 ENCODER/DECODER
!17
VERSION 1.8.9
Timer
Configure a single event timer, to start recording or streaming at a preset time and date. An infinite
interval is supported by setting the duration to 0. Autostart is supported as well. Please see the
timer page for details.
System
Network, date, www, and logging control.
Decoder
Play out an RTSP audio/video stream (H.264 video and AAC audio). With an E110 as encoder and an
E110 decoder you can achieve a very low latency video transmission (typically: 70 .. 100 ms). With
software decoders such as the OMX player on the Raspberry Pi or the VLC player to typically latency
will be around 1 or 2 seconds. On the VLC player, the latency may be reduced, by reducing the
buffer setting (default: 1500ms) in the settings dialog.
API
HTTP request page to send custom GET and POST requests interactively.
!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!18
VERSION 1.8.9
!
Web based API request form
In the web based GUI an API HTTP request form is integrated. This allows to issue custom GET and
POST HTTP requests to the API. Just enter the API URL in the first field. For a POST request the
mandatory POST string is required, which specifies the POST parameters.
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!19
VERSION 1.8.9
!
HTML code
<p><h2>GET calls</h2></p>
<p><strong><a href="api/system">system</a></strong></p>
<p><strong><a href="api/date">date</a></strong></p>
<p><strong><a href="api/network">network</a></strong></p>
<p><strong><a href="api/settings">settings</a></strong></p>
<p><strong><a href="api/audio">audio</a></strong></p>
<p><strong><a href="api/input">input</a></strong></p>
<p><h2>POST calls</h2></p>
<p>
<form name="post1" action="api/settings" method="post">
width <input type="text" name="width">
height <input type="text" name="height">
<input type="submit" value="settings">
</form>
</p>
Response
{!
"status": 0,!
"width": 900,!
"height": 900, !
..!
}!
AUVIDEA GMBH
E110 ENCODER/DECODER
!20
VERSION 1.8.9
status
GET
This API call is specifically designed to poll the system status in regular intervals and display it on
the web page. The parameters lost frames and fail frames should always be 0. This indicates
that the encoder performs properly.
Audio and video synchronization
av sync drop and repeat frames are video frames which are inserted or deleted to ensure that
audio and video stay 100% in sync. The system master clock of the encoder is derived from the
audio clock. As audio and video clocks are sometimes not locked to each other because they may be
generated from 2 independent crystals, it is required, that audio and video frames are resynchronized in regular intervals. In the example below 13 frames were added in 674,000 frames,
so roughly one frame every 50,000 frames (at 60 fps this is one frame every 15 minutes). This
interval varies with the video and audio sources connected (typically: 10,000 .. 100,000 frames).
With many HDMI sources the digital video and digital audio data are perfectly in sync, to no frames
have to be deleted or added (no avsync operation).
Parameters (get)
mode
0: encoder, 1: decoder
cable
format
digital
stream
record
bitrate
frames
frame rate, total frames, encoded frames, lost frames, fail frames, av sync drops, av sync repeats
live
video bit rate, gop size, encoded video resolution (horizontal, vertical)
timer
0: off, -1: event pending, 1: stream, 2: record, 3: record & stream, 4: play
time
time interval until event start or event start (-1: infinite interval)
Response
{!
"status": 200,!
"mode": 0,!
"cable": 1,!
"format": "720p60",!
"digital": 0,!
"stream": 11244,!
"record": 0,!
"bitrate": [1848,1520,153],!
"frames": ["60.0",674116,673945,0,0,0,13],!
"live": [2000,30,1280,720],!
"timer": -1,!
"time": 85040!
}!
AUVIDEA GMBH
E110 ENCODER/DECODER
!21
VERSION 1.8.9
date
GET
POST
xxx
isoTime
xxx
year
2014 .. 2100
month
1 .. 12
day
1 .. 31
hour
0 .. 23
minute
0 .. 59
second
0 .. 59
weekday
1 .. 7
utcOffset
-12 .. +12
timeZone
GMT,
Response
{!
"status": 200,!
"time": 10906,!
"isoTime": "2014-05-12T13:01:46",!
"year": 1970,!
"month": 1,!
"day": 1,!
"hour": 3,!
"minute": 1,!
"second": 46,!
"weekday": 5,!
"utcOffset": 0,!
"timeZone": "UTC"!
}!
date/ntp
GET
POST
save, ntp_update
ntp
server address
default: pool.ntp.org
utcOffset
-12 .. +12
Response
{!
"status": 200,!
"ntp": "pool.ntp.org",!
"utcOffset": 0!
}!
AUVIDEA GMBH
E110 ENCODER/DECODER
!22
VERSION 1.8.9
!
audio
GET
POST
A switch from analog to digital audio and vice versa may only performed, while the encoder is not
recording or streaming. The switch over time is approximately 6 seconds. If settings should be
permanently saved, place the action=save parameter at the beginning of the post string. Only
parameters after action=save are permanently saved.
Parameters (get and post)
action
digital
stereo
volLeft
volRight
muteLeft
muteRight
sampleRate
hpLeft
hpRight
hpMuteLeft
hpMuteRight
Response
{!
"status": 200,!
"digital": 1,!
"volLeft": 0,!
"volRight": 0,!
"muteLeft": 0,!
"muteRight": 0,!
"hpLeft": -10,!
"hpRight": -10,!
"hpMuteLeft": 0,!
"hpMuteRight": 0,!
"micBias": 0,!
"sampleRate": 48000,!
"stereo": 1!
}!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!23
VERSION 1.8.9
input
GET
POST
colorInput is the color code as received with the AVI info frame. Normally the HDMI receiver chip
is set to the same color code. This setting may be manually overwritten (post).
Parameters (get and post)
cable
hpd
on: HPD line active (default), off: HPD line inactive (no video)
edid
format
active
total
timing
h front porch, h width, h back porch, v front porch, v width, v back porch
interlaced
true or false
aviInfoframe
color
color code overwrite (0: RGB, 1: YUV 4:2:2, 2: YUV 4:4:4) (get and post)
colorInput
vic
Response
{!
"status": 200,!
"cable": "plugged",!
"hpd": "on",!
"edid": "remote",!
"format": "720p60",!
"active": [1280,720],!
"total": [1650,750],!
"timing": [40,110,220,5,5,20],!
"interlaced": false,!
"aviIinfoframe": true,!
aviInfoframeData: ["0x02,"0x73","0x50","0xa8","0x00","0x04","0x00","0x00","0x00",!
"0x00","0x00","0x00","0x00","0x00","0x00"],!
"color": 2,!
"colorInput": 2,!
"vic": 4,!
"audioInfoframe": true,!
"audioInfoframeData": ["0x01","0x70","0x01","0x00","0x00","0x00"],!
"msInfoframe": false!
}!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!24
VERSION 1.8.9
input/edid
GET
get the EDID memory of the HDMI input of this system (http://<ip-address>/api/input/edid)
POST
set the EDID memory of the HDMI input of this system with a custom EDID
base
baseChecksum
first number: calculated total sum, second number: calculated sum modulo 256 (checksum)
extended
extendedCheck. first number: calculated total sum, second number: calculated sum modulo 256 (checksum)
Parameters (post)
action
base
extended
!
Sample base POST string:
action=save&base=0,255,255,255,255,255,255,0,65,165,1,0,0,0,0,0,26,23,1,3,128,16,9,120,10,238,
145,163,84,76,153,38,15,80,84,33,8,0,129,192,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,254,0,86,51,95,48,
0,0,0,0,0,0,0,0,0,1,29,0,188,82,208,30,32,184,40,85,64,160,90,0,0,0,30,0,0,0,253,0,24,60,26,81,8,
0,10,32,32,32,32,32,32,0,0,0,252,0,85,78,79,10,32,32,32,32,32,32,32,32,32,1,159
Please note that a valid base set must start with the sequence: 0,255,255,255,255,255,255,0.
Numbers in hexadecimal format are not supported.
The last byte is the checksum byte (here: 159). All 128 bytes must add up to a multiple of 256
(here: 6912).
The range of each byte is: 0 .. 255.
action=save permanently saves the custom EDID in the file: /data/bin/edid.hex.
action=default reverts back to the factory default EDID setting.
AUVIDEA GMBH
E110 ENCODER/DECODER
!25
VERSION 1.8.9
Response
{!
"status": 200,!
"base": [!
"0x00","0xff","0xff","0xff","0xff","0xff","0xff","0x00",!
"0x41","0xa5","0x01","0x00","0x00","0x00","0x00","0x00",!
"0x1a","0x17","0x01","0x03","0x80","0x10","0x09","0x78",!
"0x0a","0xee","0x91","0xa3","0x54","0x4c","0x99","0x26",!
"0x0f","0x50","0x54","0x21","0x08","0x00","0x81","0xc0",!
"0x01","0x01","0x01","0x01","0x01","0x01","0x01","0x01",!
"0x01","0x01","0x01","0x01","0x01","0x01","0x00","0x00",!
"0x00","0xfe","0x00","0x56","0x33","0x5f","0x30","0x00",!
"0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00",!
"0x01","0x1d","0x00","0xbc","0x52","0xd0","0x1e","0x20",!
"0xb8","0x28","0x55","0x40","0xa0","0x5a","0x00","0x00",!
"0x00","0x1e","0x00","0x00","0x00","0xfd","0x00","0x18",!
"0x3c","0x1a","0x51","0x08","0x00","0x0a","0x20","0x20",!
"0x20","0x20","0x20","0x20","0x00","0x00","0x00","0xfc",!
"0x00","0x55","0x4e","0x4f","0x0a","0x20","0x20","0x20",!
"0x20","0x20","0x20","0x20","0x20","0x20","0x01","0x9f"!
],!
"baseChecksum": [6912,0],!
"extended": [!
"0x02","0x03","0x20","0xf4","0x48","0x93","0x84","0x05",!
"0x14","0x03","0x12","0xa0","0xa1","0x23","0x09","0x07",!
"0x07","0x83","0x01","0x00","0x00","0x67","0x03","0x0c",!
"0x00","0x10","0x00","0x80","0x10","0xe2","0x00","0x2a",!
"0x01","0x1d","0x80","0xd0","0x72","0x1c","0x16","0x20",!
"0x10","0x2c","0x25","0x80","0xa0","0x5a","0x00","0x00",!
"0x00","0x9e","0x01","0x1d","0x80","0x18","0x71","0x1c",!
"0x16","0x20","0x58","0x2c","0x25","0x00","0xa0","0x5a",!
"0x00","0x00","0x00","0x9e","0x01","0x1d","0x00","0x72",!
"0x51","0xd0","0x1e","0x20","0x6e","0x28","0x55","0x00",!
"0xa0","0x5a","0x00","0x00","0x00","0x1e","0x8c","0x0a",!
"0xd0","0x90","0x20","0x40","0x31","0x20","0x0c","0x40",!
"0x55","0x00","0xa0","0x5a","0x00","0x00","0x00","0x1e",!
"0x8c","0x0a","0xd0","0x8a","0x20","0xe0","0x2d","0x10",!
"0x10","0x3e","0x96","0x00","0xa0","0x5a","0x00","0x00",!
"0x00","0x1e","0x00","0x00","0x00","0x00","0x00","0x59"!
],!
"extendedChecksum": [7424,0]!
}!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!26
VERSION 1.8.9
system
GET
Please feel free to monitor the freeMemory parameter. If this parameter decreases over time and
approaches 0, then the system has a memory leak problem. Please send us a bug report with as
much information as possible, to that we can duplicate the problem and fix it. And we make sure
that we punish the software developers.
Parameters (get )
model
model description
hostname
Linux hostname
serialNumber
serial number
macAddress
MAC address
firmware
software
hardware
linux
Linux version
freeMemory
systemUptime
uptime
Response
{!
"status": 200,!
"model": "Auvidea E110 H.264/AAC encoder/decoder",!
"hostname": "e110",!
"serialNumber": "110001014",!
"macAddress": "00:40:05:73:54:0E",!
"firmware": "v1.4",!
"version": "software release 1.4",!
"hardware": "38056-2",!
"linux": "2.6.30.mobi.merlin-mg3500.custom",!
"freeMemory": "12164kB",!
"systemUptime": 11320,!
"uptime": 567!
}!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!27
VERSION 1.8.9
network
GET
POST
Network changes may be made temporarily (until the next boot) or permanently. For permanent
changes please use the POST parameter action=save. Only parameters after action are
permanently saved. So action should be the first parameter in the POST string.
DHCP
Please use this parameter carefully, as this system has little means to communicate the dynamically
assigned IP address. DHCP settings changes are active with the next reboot of the system. If dhcp
is set to 1 without action=save, then it will effect only the next reboot, and on the reboot
after it will revert to dhcp=0. Please use this scheme, to first try out DHCP. Please retrieve the IP
address from the DCHP tables in your DHCP server (typically your router) or by inserting a USB stick
at boot up time. Remove the stick when the boot has completed and open the startup.log file with
a text editor. Also you will find a copy of the config file on the USB stick.
Parameters (get and post )
action
ip
IP address
subnet
subnet mask
gateway
gateway address
dns
mac
dhcp
RXbytes
TXbytes
Response
{!
"status": 0,!
"ip": "192.168.0.160",!
"subnet": "255.255.0.0",!
"gateway": "fritz.box",!
"dns": "192.168.0.1",!
"mac": 00:40:05:73:53:A7"!
"dhcp": "0"!
}!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!28
VERSION 1.8.9
led
GET
POST
3 LEDs are located in the front of the board below the connectors as indicated below. auto is the
default setting. Here the LEDs are controlled automatically. The rec LED lights up, when the system
is recording. The stream LED lights up, when the system is streaming.
Parameters (get and post )
rec
stream
power
Response
{!
"status": 0,!
"rec": "auto",!
"stream": "auto",!
"power": "auto"!
}!
AUVIDEA GMBH
E110 ENCODER/DECODER
!29
VERSION 1.8.9
pwm
GET
POST
The system features 3 PWM (pulse width modulation) outputs (PWM_0, PWM_1 and PWM_2 on
expansion connector J23). The pulse width and the frequency may be set. On the WLAN module
these signals control the 3 servos outputs. For standard servos the frequency should be 50 Hz. The
pulse high time should vary from 0.5ms (servo=-1000) to 1.5ms (servo=+1000). For other
applications the low time of the pulses may be specified directly. At 50 Hz the total low time is
approx. 666,000 (timer ticks).
Parameters (get and post )
servo
servo control from -1000 to +1000 (the low time is computed automatically)
frequency
typically 50 Hz
lowtime
Response
{!
"status": 200,!
"servo1": -500,!
"frequency1": 50,!
"lowtime1": 628500,!
"servo2": 0,!
"frequency2": 50,!
"lowtime2": 617000,!
"servo3": 1000,!
"frequency3": 50,!
"lowtime3": 594000!
}!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!30
VERSION 1.8.9
storage
GET
This system can either record video files to a USB memory stick or internal micro USB card. Please
use record, to select the target device for recording.
The internal flash memory stores various applications and system data as well as the www_root
directory. If large amounts of data are copied to the www_root directory, then this parameter
needs to be monitored.
Parameters (get)
power
mounted
yes, no
name
path
filesystem
total
free
flash
total: total size of internal flash memory, free: free size of internal flash memory
Parameters (post)
power
on
off
power off
Response
{!
"status": 0,!
"power": "on",!
"usb": {!
"mounted": "yes",!
"name": "Intenso",!
"path": "/media/Intenso",!
"filesystem": "fat",!
"total": "1949 MB",!
"free": "328 MB"},!
"sd": {!
"mounted": "yes",!
"name": "SDCARD8GB",!
"path": "/media/SDCARD8GB",!
"filesystem": "fat",!
"total": "7631 MB",!
"free": "7628 MB"},!
"flash": {!
"total": "426 MB",!
"free": "418 MB"}!
}!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!31
VERSION 1.8.9
settings
GET
POST
It is recommended to keep the autosize property set, so that the encoding resolution is
automatically configured. To scale the video before encoding or to configure video formats, which
are not automatically detected, please set this property to 0. In this case all parameters may be
manually configured.
JPEG preview
This features allows to push JPEG images onto a web page for preview purposes. The E110 creates
an JPEG image every 2 seconds and overwrites the previous one, as all images are saved unter the
same name: <www-root>/image.jpg.
Parameters (get and post)
action
width, height
hsize, vsize
cropLeft
cropTop
hstart, vstart
total
interlaced
fpsDivide
gop
video
audio
profile
av
autosize
swapUV
1: swap Cr and Cb color channels (swap red and blue), 0: normal operation
name
port
preview
AUVIDEA GMBH
E110 ENCODER/DECODER
!32
VERSION 1.8.9
Response
{!
"status": 200,!
"width": 1280,!
"height": 720,!
"hsize": 1280,!
"vsize": 720,!
"cropLeft": 0,!
"cropTop": 0,!
"hstart": 260,!
"vstart": 25,!
"fps": 60,!
"interlaced": 0,!
"fpsDivide": 2,!
"gop": 30,!
"video": 2000,!
"audio": 128,!
"profile": "high",!
"av": 0,!
"autosize": 1,!
"swapUV": 0,!
"name": "stream",!
"port": 554,!
"preview": 1!
}
AUVIDEA GMBH
E110 ENCODER/DECODER
!33
VERSION 1.8.9
stream
GET
POST
The system supports RTSP live streaming to a local player (such as a VLC player) and a local server
(such as a Wowza server). Some parameters may may changed while streaming or recording, to
adjust the bandwidth output of the encoder to the bandwidth available on the communications
link. However, it is not recommended to change the resolution of the video, while encoding.
Players do not accept a live change of the video resolution. Please restart the player.
Parameters (get)
stream
streaming, stopped
startTime
address
Parameters (post)
action
start, stop
video
100 .. 15000: change the video bandwidth while streaming or while recording
gop
hsize, vsize
change the encoding size while streaming or recording (for experimental use only)
Response
{!
"status": 200,!
"action": 0,!
"stream": "streaming",!
"startTime": 11518,!
"address": "rtsp://192.168.0.160:554/stream"!
}!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!34
VERSION 1.8.9
record
GET
POST
Some recording parameters (gop and video bandwidth) may may changed while streaming or
recording. Please use the stream call, to adjust these two settings.
Parameters (get)
record
recording, stopped
startTime
isoStartTime
duration
file
frames
lost
device
Parameters (post)
action
start, stop
device
USB, SD
Response
{!
"status": 200,!
"record": "recording",!
"startTime": 1404075705,!
"isoStarTime": "2014-05-12T13:13:00+0000",!
"duration": 5,!
"file": "/media/Intenso/video_2014-05-12_13-11-53/video.mp4",!
"device": "USB"!
}!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!35
VERSION 1.8.9
statistics
GET
If recording is active and fail_frames is not zero, some frames could not be written to the recording
device. This is an indication, that the memory device being recorded to is not fast enough. Please
ensure that a video class 6 or better device (SD card in USB card reader) is used, as these are
optimized for recording applications. Most USB memory sticks have low sustained write rates, as
sometimes they are busy with internal housekeeping tasks at certain times.
Encoded_frames vs. total_frames: if FPS_DIVIDE is greater than 1, then the video is encoded at a
reduced frame rate. Consequently the number of encoded frames is lower than the number of total
frames.
Audio and video synchronization
Frames are inserted or deleted to keep the video in sync with the audio. Please see /api/status for
details.
Parameters (get)
videoBitrate
frameRate
totalFrames
avsyncFrames
drop/repeat frames: inserted/deleted frames, to ensure that audio and video stay in sync
encoderSize
encoderLoad
hardware and software load of the encoder in percent (here: HW 510% and SW 10%)
Response
{!
"status": 200,!
"videoBitrate": 1848,!
"videoCurBitrate": 1520,!
"audioBitrate": 151,!
"frameRate": "60.0",!
"totalFrames": 693554,!
"encodedFrames": 693382,!
"failFrames": [0,0],!
"avsyncFrames": [0,13],!
"encoderSize": [1280,736],!
"encoderLoad": [51,10]!
}!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!36
VERSION 1.8.9
recordings
GET
recording
Response
{!
"status": 0,!
"device": "USB",!
"recordings": [!
[ 1, "/media/Intenso/video_2014-04-11_13-30-25"],!
[ 2, "/media/Intenso/video_2014-04-11_15-20-00"],!
[ 3, "/media/Intenso/video_2014-04-12_11-49-34"],!
[ 4, "/media/Intenso/video_2014-04-12_14-00-15"]!
],!
"number": 4!
}!
GET request issued simply with the URL (Safari browser on Mac OS 10.9)
AUVIDEA GMBH
E110 ENCODER/DECODER
!37
VERSION 1.8.9
timer
GET
POST
time
ISO_time
duration
mode
startIn
remaining
recording
streaming
playing
active
pending
result
-1: idle, 0: completed, 1 .. 8: record could not start, 10: record started
Response
{!
"status": 200,!
"time": 1405955220,!
"isoTime": "2014-07-21T15:07:00",!
"year": 2014,!
"month": 7,!
"day": 21,!
"hour": 15,!
"minute": 7,!
"second": 0,!
"duration": 1000,!
"mode": 1,!
"startIn": 84591,!
"remaining": 0,!
"recording": 0,!
"streaming": 0,!
"playing": 0,!
"active": 0,!
"pending": 1,!
"result": -1!
}!
AUVIDEA GMBH
E110 ENCODER/DECODER
!38
VERSION 1.8.9
play
GET
POST
play can decode an RTSP video stream and play it out on the HDMI output port.
Note: the E110 can easily switch from encode (record and stream) to decode (play) mode, but it
cannot switch back from decode to encode. To switch back the E110 needs to be powered down and
up again (cold reboot). If the decoder does not receive a video stream, it will show show a blue
screen. If the stream got interrupted, the decoder will sense this and restart, waiting for the
stream to continue. In this state, it will also show a blue screen.
Parameters (get and post)
play
startTime
isoStartTime
duration
address
name
video
format
rtsp
av
ntsc
sampleRate
timeoutStreamLoss timeout for stream loss - after this encoder is restarted and will wait for stream
timeoutNoStream
timeout for no stream - play was started, but no stream was received - after this interval
the encoder will be restarted (this may be set to large number)
Parameters (post)
action
start
stop
save
Response
{!
"status": 200,!
"state": 1,!
"play": "playing",!
"startTime": 1407332537,!
"isoStartTime": "2014-08-06T13:42:17+0000",!
"duration": 193,!
"address": "192.168.0.165",!
"name": "stream",!
"video": "720p50",!
"format": "rtsp",!
"av": 0,!
"ntsc": 0,!
"sampleRate": 48000,!
"timeoutStreamLoss": 1,!
"timeoutNoStream": 50!
}
AUVIDEA GMBH
E110 ENCODER/DECODER
!39
VERSION 1.8.9
playStatistics
GET
Parameters (get)
state
videoBitrate
frameRate
decoderLoad
Response
{!
"status": 200,!
"state": 0,!
"videoBitrate": [1960,1943],!
"frameRate": "49.9",!
"decodedFrames": [37737,35402],!
"receivedFrames": [37736,7,0,0],!
"clocks": [74250000,48000],!
"decoderLoad": [22,2]!
}!
AUVIDEA GMBH
E110 ENCODER/DECODER
!40
VERSION 1.8.9
output
GET
POST
Recommendation: for most applications leave color in the default setting for true loop through,
as the HDMI output will have the same color model as the HDMI input. For debugging purposes the
HDMI output may be connected to the HDMI input. This allows to read the EDID of the HDMI input
and the HPD output line of the HDMI input.
Parameters (get)
power
on: enable 5V 500mA on HDMI output, off: enable 5V 55mA on HDMI output
hpd
on: HPD input line active, off: HPD input line inactive
vic
vic code in the AVI info frames, which are send out to the monitor (mirrored from input)
color
colorInput
color code of the HDMI input (AVI info frame of HDMI input)
total
total resolution of the video put out (this should match the input resolution)
Parameters (post)
power
color
on
off
the HDMI output automatically follows the HDMI input color mode (default)
Response
{!
"status": 200,!
"power": "on",!
"hpd": "on",!
"vic": 4,!
"color": 3,!
"colorInput": 2,!
"total": [ 1650, 750 ]!
}!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!41
VERSION 1.8.9
output/edid
GET
get the EDID memory of the monitor, which is connected to the HDMI output in the back
(http://<ip-address>/api/output/edid)
Parameters (get)
base
extended
Response
{!
"status": 200,!
"base": [!
"0x00","0xff","0xff","0xff","0xff","0xff","0xff","0x00",!
"0x4c","0x2d","0x26","0x06","0x00","0x00","0x00","0x00",!
"0x1f","0x13","0x01","0x03","0x80","0x10","0x09","0x78",!
"0x0a","0xee","0x91","0xa3","0x54","0x4c","0x99","0x26",!
"0x0f","0x50","0x54","0xbf","0xef","0x80","0x71","0x4f",!
"0x81","0x00","0x81","0x40","0x81","0x80","0x95","0x00",!
"0x95","0x0f","0xa9","0x40","0xb3","0x00","0x02","0x3a",!
"0x80","0x18","0x71","0x38","0x2d","0x40","0x58","0x2c",!
"0x45","0x00","0xa0","0x5a","0x00","0x00","0x00","0x1e",!
"0x01","0x1d","0x00","0xbc","0x52","0xd0","0x1e","0x20",!
"0xb8","0x28","0x55","0x40","0xa0","0x5a","0x00","0x00",!
"0x00","0x1e","0x00","0x00","0x00","0xfd","0x00","0x18",!
"0x4b","0x1a","0x51","0x17","0x00","0x0a","0x20","0x20",!
"0x20","0x20","0x20","0x20","0x00","0x00","0x00","0xfc",!
"0x00","0x53","0x79","0x6e","0x63","0x4d","0x61","0x73",!
"0x74","0x65","0x72","0x0a","0x20","0x20","0x01","0x48"!
],!
"extended": [!
"0x02","0x03","0x1c","0xf1","0x4b","0x93","0x04","0x05",!
"0x14","0x03","0x12","0x10","0x1f","0x20","0x21","0x22",!
"0x23","0x09","0x07","0x07","0x67","0x03","0x0c","0x00",!
"0x10","0x00","0xb8","0x2d","0x01","0x1d","0x80","0xd0",!
"0x72","0x1c","0x16","0x20","0x10","0x2c","0x25","0x80",!
"0xa0","0x5a","0x00","0x00","0x00","0x9e","0x01","0x1d",!
"0x80","0x18","0x71","0x1c","0x16","0x20","0x58","0x2c",!
"0x25","0x00","0xa0","0x5a","0x00","0x00","0x00","0x9e",!
"0x01","0x1d","0x00","0x72","0x51","0xd0","0x1e","0x20",!
"0x6e","0x28","0x55","0x00","0xa0","0x5a","0x00","0x00",!
"0x00","0x1e","0x8c","0x0a","0xd0","0x90","0x20","0x40",!
"0x31","0x20","0x0c","0x40","0x55","0x00","0xa0","0x5a",!
"0x00","0x00","0x00","0x1e","0x8c","0x0a","0xd0","0x8a",!
"0x20","0xe0","0x2d","0x10","0x10","0x3e","0x96","0x00",!
"0xa0","0x5a","0x00","0x00","0x00","0x1e","0x00","0x00",!
"0x00","0x00","0x00","0x00","0x00","0x00","0x00","0xc7"!
]!
}!
AUVIDEA GMBH
E110 ENCODER/DECODER
!42
VERSION 1.8.9
www
GET
POST
This functions to manage the directory content of the www_root directory. There should not be a
subdirectory named api, as this might collide with the API calls.
Please use the clear option carefully, as the complete www_root directory is wiped out. On the
next system restart the logical link to the image.jpg file in the ramdisk (/tmp) is automatically
restored (image.jpg -> /tmp/image.jpg). Please note that a clear also deletes the web GUI. So
please backup these files first.
Parameters (post)
action
clear
copy
backup
Response (get)
{!
"status": 200,!
"www_root": [!
"
53353
"
5726
"
10434
"
4536
"
4704
"
14279
"
8119
"
14
"
756
"
13366
"
141763
"
3593665
"
4711
"
13710
"
646
"
4271
"
16842
"
7367
"
13798
]!
Jul
Jul
Jul
Jul
Jul
Jul
Jul
Jul
Jan
Jul
Jan
Jan
Jul
Jul
Jul
Jul
Jul
Jul
Jan
20
20
20
20
20
20
19
20
1
20
1
1
13
20
12
20
20
20
1
12:53
12:58
12:58
12:57
12:56
12:54
17:29
17:15
1970
16:42
1970
1970
20:06
12:56
15:03
14:50
17:00
12:43
1970
Auvidea_Logo_980x116.png",!
api.html",!
audio.html",!
decoder.html",!
edid.html",!
encoder.html",!
functions.js",!
image.jpg -> /tmp/image.jpg",!
index-min.html",!
index.html",!
jquery.js",!
manual.pdf",!
no_video_preview.png",!
overlay.html",!
player.html",!
style.css",!
system.html",!
timer.html",!
video.html"!
}!
AUVIDEA GMBH
E110 ENCODER/DECODER
!43
VERSION 1.8.9
upgrade
POST
The firmware and software may be upgraded by supplying a special upgrade file on a USB memory
device. The upgrade should only take a few seconds. After the upgrade a restart should be issued,
to load the new firmware. Or better do a cold boot. Restart may be used independently of the
upgrade, to just perform a warm boot. Important: the sequence in the post string must be:
file=<filename> and then optionally the action=restart parameter. Or just file=<filename> or
just action=restart>.
Parameters (post)
file
<filename>
action
restart
Response (status)
status
restart initiated
Response
{!
"status": 0,!
"version": "software 1.4",!
"message": "upgrade successful"!
}!
AUVIDEA GMBH
E110 ENCODER/DECODER
!44
VERSION 1.8.9
log
GET
POST
Parameters (post)
action
autoclear
start
stop
clear
on
automatically delete entire log once 100 calls have been logged
off
Response
{!
"status": 200,!
"quantity": 5,!
"log": [!
[ 1, "GET ",
[ 2, "GET ",
[ 3, "GET ",
[ 4, "POST",
[ 5, "GET ",
]!
}!
!
!
AUVIDEA GMBH
E110 ENCODER/DECODER
!45
VERSION 1.8.9
Up to 8 text strings with up to 24 characters each may be instantiated. The position of each string
may be specified with the following restriction: the horizontal position must be a multiple of 64,
the vertical position must be a multiple of 16.
Sample POST string: enable=1&index=2&x=900&y=96&text=sample text overlay
The horizontal and vertical position is automatically adjusted to the nearest legitimate value.
Parameters (post)
enable
index
font
horizontal position
vertical position
text
Response
{!
"status": 200,!
"enable": 1,!
"index": 2,!
"font": 16,!
"x": 896,!
"y": 96,!
"text": "sample text overlay",!
"length": 19!
}!
AUVIDEA GMBH
E110 ENCODER/DECODER
!46
VERSION 1.8.9
timestamp overlay
POST
One timestamp with 22 characters may be instantiated. The position of the timestamp overlay may
be specified with the following restriction: the horizontal position must be a multiple of 64, the
vertical position must be a multiple of 16.
Sample timestamp string: 2014-06-19 13:59:40:20
The last number is the frame counter.
Sample POST string: enable=1&index=1&x=128&y=16&font=16
The horizontal and vertical position is automatically adjusted to the nearest legitimate value.
Parameters (post)
enable
index
font
horizontal position
vertical position
Response
{!
"status": 200,!
"enable": 1,!
"index": 1,!
"font": 16,!
"x": 128,!
"y": 16!
}!
AUVIDEA GMBH
E110 ENCODER/DECODER
!47
VERSION 1.8.9
admin
POST
This admin interface is password protected, to protect the system. A system specific password may
be requested. Please see the chapter System Control for details.
Parameters (post)
password
xxxx
action
startSSH
stopSSH
getPS
restart
restart the audio/video encoder (this resets the frame counters and reinitializes all encoding parameters) - no password protection
(note: it does not restart the firmware)
Response
{!
"ps": !
PID USER
1 root
2 root
3 root
4 root
5 root
8 root
55 root
75 root
76 root
77 root
78 root
187 root
192 root
227 root
228 root
367 root
390 root
429 root
661 root
663 root
722 root
1151 root
1260 root
"!
}!
VSZ
1496
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1496
888
1508
1488
0
0
1496
STAT
S
SW<
SW<
SW<
SW<
SW<
SW<
SW
SW
SW<
SW<
SW<
SW<
SW<
SW<
SW<
S
S <
S
S
SW<
SW<
S
COMMAND!
init
!
[kthreadd]!
[ksoftirqd/0]!
[events/0]!
[khelper]!
[async/mgr]!
[kblockd/0]!
[pdflush]!
[pdflush]!
[kswapd0]!
[aio/0]!
[ksuspend_usbd]!
[khubd]!
[scsi_eh_0]!
[usb-storage]!
[mtdblockd]!
/bin/sh /etc/init.d/rcS !
/sbin/udevd --daemon !
/sbin/syslogd -S -C !
/sbin/klogd !
[i2c-mux]!
[kmmcd]!
/usr/sbin/inetd !
AUVIDEA GMBH
E110 ENCODER/DECODER
!48
VERSION 1.8.9
Disclaimer
Thank you for reading this manual. If you have found any typos or errors in this document or any
bugs or issues in the software or API, please let us know.
AUVIDEA GMBH
E110 ENCODER/DECODER
!49