DUNE IP CONTROL OVERVIEW - DRAFT
================================
NOTE: This document contains a preliminary description of Dune IP Control
feature. The information in this document is not fully complete at the
moment.
NOTE: Dune IP Control protocol is being under development now and may be
slightly changed in future Dune firmware versions. However, the overall
approach and main features are expected to be kept as now.
Introduction
------------
Dune IP Control feature allows to send HTTP commands to Dune media player
which request the player to do various things, such as:
- Start playback of the given media content.
- Control the playback (pause, seek to a given position, etc).
- Report the current player status (current playback position, etc).
- Stop playback and switch to various player states (e.g. black screen,
standby).
When IP Control functionality is enabled, an HTTP server is running inside the player.
The HTTP server can be accessed via HTTP port 80.
HTTP-request examples
---------------------
==== Start playback ====
10.0.0.1/cgi-bin/do?
cmd=start_file_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/file.mkv
10.0.0.1/cgi-bin/do?
cmd=start_dvd_playback&media_url=smb://10.0.0.1/VideoStorage/SomeFolder/DVDFolder
10.0.0.1/cgi-bin/do?
cmd=start_dvd_playback&media_url=storage_name://MyHDD1/SomeFolder/dvd_image.iso
10.0.0.1/cgi-bin/do?
cmd=start_bluray_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/BlurayFolder
10.0.0.1/cgi-bin/do?
cmd=start_bluray_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/bluray_image.iso
10.0.0.1/cgi-bin/do?
cmd=start_file_playback&media_url=10.0.0.1/some_upnp_url_path
10.0.0.1/cgi-bin/do?
cmd=start_file_playback&media_url=www.someinternetradio.org/station1.mp3
10.0.0.1/cgi-bin/do?
cmd=start_file_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/file.mkv&speed=0&position=0&black_screen=1&hide_osd=1&action_on_finish=restart_playback
10.0.0.1/cgi-bin/do?
cmd=start_dvd_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/DVDFolder&speed=0&position=0&black_screen=1&hide_osd=1&action_on_finish=restart_playback
10.0.0.1/cgi-bin/do?
cmd=start_dvd_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/dvd_image.iso&speed=0&position=0&black_screen=1&hide_osd=1&action_on_finish=restart_playback
Here:
- media_url: any media URL supported by Dune (search for "media_url" in the
document dune-hd.com/firmware/misc/dune_folder_howto.txt) speed:
-1024/-512/-256/-128/-64/0/64/128/256/512/1024 (0 = paused, 64 = 1/4x,
256 = 1x, 1024 = 4x, -1024 = -4x).
- position: initial position (seconds).
- black_screen: 0|1 (1 means everything (video+OSD) is initially hidden by
"black screen" - can be reset to 0 later via set_playback_state command).
- hide_osd: 0|1 (1 means OSD is initially hidden - can be reset to 0 later
via set_playback_state command).
- action_on_finish: exit|restart_playback ("exit" means exit the playback
in the usual way, "restart_playback" means go to the initial playback
state).
NOTE: Not all parameters are supported for all file formats. For Blu-ray
playback, many parameters are not supported (in particular, black_screen
and hide_osd is not supported).
==== Control playback ====
10.0.0.1/cgi-bin/do?cmd=set_playback_state&speed=256&black_screen=0
10.0.0.1/cgi-bin/do?cmd=set_playback_state&position=1000
10.0.0.1/cgi-bin/do?cmd=set_playback_state&speed=0
10.0.0.1/cgi-bin/do?cmd=set_playback_state&skip_frames=-1
10.0.0.1/cgi-bin/do?cmd=set_playback_state&skip_frames=1
10.0.0.1/cgi-bin/do?cmd=set_playback_state&speed=256
10.0.0.1/cgi-bin/do?cmd=set_playback_state&speed=0&position=0&black_screen=1
10.0.0.1/cgi-bin/do?cmd=set_playback_state&hide_osd=0
Here:
- speed, position, black_screen, hide_osd: the same as in
"start_file_playback" command.
- skip_frames: -1|1 (can only be used when the playback is paused (speed =
0); allows to navigate to next/prev key frame; is supported for DVD and
MKV only).
10.0.0.1/cgi-bin/do?cmd=dvd_navigation&action=RIGHT
Here:
action: LEFT|RIGHT|UP|DOWN|ENTER
==== Stop playback / switch to various player states ====
10.0.0.1/cgi-bin/do?cmd=black_screen
Stop playback (if any), go to the global "black_screen" state.
10.0.0.1/cgi-bin/do?cmd=main_screen
Stop playback (if any), go to the main screen of the player's menu
10.0.0.1/cgi-bin/do?cmd=standby
Stop playback (if any), go to standby state.
==== Emulate a command from Remote Control ====
10.0.0.1/cgi-bin/do?cmd=ir_code&ir_code=F40BBF00
Here:
- ir_code: 4-byte NEC IR code supported by Dune (see
dune-hd.com/support/rc), with bytes written in the opposite order
(e.g. RC button "1" = 00 BF 0B F4 => F40BBF00).
==== Getting player status ====
10.0.0.1/cgi-bin/do?cmd=status
Do nothing, just return to the current player status.
Command execution timeouts
--------------------------
The client gets response either when the command execution completes, or on
timeout. The default timeout is 20 seconds. If timeout occurs, the
"timeout" status is returned to the client, and the command execution is
continued by the player; if needed the client can then poll the player with
the "status" command to wait for the player to change its state as the
result of this command. There is a special parameter "timeout", which
allows to specify any other timeout (seconds) (1 sec is minumum).
Example of "timeout" parameter usage:
10.0.0.1/cgi-bin/do?
cmd=start_file_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/file.mkv&speed=0&black_screen=1&hide_osd=1&timeout=1
HTTP-response syntax
--------------------