+3 votes
1.4k views
How to install UPnP Gerbera multimedia server on Linux

in Linux / Unix by (552k points)
reopened | 1.4k views

1 Answer

+4 votes
Best answer

1. How to install Gerbera on Linux
2. How to manage Gerbera services on Linux
3. How to access Gerbera on Linux
4. How to stream multimedia files using Gerbera on the home network

Currently the use of multimedia elements is taking a great boom and it is ideal to have the necessary tools to share these between various devices in a secure and fully functional way. One of the applications developed for this purpose in Linux environments is Gerbera which is a UPnP media server through which it will be possible to transmit our digital media through the home network and play them on a wide range of UPnP compatible devices. Gerbera is based on MediaTomb and is designed as an open source UPnP MediaServer (GPL)..

Gerbera implements the UPnP MediaServer V 1.0 specification which is found on the website.

UPnP MediaServer
features
Among its characteristics we find:
  • Allows you to navigate and play media through UPnP
  • Extracting metadata from mp3, ogg, flac, jpeg, etc files
  • Supports Exif thumbnail
  • Create automatic reexplorations of directories (timed, inotify)
  • Web user interface with a tree view of the database and the file system, with which we can add, delete, edit or explore the media
  • Highly flexible media format transcoding through add-ons and scripts
  • User-defined server design which is based on extracted metadata (virtual containers with script)
  • Supports the last FM scrobbing using lastfmlib
  • Support for ContentDirectoryService container updates
  • Generation of real-time video thumbnails with libffmpegthumbnailer
  • Support for external URLs
  • Flexible configuration with which it is possible to control the behavior of several server features
  • Available for Linux, FreeBSD, NetBSD, macOS and eCS
  • It can be executed in x86, Alpha, ARM, MIPS, Sparc, PowerPC

Now let's see how to install Gerbera on Linux in a practical way..


1. How to install Gerbera on Linux

Step 1

In the case of Ubuntu distributions, there is a PPA created and maintained by Stephen Czetty, from which it will be possible to install Gerbera by running the following commands:
 sudo add-apt-repository ppa: stephenczetty / gerbera 

image

Step 2

Then we will update the PPA using:
 sudo apt update 

image

Step 3

Finally, we install Gerbera using the following command:
 sudo apt install gerbera 

image

Step 4

There we enter the letter S to confirm the download and installation of Gerbera. In the Debian distributions, Gerbera is available in the test repositories and they are unstable, for this we must enable the PPA by adding the following lines
 to the file /etc/apt/sources.list: sudo nano /etc/apt/sources.list 
There we add the following:
 # Testing repository - main, contrib and non-free branches deb http://http.us.debian.org/debian testing main non-free contrib deb-src http://http.us.debian.org/debian testing main non-free contrib # Testing security updates repository deb http://security.debian.org/ testing / updates main contrib non-free deb-src http://security.debian.org/ testing / updates main contrib non-free # Unstable repo main, contrib and non-free branches, no security updates here deb http://http.us.debian.org/debian unstable main non-free contrib deb-src http://http.us.debian.org/debian unstable main non-free contrib 
Once this is done we will execute the following:
 apt update (system update) apt install gerbera (Gerbera Installation) 

2. How to manage Gerbera services on Linux

Step 1

Once Gerbera is installed we will execute the following lines:
 sudo systemctl start gerbera.service (Service Start) sudo systemctl enable gerbera.service (Enabling the Gerbera service on Linux boot) sudo systemctl status gerbera.service (Service Status) 

image

Step 2

In case the start of the Gerbera service presents errors, we will verify that the / var / log / gerbera directory is created:
 cd / var / log / gerbera 
If it does not exist, we will execute the following:
 sudo touch / var / log / gerbera sudo chown -Rv root: gerbera / var / log / gerbera sudo chmod -Rv 0660 / var / log / gerbera 

image

Step 3

The next step is to define a network interface that is currently in use which will act as the value of the MT_INTERFACE environment variable, the default value is "eth0", but in case of using a wireless connection, we must configure it as "wlp1s0". In Debian / Ubuntu, these options can be set in the file
 / etc / default / gerbera: sudo nano / etc / default / gerbera 

image

There we enter the correct interface and save the changes using the Ctrl + O keys and exit the editor using Ctrl + X.


3. How to access Gerbera on Linux

Step 1

Gerbera uses port 49152 for listening, so we will go to a browser and execute the following syntax:
 http: // IP-address: 49152 
When executing this we will see the following:

image

Step 2

In case of receiving this error, we must enable the graphical interface and for this we execute the following:
 sudo nano /etc/gerbera/config.xml 
Step 3

There we change the value of the line enabled = "no" to enabled = "yes". We save the changes and leave the editor.

image

Step 4

Now we must restart the service to apply the changes:
 sudo systemctl restart gerbera.service 

image

Step 5

Now, if we access again we will see the following: image
Step 6

There we find two sections that are:
Databases
Databases, which shows the files that can be accessed publicly.

Filesystem
Filesystem, this option allows us to search for files in the system and select them for transmission. To add a file, we just have to click on the plus sign (+)
image

4. How to stream multimedia files using Gerbera on the home network


Now it is possible to stream multimedia files over the network from the Gerbera server. For its validation, we can use some other device as a client, in this case an Android mobile, there we will install a compatible upnp application, we have selected BubbleUpnp which can be downloaded in the following link:
BubbleUpnp
Step 1

Once the BubbleUpnp application is installed, we will execute it and in the Library section click on Local and Cloud:

image

Step 2

By clicking there we can see the available servers where Gerbera is located:

image

Step 3

By clicking on Gerbera we can access the various libraries:

image

Now, from there it will be possible to start streaming multimedia content..

We have seen how Gerbera is a useful tool for the whole multimedia transmission issue in a home environment.


by (3.5m points)
edited

Related questions

+5 votes
1 answer
+5 votes
1 answer
asked Nov 19, 2019 in Linux / Unix by backtothefuture (552k points) | 272 views
+5 votes
1 answer
+5 votes
1 answer
asked Jul 24, 2020 in Linux / Unix by backtothefuture (552k points) | 489 views
+4 votes
1 answer
asked Nov 1, 2019 in Linux / Unix by backtothefuture (552k points) | 283 views
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users