「Gerbera」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(英語版より転載)
 
(→‎Usage: 翻訳)
 
(同じ利用者による、間の6版が非表示)
1行目: 1行目:
[[Category:Media servers]]
+
[[Category:メディアサーバー]]
[[ja:MediaTomb]]
+
[[en:Gerbera]]
 
{{Related articles start}}
 
{{Related articles start}}
{{Related|Streaming media}}
+
{{Related|ストリーミングメディア}}
 
{{Related articles end}}
 
{{Related articles end}}
   
  +
[https://gerbera.io/ Gerbera] は、Web インターフェイスを備えたオープン ソースの UPnP メディア サーバーです。ホーム ネットワークを介してデジタル メディアをストリーミングし、さまざまな UPnP 対応デバイスで視聴することができます。これは、現在は廃止された MediaTomb のフォークです。
[https://gerbera.io/ Gerbera] is an open source UPnP media server with a web 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. It is a fork of the now-defunct MediaTomb.
 
   
== Installation ==
+
== インストール ==
   
  +
{{AUR|gerbera}} パッケージをインストールしてください。
[[Install]] the {{AUR|gerbera}} package.
 
   
  +
デフォルトでは、Gerbera は独自の sqlite データベースをセットアップします。
By default, Gerbera sets up its own sqlite database. Alternatively, to use it with an external [[MariaDB]] server, uncomment the line containing {{ic|WITH_MYSQL}} prior to building and see [https://docs.gerbera.io/en/stable/run.html#using-mysql-database the official documentation] for more information.
 
  +
デフォルトでは、Gerbera は自身の sqlite データベースをセットアップします。また、外部のMariaDB サーバーで使用する場合は、ビルド前に {{ic|WITH_MYSQL}} を含む行のコメントを解除します。詳細は[https://docs.gerbera.io/en/stable/run.html#using-mysql-database 公式ドキュメント]を参照してください。
   
== Configuration ==
+
== 設定 ==
   
  +
Gerbera はユーザー毎またはシステム全体のデーモンとして設定および実行することができます。
Gerbera may be configured and run per-user or as a system-wide daemon.
 
   
=== Per-user ===
+
=== ユーザー毎 ===
   
  +
現在のユーザーの設定ファイルを作成するには:
To create the configuration file for the current user:
 
   
 
$ mkdir -p ~/.config/gerbera
 
$ mkdir -p ~/.config/gerbera
 
$ gerbera --create-config > ~/.config/gerbera/config.xml
 
$ gerbera --create-config > ~/.config/gerbera/config.xml
   
Then run ''gerbera'' to start the it.
+
次に、''gerbera'' を実行して開始します。
   
=== System-wide ===
+
=== システム全体 ===
   
 
# gerbera --create-config > /etc/gerbera/config.xml
 
# gerbera --create-config > /etc/gerbera/config.xml
 
# chown -R gerbera:gerbera /etc/gerbera
 
# chown -R gerbera:gerbera /etc/gerbera
   
Then [[start/enable]] {{ic|gerbera.service}} to start the daemon.
+
次に、{{ic|gerbera.service}} [[起動]]・[[有効化]] してデーモンを起動します。
   
== Usage ==
+
== 使用方法 ==
   
  +
デフォルトでは、デーモンは {{ic|50500}} 番ポートをリッスンします。 Web インターフェイスにアクセスしてメディアのインポートを開始するには、お気に入りのブラウザーで http://localhost:50500/ に移動します。
The daemon listens on port {{ic|50500}} by default. To access the web interface and begin importing media, navigate to http://localhost:50500/ in your favorite browser.
 
   
  +
ユーザーごとのインスタンスを実行している場合、デフォルトのポートは {{ic|49152}} です。ただし、サーバーの再起動時にポートが変更される可能性があります。起動時に Web インターフェースの URL が出力されます。ユーザーはポートを手動で指定することもできます。
If running a per-user instance, the default port is {{ic|49152}}. However, it is possible that the port will change upon server restart. The URL for the web interface is output during startup. Users may also specify the port manually:
 
   
 
$ gerbera -p 50500
 
$ gerbera -p 50500

2022年9月19日 (月) 19:57時点における最新版

関連記事

Gerbera は、Web インターフェイスを備えたオープン ソースの UPnP メディア サーバーです。ホーム ネットワークを介してデジタル メディアをストリーミングし、さまざまな UPnP 対応デバイスで視聴することができます。これは、現在は廃止された MediaTomb のフォークです。

インストール

gerberaAUR パッケージをインストールしてください。

デフォルトでは、Gerbera は独自の sqlite データベースをセットアップします。 デフォルトでは、Gerbera は自身の sqlite データベースをセットアップします。また、外部のMariaDB サーバーで使用する場合は、ビルド前に WITH_MYSQL を含む行のコメントを解除します。詳細は公式ドキュメントを参照してください。

設定

Gerbera はユーザー毎またはシステム全体のデーモンとして設定および実行することができます。

ユーザー毎

現在のユーザーの設定ファイルを作成するには:

$ mkdir -p ~/.config/gerbera
$ gerbera --create-config > ~/.config/gerbera/config.xml

次に、gerbera を実行して開始します。

システム全体

# gerbera --create-config > /etc/gerbera/config.xml
# chown -R gerbera:gerbera /etc/gerbera

次に、gerbera.service起動有効化 してデーモンを起動します。

使用方法

デフォルトでは、デーモンは 50500 番ポートをリッスンします。 Web インターフェイスにアクセスしてメディアのインポートを開始するには、お気に入りのブラウザーで http://localhost:50500/ に移動します。

ユーザーごとのインスタンスを実行している場合、デフォルトのポートは 49152 です。ただし、サーバーの再起動時にポートが変更される可能性があります。起動時に Web インターフェースの URL が出力されます。ユーザーはポートを手動で指定することもできます。

$ gerbera -p 50500

Hiding full paths from media players

この記事またはセクションは情報が古くなっています。
理由: This was written for MediaTomb. Does it still work for Gerbera? (Discuss)

By default, full directory paths will be shown on devices when they are browsing through folders.

For example, if you add the directory /media/my_media/video_data/videos/movies, anyone connecting will have to navigate to the 'movies' directory from the root.

To hide all of that and only show the directory added, you can change the import script.

For example, this script will automatically truncate the whole directory structure specified in the variable video_root. Any directories added directly under the video root path will show up on UPnP devices starting from the that folder rather than /.

function addVideo(obj)
{
   var video_root = "/media/main_core/Server_Core_Folder/FTP_Services/Media/";

   var absolute_path = obj.location;

   var relative_path = absolute_path;

   if(absolute_path.indexOf(video_root) == 0)
      relative_path = absolute_path.replace(video_root, "")

  var chain = new Array();

  var pathSplit = relative_path.split("/");

  for(var i = 0; i < pathSplit.length - 1; i++) 
      chain.push(pathSplit[i]);

  addCdsObject(obj, createContainerChain(chain));
}

To also hide the default PC Directory folder from UPnP device directory listings, add the following directly under the server node of your config.xml file.

<pc-directory upnp-hide="yes"/>

Playstation 3 Support

この記事またはセクションは情報が古くなっています。
理由: This was written for MediaTomb. Does it still work for Gerbera? (Discuss)

The following notes assume MediaTomb is running as a system-wide daemon. For a per-user install, the locations of the configuration file will be different (see above).

For PlayStation 3 support, users must set <protocolInfo extend="yes"/>. An "avi" mimetype mapping should also be uncommented for DivX support.

/var/lib/mediatomb/.mediatomb/config.xml
...

<protocolInfo extend="yes"/>

...

<map from="avi" to="video/divx"/>

...

When importing media to the database, MediaTomb will create a virtual container layout as defined by the <virtual-layout type="..."> option. That is, media will be organized according to metadata (album, artist, etc.) through creation of virtual database objects. If your media is already organized on the file system, you may disable this feature to significantly improve import performance:

/var/lib/mediatomb/.mediatomb/config.xml
...

<virtual-layout type="disabled"/>

...

Users may customize the import script to fine-tune the virtual layout. The Scripting section of the MediaTomb wiki provides several examples. Starting with the built-in script available at /usr/share/mediatomb/js/import.js:

$ cp /usr/share/mediatomb/js/import.js /var/lib/mediatomb/.mediatomb/

... and edit /var/lib/mediatomb/.mediatomb/import.js as desired. To utilize the customized script, users must set <virtual-layout type="js"> and specify the script's location.

/var/lib/mediatomb/.mediatomb/config.xml
...

<virtual-layout type="js">
  <import-script>/var/lib/mediatomb/.mediatomb/import.js</import-script>
</virtual-layout>

...

You may have to specify a network interface before MediaTomb will be recognized:

/var/lib/mediatomb/.mediatomb/config.xml
<server>
...
  <interface>network interface</interface>
...
</server>

After configuring MediaTomb to your liking, restart mediatomb.service.

Troubleshooting

Gerbera doesn't provide content even though it is added in the webfrontend

Be aware of the fact that the user Gerbera runs under, has to have read rights on the files that are added to be able to provide them.

So if Gerbera runs under the user 'gerbera' the (video-)files either have to be owned by the user 'gerbera' and need to be readable or the files and the user 'gerbera' have to belong to the same group with the file being readable ('gerbera' has to be in the group to which the file belongs (the file then needs the read rights for the group to be set)).

The Client loses connection after 30 Minutes

Apparently this is related to SSNP message only being sent once which results in the Client dropping its connection in 30 minutes since it thinks the server is gone.

In the config.xml add the alive tag:

<alive>180</alive>

Default is 180. See https://docs.gerbera.io/en/stable/config-server.html#alive.