Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [DE] Gerbera Problem  (Read 3577 times)

Offline harley-peter

  • User
  • Posts: 1.023
[DE] Gerbera Problem
« on: 2018/03/05, 16:22:03 »
Hallo,

ich habe mir mal den Mediaserver Gerbera installiert um meine Musikdatei zu streamen aber leider funktioniert das nicht so recht und ich habe im Moment keinen Plan. Vielleicht kann mir ja jemand helfen.
Wenn ich Gerbera auf der Konsole aufrufe bekomme ich folgende Meldungen:
Code: [Select]
2018-03-05 16:10:57    INFO: Gerbera UPnP Server version 1.1.0 - http://gerbera.io/
2018-03-05 16:10:57    INFO: ===============================================================================
2018-03-05 16:10:57    INFO: Gerbera is free software, covered by the GNU General Public License version 2
2018-03-05 16:10:57    INFO: Copyright 2016-2017 Gerbera Contributors.
2018-03-05 16:10:57    INFO: Gerbera is based on MediaTomb: Copyright 2005-2010 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer.
2018-03-05 16:10:57    INFO: ===============================================================================
2018-03-05 16:10:57    INFO: Loading configuration from: /root/.config/gerbera/config.xml
2018-03-05 16:10:57    INFO: Checking configuration...
2018-03-05 16:10:57    INFO: Setting filesystem import charset to UTF-8
2018-03-05 16:10:57    INFO: Setting metadata import charset to UTF-8
2018-03-05 16:10:57    INFO: Setting playlist charset to UTF-8
2018-03-05 16:10:57 WARNING: You enabled the YouTube feature, which allows you
                             to watch YouTube videos on your UPnP device!
                             Please check http://www.youtube.com/t/terms
                             By using this feature you may be violating YouTube
                             service terms and conditions!

2018-03-05 16:10:57    INFO: Configuration check succeeded.
Exception raised in [src/server.cc:123] upnp_init(): upnp_init: UpnpInit failed
2018-03-05 16:10:57   ERROR: main: upnp error -203
2018-03-05 16:10:57   ERROR: Could not bind to socket.
2018-03-05 16:10:57    INFO: Please check if another instance of Gerbera or
2018-03-05 16:10:57    INFO: another application is running on port 0.
2018-03-05 16:10:57   ERROR: upnp_cleanup: UpnpUnRegisterRootDevice failed
Exception raised in [src/server.cc:248] shutdown(): upnp_cleanup: UpnpUnRegisterRootDevice failed

Dabei ist es egal ob ich das als User mache oder als root.
Das Web Interface sagt mir "Gerbera's UI is disabled. If you did not expect this, please check your configuration." Aber lt. config.xml ist es eingeschaltet. Hier die config:
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<config version="2" xmlns="http://mediatomb.cc/config/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/2 http://mediatomb.cc/config/2.xsd">
  <!--
     See http://gerbera.io or read the docs for more
     information on creating and using config.xml configuration files.
    -->
  <server>
    <ui enabled="yes" show-tooltips="yes">
      <accounts enabled="no" session-timeout="30">
        <account user="gerbera" password="gerbera"/>
      </accounts>
    </ui>
    <name>gerbera</name>
    <udn>uuid:541c9cb1-c47d-4bdd-a584-82d6c20e1a31</udn>
    <home>/root/.config/gerbera</home>
    <webroot>/usr/share/gerbera/web</webroot>
    <!--
        How frequently (in seconds) to send ssdp:alive advertisements.
        Minimum alive value accepted is: 62

        The advertisement will be sent every (A/2)-30 seconds,
        and will have a cache-control max-age of A where A is
        the value configured here. Ex: A value of 62 will result
        in an SSDP advertisement being sent every second.
    -->
    <alive>1800</alive>
    <storage>
      <sqlite3 enabled="yes">
        <database-file>gerbera.db</database-file>
      </sqlite3>
      <mysql enabled="no">
        <host>localhost</host>
        <username>gerbera</username>
        <database>gerbera</database>
      </mysql>
    </storage>
    <protocolInfo extend="no"/><!-- 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
    -->
    <!--
    <custom-http-headers>
      <add header="X-User-Agent: redsonic"/>
    </custom-http-headers>

    <manufacturerURL>redsonic.com</manufacturerURL>
    <modelNumber>105</modelNumber>
    -->
    <!-- Uncomment the line below if you have a Telegent TG100 -->
    <!--
       <upnp-string-limit>101</upnp-string-limit>
    -->
    <extended-runtime-options>
      <ffmpegthumbnailer enabled="no">
        <thumbnail-size>128</thumbnail-size>
        <seek-percentage>5</seek-percentage>
        <filmstrip-overlay>yes</filmstrip-overlay>
        <workaround-bugs>no</workaround-bugs>
        <image-quality>8</image-quality>
      </ffmpegthumbnailer>
      <mark-played-items enabled="no" suppress-cds-updates="yes">
        <string mode="prepend">*</string>
        <mark>
          <content>video</content>
        </mark>
      </mark-played-items>
    </extended-runtime-options>
  </server>
  <import hidden-files="no">
    <scripting script-charset="UTF-8">
      <common-script>/usr/share/gerbera/js/common.js</common-script>
      <playlist-script>/usr/share/gerbera/js/playlists.js</playlist-script>
      <virtual-layout type="builtin">
        <import-script>/usr/share/gerbera/js/import.js</import-script>
      </virtual-layout>
    </scripting>
    <mappings>
      <extension-mimetype ignore-unknown="no">
        <map from="mp3" to="audio/mpeg"/>
        <map from="ogx" to="application/ogg"/>
        <map from="ogv" to="video/ogg"/>
        <map from="oga" to="audio/ogg"/>
        <map from="ogg" to="audio/ogg"/>
        <map from="ogm" to="video/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"/>
        <map from="mkv" to="video/x-matroska"/>
        <map from="mka" to="audio/x-matroska"/>
        <!-- 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"/> -->
      </extension-mimetype>
      <mimetype-upnpclass>
        <map from="audio/*" to="object.item.audioItem.musicTrack"/>
        <map from="video/*" to="object.item.videoItem"/>
        <map from="image/*" to="object.item.imageItem"/>
        <map from="application/ogg" to="object.item.audioItem.musicTrack"/>
      </mimetype-upnpclass>
      <mimetype-contenttype>
        <treat mimetype="audio/mpeg" as="mp3"/>
        <treat mimetype="application/ogg" as="ogg"/>
        <treat mimetype="audio/ogg" as="ogg"/>
        <treat mimetype="audio/x-flac" as="flac"/>
        <treat mimetype="audio/x-ms-wma" as="wma"/>
        <treat mimetype="audio/x-wavpack" as="wv"/>
        <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="audio/L16" as="pcm"/>
        <treat mimetype="video/x-msvideo" as="avi"/>
        <treat mimetype="video/mp4" as="mp4"/>
        <treat mimetype="audio/mp4" as="mp4"/>
        <treat mimetype="video/x-matroska" as="mkv"/>
        <treat mimetype="audio/x-matroska" as="mka"/>
      </mimetype-contenttype>
    </mappings>
    <online-content>
      <YouTube enabled="no" refresh="28800" update-at-start="no" purge-after="604800" racy-content="exclude" format="mp4" hd="no">
        <favorites user="gerbera"/>
        <standardfeed feed="most_viewed" time-range="today"/>
        <playlists user="gerbera"/>
        <uploads user="gerbera"/>
        <standardfeed feed="recently_featured" time-range="today"/>
      </YouTube>
    </online-content>
  </import>
  <transcoding enabled="no">
    <mimetype-profile-mappings>
      <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"/>
    </mimetype-profile-mappings>
    <profiles>
      <profile name="oggflac2raw" enabled="no" type="external">
        <mimetype>audio/L16</mimetype>
        <accept-url>no</accept-url>
        <first-resource>yes</first-resource>
        <accept-ogg-theora>no</accept-ogg-theora>
        <agent command="ogg123" arguments="-d raw -o byteorder:big -f %out %in"/>
        <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
      </profile>
      <profile name="vlcmpeg" enabled="no" type="external">
        <mimetype>video/mpeg</mimetype>
        <accept-url>yes</accept-url>
        <first-resource>yes</first-resource>
        <accept-ogg-theora>yes</accept-ogg-theora>
        <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"/>
      </profile>
    </profiles>
  </transcoding>
</config>


Edit:
Habe gerade gesehen dass es unter /etc/gerbera auch nochmal eine config.xml gibt wo das UI ausgeschaltet war. Nach dem Einschalten habe ich zwar ein Webinterface aber keine Berechtigung auf mein eigenes Verzeichnis zuzugreifen. Hat jemand eine Idee wo man das einstellen kann?
« Last Edit: 2018/03/05, 16:34:21 by harley-peter »

Offline bluelupo

  • User
  • Posts: 2.068
    • BluelupoMe
Re: Gerbera Problem
« Reply #1 on: 2018/03/05, 17:30:43 »
Hi Peter,

das der Mediaserver keinen Zugriff auf dein $HOME ist so auch richtig, denn der hat hat einen eigenen User (gerbera) laufen und ich denke nicht das du auf dein $HOME alle User lesen bzw. schreiben lässt ;-)

Du solltest die zu streamenden Daten in "neutrales" Verzeichnis legen in das der Mediaserver Zugriff hat.

Beispiel für den Zugriff:

/mnt/share/streaming drwxr-xr-x (755) gerbera users

Offline harley-peter

  • User
  • Posts: 1.023
Re: Gerbera Problem
« Reply #2 on: 2018/03/05, 20:16:47 »
Hi Michael,

du hast natürlich Recht. Manchmal wäre es ganz hilfreich vor irgendwelchen Aktionen das Gehirn einzuschalten.  :)