Version 3.0

 

New

 

Corrections

 

 

How to play files on your PC

 

Playing media files on your PC can be done in two ways:

 

[1] Open file directly in Windows Media Player (Internet Explorer only)

[2] Stream file from a web server using HTTP (all browsers)

 

Mode 1: Open in Windows Media Player

The advantage of this mode of operation is that it does not require any installations, the disadvantage however is that this mode is restricted to Internet Explorer only; other browsers such as Firefox and Chrome do not allow the launch of executables locally on your PC.

 

The default security settings of Internet Explorer prohibit ActiveX activation and this needs to be changed first, otherwise the javascript engine will fail with the error message:

 

Automation server can’t create object

 

Change the Internet Explorer Security settings:

 

 

Your web site is now in the list of “trusted sites”. See the status bar at the bottom for verification, and program execution is permitted.

 

Mode 2: Stream from web server

This mode of operation requires the installation of a web server (not covered here). Streaming of the content happens via regular HTTP protocol, this will work out-of-the-box with any web server though it is not “true” streaming as compared to a dedicated web streamer application. The advantage here is that most browsers support this way of delivery (with the correct MIME settings).

 

The difference between mode [1] and mode [2] is made in the file “locale.xml”, see below.

 

 - Edit LOCALE.XML

 

Open the file “locale.xml” in notepad or another text editor and scroll to the PC player section. The settings look like this:

 

<player

  model="PC"

  application="c:\progra~1\window~2\wmplayer.exe"

  server="localhost"

  share="share-name"

  dvd="DVD,DVD5,DVD9"

  bluray="BD,BRD,BLU-RAY,BLURAY"

  scan="last"

 />

 

model

This setting identifies the type of player; leave this on ‘PC’

 

application

This setting identifies the location of the executable to start. It points to Windows Media Player, which is present in most Windows installations. You may change this to your own preferred player, but keep in mind that anyone viewing your website needs to have this executable too. Also path notations must follow the ‘old’ DOS style.

 

Note: any video and audio codec to view your files must be pre-installed on the target machine otherwise WMP (or your own player) won’t be able to play the content.

 

server

This setting identifies the location of your media files. If your videos are stored locally on the PC from which you are viewing your web page then keep the setting “localhost” otherwise change it to the IP address of the server which holds your collection.

 

share

This setting is used in several different ways:

<share name>   identifies the name of the share which contains your video collection. Check the setting on your NAS to find the name or in case you are using you own PC (localhost) then you need to make the folder which contains your collection shareable.

<local disk>        when you play files from your local machine (localhost) and you do not want to setup a share, then you can use an absolute path notation instead, e.g. “D:\Movies”

 

http:                    when the share name is set to ‘http:’ (note the colon at the end) it will invoke the http streaming mode. In this case the server address points to your web server.

 

dvd

This setting identifies the media types which refer to a DVD disk. The script reads the AMC field “Media Type” to find the corresponding types. If a match is found then the extension “/VIDEO_TS/VIDEO_IFO” is automatically appended to find and start a DVD folder.

 

Note: this mechanism only works when your movies are in separate folders and DVDs are stored in their original format. If this is not the case, e.g. you don’t use sub-folders “VIDEO-TS” or you use ISO files then set the DVD section to empty (“”), this will prevent automatic appending.

 

bluray

This setting identifies the media types which refer to a BLURAY disk. Similar as the DVD setting the script reads the AMC field “Media Type” to append automatically the extension “/BDMV/INDEX.BDMV” to find and start a bluray folder.

 

Note: this mechanism only works when your movies are in separate folders and blurays are stored in their original format. If this is not the case, e.g. you don’t use sub-folders “BDMV” or you use ISO files then set the bluray section to empty (“”), this will prevent automatic appending.

 

scan

This setting identifies which Media Type entry to take when more than one value exists. For example you have the movie in different formats: DVD and MKV. The script will select the last entry as the one to play. This setting can be changed to “first”.

 

 

- Make File References in AMC

 

The layout.xml files have a new statement to make a ‘play’ action possible.

 

<play src="'images/play-button.png'" width="28" height="28"

      url="movie.getAttribute('URL')"

      title="movie.getAttribute('FormattedTitle')"/>

 

In this example the URL field (but any other field is allowed too) in AMC is used to make a reference to the file location and this information is parsed by the script for playing. The reference includes the path and file name, excluding the share name.

 

Some examples will clarify the usage!

 

Example 1: your video files are on a NAS server

 

Usage: different family members in your home have access to your local web site and each of them is able to play a video on his or her PC.

 

Preparation: have a SMB server running with a share called “Movies”

 

locale.xml

  server=”192.168.1.254”

  share=”Movies”

 

URL field in AMC

a)  Armageddon/Armageddon.iso

b)  Sci-fi/1995/Apollo 13.mkv

c)  12 Angry Men

 

a) This will play the file: //192.168.1.254/Movies/Armageddon/Armageddon.iso

b) This will play the file: //192.168.1.254/Movies/Sci-fi/1995/Apollo 13.mkv

c) This will play the DVD folder: //192.168.1.254/Movies/12 Angry Men/video_ts/video.ifo

 

 

Example 2: your video files are available by a WEB server

 

Usage: different family members in your home have access to your local web site and each of them is able to play a video on his or her PC.

 

Preparation: have a web server running which has access to your video & audio collection

 

locale.xml

  server=”192.168.1.254”

  share=”http:”

 

URL field in AMC

a)  Movies/Armageddon/Armageddon.iso

b)  Movies/Sci-fi/1995/Apollo 13.mkv

c)  Movies/12 Angry Men

 

a) This will open the file: http://192.168.1.254/Movies/Armageddon/Armageddon.iso

b) This will open the file: http://192.168.1.254/Movies/Sci-fi/1995/Apollo 13.mkv

c) This will open the DVD folder: http://192.168.1.254/Movies/12 Angry Men/video_ts/video.ifo

 

 

Example 3: your video files are on your own computer (using shares)

 

Usage: you are the only viewer and maintain the web site for personal use.

 

Preparation: share the folder on your PC containing the video content as “MyMovies

 

locale.xml

  server=”localhost

  share=”MyMovies

  dvd=””  ç no automatic appending

 

URL field in AMC

a)  Armageddon/Armageddon.iso

b)  Sci-fi/1995/Apollo 13.mkv

c)  DVD/12 Angry Men/video.ifo

 

a) This will play the file: //127.0.0.1/MyMovies/Armageddon/Armageddon.iso

b) This will play the file: //127.0.0.1/MyMovies/Sci-fi/1995/Apollo 13.mkv

c) This will play the DVD folder: //127.0.0.1/MyMovies/DVD/12 Angry Men/video.ifo

 

 

Example 4: your video files are on your own computer (using absolute path)

 

Usage: you are the only viewer and maintain the web site for personal use.

 

Preparation: none

 

locale.xml

  server=”localhost

  share=”D:\Movies”

  dvd=””  ç no automatic appending

 

URL field in AMC

a)  Armageddon/Armageddon.iso

b)  Sci-fi/1995/Apollo 13.mkv

c)  DVD/12 Angry Men/video.ifo

 

a) This will play the file: D:\Movies\Armageddon\Armageddon.iso

b) This will play the file: D:\Movies\Sci-fi/1995\Apollo 13.mkv

c) This will play the DVD folder: D:\Movies\DVD\12 Angry Men\video.ifo

 

Note1: Usage of ‘spaces’ is allowed in the name and path

 

Note2: Forward and backward slashes are converted automatically to their appropriate usage.

 

Note3: Viewing your video content from the Internet is not supported due to security hazards.

 

 

How to play files on your Dune Media Player

 

People in the possession of a Dune Media Player are able to control its playback via the web interface. This feature requires the latest Dune firmware, which supports “IP Remote Control”.

 

 - Edit LOCALE.XML

 

Open the file “locale.xml” in notepad or another text editor and scroll to the Dune player section. The settings look like this:

 

<player

  model="Dune"

  dune="ip-address"

  server="none"

  protocol="local"

  share="drive-name"

  none="file"

  file="MKV,AVI"

  dvd="DVD,DVD5,DVD9"

  bluray="BD,BRD,BLU-RAY,BLURAY"

  scan="last"

 />

 

model

This setting identifies the type of player; leave it on ‘Dune’

 

dune

This setting identifies the location of your Dune media player. Enter here the IP address that is assigned to your Dune media player.

 

server

This setting identifies the location of your media files. If your videos are stored on a locally attached drive to the Dune, then keep the setting “none” otherwise change it to the IP address of the NAS server which holds your collection.

 

protocol

This setting identifies the protocol used to retrieve the media content. If your videos are stored on a locally attached drive to the Dune, then keep the setting “local” otherwise change it to either “smb” or “nfs” to communicate with your NAS server. In this case a correct server IP address must be supplied too (see previous entry).

 

share

This setting identifies the name of the share which contains your video collection. Check the setting on your NAS server to find the name or in case you are using an attached drive (local) it is the name of your local storage device. For the ‘nfs’ protocol it represents the “export-path”.

 

none

This setting identifies the default media type in case no value or a unknown value for the media type is specified.

 

file

This setting identifies the media types which refer to a single file. The script reads the AMC field “Media Type” to find the corresponding types. The script uses this entry to construct the correct command to be sent to the Dune media player.

 

dvd

This setting identifies the media types which refer to a DVD disk. The script reads the AMC field “Media Type” to find the corresponding types. The script uses this entry to construct the correct command to be sent to the Dune media player.

 

bluray

This setting identifies the media types which refer to a BLURAY disk. Similar as the DVD setting the script reads the AMC field “Media Type” to construct the correct command to be sent to the Dune media player.

 

scan

This setting identifies which Media Type entry to take when more than one value exists. For example you have the movie in different formats: DVD and MKV. The script will select the last entry as the one to play. This setting can be changed to “first”.

 

Note: it is important that the field “Media Type” in AMC is correctly filled in otherwise the script can not send the correct command to the Dune media player.

 

 

 - Make File References in AMC

 

The layout.xml files have a new statement to make a ‘play’ action possible.

 

<play src="'images/play-button.png'" width="28" height="28"

      url="movie.getAttribute('URL')"

      title="movie.getAttribute('FormattedTitle')"/>

 

In this example the URL field (but any other field is allowed too) is used to make a reference to the file location and this information is parsed by the script to the Dune media player for playing the content. The reference includes the path and file name, excluding the share name.

 

Some examples will clarify the usage!

 

Example 1: your video files are on a NAS server using SMB

 

Usage: you have a centralized storage which the Dune can access to play content

 

Preparation: have a NAS server running with a SMB share called “Movies”

 

locale.xml

  dune=”192.168.1.5”

  server=”192.168.1.254”

  protocol=”smb

  share=”Movies”

 

URL field in AMC

a)  Armageddon/Armageddon.iso

b)  Sci-fi/1995/Apollo 13.mkv

c)  12 Angry Men

 

a) This will play the file: //192.168.1.254/Movies/Armageddon/Armageddon.iso

b) This will play the file: //192.168.1.254/Movies/Sci-fi/1995/Apollo 13.mkv

c) This will play the DVD folder: //192.168.1.254/Movies/12 Angry Men

 

 

Example 2: your video files are on a NAS server using NFS

 

Usage: you have a centralized storage which the Dune can access to play content

 

Preparation: have a NAS server running with a NFS export path called “Video”

 

locale.xml

  dune=”192.168.1.5”

  server=”192.168.1.254”

  protocol=”nfs”

  share=”Video”

 

URL field in AMC

a)  Movies/Armageddon/Armageddon.iso

b)  Movies/Sci-fi/1995/Apollo 13.mkv

c)  Movies/12 Angry Men

 

a) This will play the file: //192.168.1.254:/Video:/Movies/Armageddon/Armageddon.iso

b) This will play the file: //192.168.1.254:/Video:/Movies/Sci-fi/1995/Apollo 13.mkv

c) This will play the DVD: //192.168.1.254:/Video:/Movies/12 Angry Men

 

 

Example 3: your video files are on an attached hard drive

 

Usage: you have your collection together with the Dune media player

 

Preparation: have the local storage called “MyHDD” (use dune_folder.txt)

 

locale.xml

  dune=”192.168.1.5”

  server=”none”

  protocol=”local”

  share=”MyHDD

 

URL field in AMC

a)  Armageddon/Armageddon.iso

b)  Sci-fi/1995/Apollo 13.mkv

c)  DVD/12 Angry Men

 

a) This will play the file: //storage_name:/MyHDD/Armageddon/Armageddon.iso

b) This will play the file: //storage_name:/MyHDD/Sci-fi/1995/Apollo 13.mkv

c) This will play the DVD folder: //storage_name:/MyHDD/DVD/12 Angry Men

 

Note1: usage of ‘spaces’ is allowed in the name and path

 

Note2: Controlling the Dune media player from the Internet is not supported due to security hazards.

 

 

Advanced XML Usage

 

There are several ways to define the playing of content in the XML layout files.

 

1.      Using the PLAY command

This is commonly used when the play action is associated with an image. In other words clicking on the image initiates the playing. See for an example layout1.xml

 

2.      Using the PLAY function

This is commonly used when the play action is associated with text. In other words clicking on some text initiates the playing. See for an example layout2.xml

 

3.      Using the “play:” directive

An alternative way to associate the play action with either an image or text is to prefix the URL entry in AMC with the directive “play:”. For example: play://12 Angry Men.mkv will initiate the playback of the file “12 Angry Men.mkv”.