Difference between revisions of "Mediatomb"

From Amahi Wiki
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 18: Line 18:
  
 
====Custom import scripts====
 
====Custom import scripts====
Mediatomb has the possibility to display your imported media files with a customized directory view. Some examples and descriptions of how to make your own scripts can be found [http://mediatomb.cc/dokuwiki/scripting:scripting HERE]
+
Mediatomb has the possibility to display your imported media files with a customized directory view. Some examples and descriptions of how to make your own scripts can be found at the [http://mediatomb.cc/dokuwiki/scripting:scripting Mediatomb wiki]site.
  
 
To use the custom script you'll need to do the following:
 
To use the custom script you'll need to do the following:
Line 27: Line 27:
 
* On line 60 of <small>/etc/mediatomb/config.xml</small> change  
 
* On line 60 of <small>/etc/mediatomb/config.xml</small> change  
  
{{Code|lang=XML|
+
<virtual-layout type="builtin">
Code= <virtual-layout type="builtin">
+
<import-script>/usr/share/mediatomb/js/import.js</import-script>}}
<import-script>/usr/share/mediatomb/js/import.js</import-script>}}
 
  
 
into
 
into
  
{{Code|lang=XML|
+
<virtual-layout type="js">
Code= <virtual-layout type="js">
+
<import-script>/usr/share/mediatomb/js/<yourscriptname>.js</import-script>}}
<import-script>/usr/share/mediatomb/js/<yourscriptname>.js</import-script>}}
 
  
 
* restart mediatomb: <small>service mediatomb restart</small>
 
* restart mediatomb: <small>service mediatomb restart</small>
Line 49: Line 47:
 
* Add the following after line 28 of <small>/etc/mediatomb/config.xml</small>  
 
* Add the following after line 28 of <small>/etc/mediatomb/config.xml</small>  
  
{{Code|lang=XML|
+
<custom-http-headers>
Code= <custom-http-headers>
+
<add header="transferMode.dlna.org: Streaming"/>
<add header="transferMode.dlna.org: Streaming"/>
+
<add header="contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=017000 00000000000000000000000000"/>
<add header="contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=017000 00000000000000000000000000"/>
+
</custom-http-headers>}}
</custom-http-headers>}}
 
  
 
* Change line 91 of <small>/etc/mediatomb/config.xml</small> into
 
* Change line 91 of <small>/etc/mediatomb/config.xml</small> into
  
{{Code|lang=XML|
+
<map from="avi" to="video/x-divx"/>}}
Code= <map from="avi" to="video/x-divx"/>}}
 
  
 
* Save the config.xml and restart MediaTomb  
 
* Save the config.xml and restart MediaTomb  
Line 65: Line 61:
 
* Remove and re-add all you avi files
 
* Remove and re-add all you avi files
  
=== Troubleshooting: ===
+
=== Troubleshooting ===
 
* Transcoding of MKV-files isn't working.
 
* Transcoding of MKV-files isn't working.
 
+
** Check the logfile of the transcoding process (<small>/var/log/mediatomb-transcode.log</small>) and look for errors.  
Check the logfile of the transcoding process (<small>/var/log/mediatomb-transcode.log</small>) and look for errors.  
+
** If you can't figure out what's wrong, fpaste the last 100 lines of the logfile (using <small>tail 100 /var/log/mediatomb-transcode.log | fpaste</small>) and paste the returned URL in the forums or on the IRC-channel.
If you can't figure out what's wrong, fpaste the last 100 lines of the logfile (using <small>tail 100 /var/log/mediatomb-transcode.log | fpaste</small>) and paste the returned URL in the forums or on the IRC-channel.
 

Latest revision as of 03:44, 23 June 2020

MediaTomb is an UPnP MediaServer with an easy web user interface. It allows you to stream your digital media through your home network and listen to/watch it on a variety of UPnP compatible devices.


Configuration Options:

Directory scanning

By default, there are no directory's scanned. To automatically scan a directory:

  • click on "Filesystem"
  • navigate to the directory you want to scan
  • click on the Add as autoscan.png
  • select "Timed" and "Recursive"
  • set the time between scans to your liking
  • click on "Set" when done

The media in the share will now be automatically added to the database and will be available on your UPnP-ready device.

Custom import scripts

Mediatomb has the possibility to display your imported media files with a customized directory view. Some examples and descriptions of how to make your own scripts can be found at the Mediatomb wikisite.

To use the custom script you'll need to do the following:

As root-user:

  • Create a custom .js script in /usr/share/mediatomb/js/
  • On line 60 of /etc/mediatomb/config.xml change
<virtual-layout type="builtin">
<import-script>/usr/share/mediatomb/js/import.js</import-script>}}

into

<virtual-layout type="js">
<import-script>/usr/share/mediatomb/js/<yourscriptname>.js</import-script>}}
  • restart mediatomb: service mediatomb restart

Samsung configuration

The default configuration of MediaTomb is optimized for use with a PS3. However, it is also possible to use MediaTomb to stream avi files to Samsung TV's.

Note This might cause PS3-support to fail.

To enable MediaTomb to stream avi files to your Samsung TV, do the following:

As root-user:

  • Add the following after line 28 of /etc/mediatomb/config.xml
<custom-http-headers>
<add header="transferMode.dlna.org: Streaming"/>
<add header="contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=017000  00000000000000000000000000"/>
</custom-http-headers>}}
  • Change line 91 of /etc/mediatomb/config.xml into
<map from="avi" to="video/x-divx"/>}}
  • Save the config.xml and restart MediaTomb
 service mediatomb restart
  • Remove and re-add all you avi files

Troubleshooting

  • Transcoding of MKV-files isn't working.
    • Check the logfile of the transcoding process (/var/log/mediatomb-transcode.log) and look for errors.
    • If you can't figure out what's wrong, fpaste the last 100 lines of the logfile (using tail 100 /var/log/mediatomb-transcode.log | fpaste) and paste the returned URL in the forums or on the IRC-channel.