Author Topic: Dlink DSM-510 accessing files from Core via UPnP  (Read 727 times)


  • Veteran
  • ***
  • Posts: 122
    • View Profile
Dlink DSM-510 accessing files from Core via UPnP
« on: December 31, 2010, 12:40:53 am »
its been a long time since I have this device named Dlink DSM-510. It is a little network media player with hdmi and optical audio output. This device is very picky about the media formats it can play. for example, it only plays, avi, xvid, mpeg2 and 3 etc. I think I can share my story to help some one at the same time I do have few questions if some one can help.

Basically Like I said, you need to have some .avi video file in your core. when you connect this device with core from internal network it will see basically two upnp servers .

1. ) Mediatomb
2.) dcerouter mythtv AV media server

good news is, under mythtv media server, if you have recored shows there from myth. the player plays them out of the box. mythtv records the show in .mpg file and I believe this player does play mpeg format. So nothing much to do. Unfortunately we have our own movies or other video files under lmce directory and those might be .avi files.  The player sees those files under mediatomb server but they are grayed out and they might not play saying unsupported.

This is what I have done to get a little success.

we need to edit config.xml file located at /etc/mediatomb/config.xml with your favorite editor.

here is my config.xml look like..

<?xml version="1.0" encoding="UTF-8"?>
<config version="1" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
    <ui enabled="yes">
      <accounts enabled="no" session-timeout="30">
        <account user="mediatomb" password="mediatomb"/>
      <sqlite3 enabled="yes">
      <mysql enabled="no">
    <protocolInfo extend="yes"/><!-- For PS3 support change to "yes" -->
       Uncomment the lines below to get rid of jerky avi playback on the
       DSM320 or to enable subtitles support on the DSM units
      <add header="X-User-Agent: redsonic"/>

    <!-- Uncomment the line below if you have a Telegent TG100 -->
  <import hidden-files="no">
    <scripting script-charset="UTF-8">
      <virtual-layout type="builtin">
      <extension-mimetype ignore-unknown="no">
        <map from="mp3" to="audio/mpeg"/>
        <map from="ogg" to="application/ogg"/>
        <map from="asf" to="video/x-ms-asf"/>
        <map from="asx" to="video/x-ms-asf"/>
        <map from="wma" to="audio/x-ms-wma"/>
        <map from="wax" to="audio/x-ms-wax"/>
        <map from="wmv" to="video/x-ms-wmv"/>
        <map from="wvx" to="video/x-ms-wvx"/>
        <map from="wm" to="video/x-ms-wm"/>
        <map from="wmx" to="video/x-ms-wmx"/>
        <map from="m3u" to="audio/x-mpegurl"/>
        <map from="pls" to="audio/x-scpls"/>
        <map from="flv" to="video/x-flv"/>
        <!-- Uncomment the line below for PS3 divx support -->
        <!-- <map from="avi" to="video/divx"/> -->
        <!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
        <map from="avi" to="video/avi"/>
        <map from="mpg" to="video/avi"/>

        <map from="audio/*" to="object.item.audioItem.musicTrack"/>
        <map from="video/*" to="object.item.videoItem"/>
        <map from="image/*" to="object.item.imageItem"/>
        <treat mimetype="audio/mpeg" as="mp3"/>
        <treat mimetype="application/ogg" as="ogg"/>
        <treat mimetype="audio/x-flac" as="flac"/>
        <treat mimetype="image/jpeg" as="jpg"/>
        <treat mimetype="audio/x-mpegurl" as="playlist"/>
        <treat mimetype="audio/x-scpls" as="playlist"/>
        <treat mimetype="audio/x-wav" as="pcm"/>
        <treat mimetype="video/x-msvideo" as="avi"/>
        <treat mimetype="video/mp4v" as="video/avi"/>
  <transcoding enabled="no">
      <transcode mimetype="video/x-flv" using="vlcmpeg"/>
      <transcode mimetype="application/ogg" using="vlcmpeg"/>
      <transcode mimetype="application/ogg" using="oggflac2raw"/>
      <transcode mimetype="audio/x-flac" using="oggflac2raw"/>
      <profile name="oggflac2raw" enabled="no" type="external">
        <agent command="ogg123" arguments="-d raw -f %out %in"/>
        <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
      <profile name="vlcmpeg" enabled="no" type="external">
        <agent command="vlc" arguments="-I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>
        <buffer size="14400000" chunk-size="512000" fill-size="120000"/>


The line appears in red are added by me in order to make this dlink see the .avi files and play them.

after you edit the file you need to restart the mediatomb server, I dont know how to do it so I reboot the entire system.
Note : those who keep their media on separate drive other than system drive. they need to map the drive for mediatomb database. you can add your public/data folder with + icon(see the picture attached, where the cursor is) from media tomb server user interphase.

found under...  webamin ---> Advanced ----> configuration ------> upnp server.

once you add the the folder it will appear on mediatomb's server.
Also,, Mediatomb does not auto scan any changes from the directory. hence if you add or remote any files it will not do therefore set the scan criteria by clicking the + with circle right next and set the seconds and basic scan. it will do the job. full scan might take longer. I dont know.

Thats all and you will see your public folder on your mediatomb server and it will play .avi files on DSM-510. Audio plays right out of the box. so,, nice little device to act as music spot.  I am talking over wireless connection.

Some of my movie files with .avi format streams flawless. and recorded show from mythtv from its AV media server plays flawlessly.

Thats all to say for now. I will my questions in the next post.


  • Veteran
  • ***
  • Posts: 122
    • View Profile
Re: Dlink DSM-510 accessing files from Core via UPnP
« Reply #1 on: December 31, 2010, 12:45:53 am »
here is my question without any delay,,

I have my recorded shows stored under /home/public/data/pvr/dce#38/

Those show files are .mpg formate and My device plays them just fine from Mythtv AV media server,

However, the same file If I access from mediatomb server, It does not play it ! saying unsupported format.

It has something to do with editing config.xml but I just don't seem to find an answer.

Anyone ??
« Last Edit: December 31, 2010, 12:51:17 am by theteju »