Home media server для linux

Содержание
  1. Домашний медиа сервер minidlna
  2. На кой черт это надо?
  3. Установка Linux
  4. Установка transmission-daemon
  5. Установка NGINX и настройка проксирования
  6. Настройка проксирования transmission-daemon через nginx
  7. Написание скрипта
  8. Установка медиа сервера
  9. Напоследок
  10. 12 Best Media Server Software for Linux in 2021
  11. 1. Kodi – Home Theater Software
  12. Kodi Features:
  13. How to Install Kodi in Linux
  14. 2. PLEX – Media Server
  15. Plex Features:
  16. How to Install Plex in Linux
  17. 3. Subsonic – Personal Media Streamer
  18. Subsonic Features:
  19. How to Install Subsonic in Linux
  20. 4. Madsonic – Music Streamer
  21. Madsonic Features:
  22. How to Install Madsonic in Linux
  23. 5. Emby – Open Media Solution
  24. Emby Features:
  25. How to Install Emby in Linux
  26. 6. Gerbera – UPnP Media Server
  27. Gerbera Features:
  28. How to Install Gerbera in Linux
  29. 7. Red5 Media Server
  30. How to Install Red5 in Linux
  31. 8. Jellyfin
  32. How to Install Jellyfin in Linux
  33. 9. Universal Media Server
  34. How to Install Universal Media Server in Linux
  35. 10. LibreELEC – Open Embedded Linux Entertainment Center
  36. OpenELEC Features
  37. How to Install LibreELEC in Linux
  38. 11. OSMC – Open Source Media Center
  39. How to Install OSMC in Linux
  40. 12. Ampache
  41. 13. Tvmobili – Smart TV Media Server [Discontinued]
  42. Tvmobili Features:
  43. How to Install Tvmobili in Linux
  44. 14. OpenFlixr – Media Server [Discontinued]
  45. How to Install OpenFLIXR in Linux
  46. If You Appreciate What We Do Here On TecMint, You Should Consider:

Домашний медиа сервер minidlna

На кой черт это надо?

Так сложились обстоятельства, что мне удалось скоммуниздить старенький ПК, да и чтобы он просто не пылился, так как такое старье продавать за 5-7 тысяч (цена в моем регионе за подобную конфигурацию) мне стыдно, а получать за него 3 тысячи — ну такое. Я решил, сделаю дома небольшую библиотеку фильмов, музыки, да и у жены очень много фотографий, которые её очень дороги. Задумка была следующей.

Некий медиа сервер, который будет транслировать медиаконтент на телевизор.

Некое локальное хранилище для файлов, порой приходится с флешками побегать, а то жесткого диска на 500ГБ не хватает.

Торрент клиент, который будет качать все что я пожелаю.

Цели поставлены, осталось их реализовать. Вряд ли опытные пользователи найдут здесь что-то полезное для себя, наверное, только начинающие пользователи Linux, так как все действия очень простые в исполнении.

Установка Linux

То, как поставить линукс, я думаю, не стоит говорить. Я просто опишу что я сделал после установки. Во-первых, пока компьютер был возле меня, я настроил статический адрес в файле /etc/netplan/00-installer-config.yaml

Думаю, тут вроде понятно, что где что и как. Конечно, правильнее было бы привязать ip-адрес через роутер, но у меня роутер Xiaomi, и там все в иероглифах. Я просто сделал статический ip-адрес на компьютере. После этого я его отнес в подвал и подключил к роутеру и сел за рабочую машину. Теперь стоит создать пару ssh-ключей для удобства

Ну и отправил ключ на медиа сервер

Теперь настрою файл

И теперь для подключения достаточно написать ssh home ,и последний момент, которой наверное не стоит делать, это убрать ввод пароля при использовании sudo. Для этого достаточно добавить NOPASSWD в файл /etc/sudoerc что бы вышло так

Установка transmission-daemon

И так, начну с торрент-клиента transmiss-daemon.

Так обновятся все пакеты и установится transmiss-daemon. Вообще не рекомендуется ставить без ведома все подряд, но так как у меня система только что установленная, установятся только обновления системных пакетов, и вряд тли что-то сломается. После установки transmission-daemon нужно его выключить для того что произвести настройку.

Если править файл конфигурации /etc/transmission-daemon/settings.json в тот момент как демон работает, изменения не сохранятся. И так мне надо поправить несколько строк, но для начала создам папки куда будет все качаться. Я создам все папки для медиа контента в /media и будет /media/torrent/downloads для загружаемых файлов и /media/torrent/complete для файлов которые уже загрузились

сразу сменю владельца на папки для загрузки на debian-transmission

Теперь можно приступать к настройке transmission. Как уже говорилось, все настройки хранятся в файле /etc/transmission-daemon/settings.json . Нам необходимо поправить несколько строк, а именно

«download-dir»: «/var/lib/transmission-daemon/downloads» — указываем папку куда будут помещаться загруженные файлы, у меня в /media/torrent/complete Лучше указывать полный путь

«incomplete-dir»: «/var/lib/transmission-daemon/Downloads» — указываем папку в которой будут храниться не докачавшиеся файлы, у меня /media/torrent/downloads

«incomplete-dir-enabled»: false — указываем true что бы хранить скачавшиеся файлы отдельно

«rpc-authentication-required»: true — меняем на false для отключения авторизации по логину и паролю, это пожеланию

«rpc-host-whitelist-enabled»: true — меняем на false для отключения использования «белого списка ip-адресов»

«rpc-username»: «transmission» — указываем логин для авторизации

«rpc-whitelist-enabled»: true — опять-таки отключаем авторизацию по разрешенным ip-адресам меняя true на false соответственно

И запуск transmission

и захожу в web-панель transmission по ip-адресу и порту 9091, у меня это 192.168.31.5:9091

web-интерфейс transmission

transmission почти готов теперь настрою проксирование через NGINX

Установка NGINX и настройка проксирования

Я поставил весь nginx, но в теории достаточно и самого пакета nginx

После установки проверю, работает ли веб сервер зайдя на ip-адрес машины

Приветственное сообщение от Nginx

Теперь выполню настройку nginx. Все конфигурационные файлы находятся в /etc/nginx/* . Для начала я удалю все лишнее из файла /etc/nginx/nginx.conf и приведу его к такому виду

И создам файл /etc/nginx/sites-enabled/home.conf с базовым содержимым

Немного объясню файл. listen 80 указываем на каком порту будет слушаться сайт, root /var/wwww/home я создал папку от имени root и поместил туда простую страницу html взятую из интернета для проверки как будет все работать.

html страница скачанная из интернета

Так же я добавил строку 192.168.31.5 home.ru в рабочей машине в файл /etc/hosts для того что бы сайт мог открываться в браузере с рабочей машины по адресу home.ru что и указал в файле home.conf server_name home.ru

Настройка проксирования transmission-daemon через nginx

NGINX вообще мощная фигня, и для того что бы открывать web-панель transmisson через http://home.ru/transmission/ его будет более чем достаточно. Все правки я буду делать в файле /etc/nginx/sites-enabled/home.conf для начала добавлю новый location и в нём укажу что бы он проксировал запрос с home.ru/transmission/ на 127.0.0.1:9091

блок location для transmission

Читайте также:  Динамический диск windows 10 что это такое

Перенаправление пошло, но вот только transmission жалуется на отсутствие хедера X-Transmission-Id . Немного поковырявши хедеры, так же добавив 2 блока location мне удалось завести transmission. Вот полный файл конфигурации

полный файл home.conf

Написание скрипта

Так сложилось, что у меня телевизор Samsung толком не воспроизводит видео в формате avi, а если и воспроизводит то как то криво. Нельзя перемотать, длительность фильма такая — что люди стока не живут, да и самое неприятное заключается в том что посреди фильма он может просто оборваться. А вот формат mkv он ест нормально. И поэтому я решил написать небольшой скрипт на bash который будет запускать сам transmission-daemon после загрузки файла. Немного подумав над логикой и посмотрев как качаются разные файлы, выстроил себе цепочку действий. Во-первых надо понять, скачалась папка или файл. Если папка, то создать такую же папку в директории для DNLA сервера, если файл, то пропускаем. Возвращаемся к папке, теперь смотрим на содержимое папки, если файлы avi то конвертируем их через ffmpeg в конечную папку, если в папке файлы mkv то просто перемещаю их, но если там то-то другое, просто кидаю в /tmp для дальнейшего анализа. Теперь возвращаемся к началу скрипта, если же это не папка, а файл то, смотрим на формат и при необходимости конвертируем. Вроде ничего сложного, вот сам скрипт

Скрипт далек от идеала, может потом его доработаю под собственные нужды, например что бы скачанные файлы .iso перемещались сразу в папку для шаринга. Так же он отправляет в телеграм уведомление о загруженном файле, и если есть ошибки, он тоже об этом сообщит. Скрипт писал на быструю руку, и он не проходит по вложенным папкам, если будет в этом необходимость то его поправлю. На данный момент он выполняет то что мне и надо. После того как скрипт написан, и я определился с конечными папками, перемещаю скрипт к transmission

даю скрипту права на исполнения

и меняю владельца

После останавливаю transmission-daemon

и меняю 2 параметра в /etc/transmission-daemon/setings.json

done-enabled перевожу на true, то-есть включаю активацию скрипта по окончанию загрузки, а done-file указываю полный путь к файлу, можно указать только название файла если файл лежит в папке transmission, но мне легче указать полный путь.

Установка медиа сервера

В качестве медиа сервера DNLA я выбрал minidlna. Ставится из репозитория ubuntu, прост в настройке.

Файл конфигурации находится /etc/minidlna.conf , я в нем внес несколько правок, а именно, указал где находятся медиаконтент

Указал где хранить базу данных файлов minidlna

Указал куда писать логи

и указал имя сервера

и в конце перезапустил сервер

И получил результат

Напоследок

Писать о том как я настроил временно samba не буду. Есть очень много мануалов в котором все описано куда лучше, чем смогу описать я, но хочу поделится несколькими мыслями на будущие) Целый комп для этого излишнее, тем более у меня есть роутер с прошивкой OpenWRT на котором можно все это реализовать, но жена мне раз дала идею сделать мониторинг цен. Я такое уже делал, написал небольшой скрипт на bash который парсил страницу, брал оттуда название товара, картинку и цену. Скрипт запускался через cron. Идея неплохая, но для каждого сайта необходимо делать свой шаблон. И скорее всего сайты по типу Wildberries при авторизации будут показывать другую цену. Идею думаю реализовать на C++, которые будут брать ссылку для просмотра из БД и смотреть на цену. Если цена записанная в БД будет больше, то отправлять сообщение в том же телеграме о том что на такой-то товар ценна изменилась. Да и для разных экспериментов и обучения можно поднимать сервере виртуальную машину и её ковырять. Так же есть идея реализовать некую запись телепередач. У нас нет обычного телевидения, есть всего 1 канал XD, и жена смотрит несколько передач. Думаю просто настроить запись их в тот же медиа сервер. Но все это планы, желание на исполнения не много.

Я впервые пишу такой длинный текст, и вообще в первые куда-то пишу по мимо личных сообщений. Не судите строго.

Источник

12 Best Media Server Software for Linux in 2021

A media server is simply a specialized file server or computer system for storing media (digital videos/movies, audio/music, and images) that can be accessed over a network.

In order to set up a media server, you need computer hardware (or perhaps a cloud server) as well as software that enables you to organize your media files and makes it easier to stream and/or share them with friends and family.

In this article, we will share with you a list of the 10 best media server software for Linux systems. By the time you complete this article, you will be able to choose the most appropriate software to set up your home/office/cloud media server powered by a Linux system.

1. Kodi – Home Theater Software

Kodi (previously known as XBMC) is a free and open-source, highly customizable media server software. It is cross-platform and runs on Linux, Windows, macOS; iOS, and Android. It is more than just a media server; it’s an ideal entertainment center software with a fabulous user interface and several other media server software appliances are based on it.

Kodi Home Theater Software

Kodi enables you to play movies/videos, music/audio, podcasts, view images, and other digital media files from your local computer or a network server as well as the internet.

Kodi Features:

  • Runs on a wide variety of devices.
  • It is user-friendly.
  • Supports a web interface.
  • Supports a variety of user-created Add-ons.
  • Supports televisions and remote controls.
  • Has a highly configurable interface via skins.
  • Allows you to watch and record live TV.
  • Supports importing pictures into a library.
  • Allows you to browse, view, sort, filter, or even start a slideshow of your pictures and much more.

How to Install Kodi in Linux

To install Kodi on Ubuntu-based distributions, use the following PPA to install the latest version.

To install Kodi on Debian, use the following command, as Kodi is available in the default “main” Debian repository.

To install Kodi on Fedora use pre-built RPMFusion packages as shown.

Читайте также:  Kali linux dns server

2. PLEX – Media Server

Plex is a powerful, secure and fully-featured, and easy-to-install media server software. It runs on Linux, Windows, macOS, and many other platforms.

Plex Home Media Server

It supports almost all major file formats and allows you to organize your media in a central point for easy access. Plex has an easy-to-navigate interface, and a collection of useful apps for a variety of devices: phones, tablets, gaming consoles, streaming devices, and smart TVs.

Plex Features:

  • Supports encrypted connections with multiple user accounts.
  • Allows you to easily pick and choose what to share.
  • Offers parental control functionality.
  • Supports mobile sync which offers offline access to your media files.
  • Supports flinging of video from one device to another.
  • Also supports cloud sync.
  • Supports audio fingerprinting and automatic photo-tagging.
  • Has a media optimizer and much more.

How to Install Plex in Linux

To install Plex in Ubuntu, Fedora, and CentOS distributions, go to the Download section and choose your Linux distribution architecture (32-bit or 64-bit) to download DEB or RPM package and install it using your default package manager.

3. Subsonic – Personal Media Streamer

Subsonic is a secure, reliable, and easy-to-use personal media server and streamer. It runs on Linux, Windows, macOS, and Synology NAS. It is very customizable and supports all major media formats. There are more than 25 supported apps that you can use to stream music directly on your mobile phone.

Subsonic Personal Media Streamer

Subsonic can operate with multiple users and any number of players at the same time. And it allows you to play movies/videos or music/audio files on any compatible DLNA/UPnP devices.

Subsonic Features:

  • Has a highly configurable UI (user interface).
  • Supports secure connections over HTTPS/SSL.
  • Integrates with the best web services.
  • Supports up to 28 languages and comes with 30 different themes.
  • Offers chat features.
  • Allows you to access your server using your own address i.e https://yourname.subsonic.org.
  • Supports authentication in LDAP and Active Directory.
  • Has an integrated podcast receiver.
  • Supports setting upload and download bandwidth limits and lots more.

How to Install Subsonic in Linux

To install Subsonic in Debian/Ubuntu and Fedora/CentOS distributions, you need to first install Java 8 or Java 9 using the following commands on your respective distributions.

Next, go to the Subsonic Download section to grab the .deb or .rpm package and install it using your default package manager.

4. Madsonic – Music Streamer

Madsonic is an open-source, flexible, and secure web-based media server and media streamer developed using Java. It runs Linux, macOS, Windows, and other Unix-like systems. If you are a developer, there is a free REST API (Madsonic API) that you use to develop your own apps, addons, or scripts.

Madsonic Music Streamer

Madsonic Features:

  • Easy to use and comes with jukebox functionality.
  • It is highly flexible and scalable with an intuitive web interface.
  • Offers search and index functionalities with Chromecast support.
  • Has built-in support for your Dreambox receiver.
  • Supports authentication in LDAP and Active Directory.

How to Install Madsonic in Linux

To install Madsonic in Debian/Ubuntu and Fedora/CentOS distributions, you need to first install Java 8 or Java 9 using the following commands on your respective distributions.

Next, go to the Madsonic Download section to grab the .deb or .rpm package and install it using your default package manager.

5. Emby – Open Media Solution

Emby is a powerful, easy-to-use, and cross-platform media server software. Simply install the emby server on your machine running Linux, FreeBSD, Windows, macOS, or on NAS. You can also grab the emby app on Android, iOS, Windows or run the web client from a browser or still use the emby TV app.

Emby Media Solution

Once you have it, it will help you manage your personal media libraries, such as home videos, music, photos, and many other media formats.

Emby Features:

  • A beautiful UI with supports for mobile sync and cloud sync.
  • Offers powerful web-based tools for managing your media files.
  • Supports parental control.
  • It automatically detects DLNA devices.
  • Enables easy sending of movies/videos, music, pictures, and live TV shows to Chromecast and much more.

How to Install Emby in Linux

To install Emby in Ubuntu, Fedora, and CentOS distributions, go to the Emby Download section and choose your Linux distribution to download DEB or RPM package and install it using your default package manager.

6. Gerbera – UPnP Media Server

Gerbera is a free open source, powerful, flexible, and full-featured UPnP (Universal Plug and Play) media server. It comes with a simple and intuitive web user interface for easily configuring your web server.

Gerbera UPnP Media Server

Gerbera has a highly flexible configuration, allowing you to control the behavior of various features of the server. It allows you to browse and playback media via UPnP.

Gerbera Features:

  • It is easy to set up.
  • Supports metadata extraction from mp3, ogg, FLAC, jpeg, etc. files.
  • Supports user-defined server layout based on extracted metadata.
  • Support for ContentDirectoryService container updates.
  • Comes with Exif thumbnail support.
  • Supports automatic directory rescans (timed, inotify).
  • Offers a nice Web UI with a tree view of the database and the file system, allowing to add/remove/edit/browse media.
  • Support for external URLs (create links to internet content and serve them via UPnP to your renderer).
  • Supports flexible media format transcoding via plugins/scripts and much more.

How to Install Gerbera in Linux

To install Gerbera in Ubuntu, Fedora, and CentOS distributions, follow our installation guide that explains the installation of Gerbera – UPnP Media Server in Linux and also shows how to stream media files using Gerbera on your home network.

Alternatively, you can install Gerbera in Linux distributions using:

7. Red5 Media Server

Red5 is an open-source, powerful, and multi-platform media streaming server for streaming live audio/video, recording client streams (FLV and AVC+AAC), remote object sharing, data synchronization, and much more. It is developed to be flexible with an effortless plugin architecture that offers customization for any live streaming scenario.

Читайте также:  Linux exit from script

Red5 Media Server

How to Install Red5 in Linux

To install Red5 in Linux, follow the installation instructions on Github to get started with the server.

8. Jellyfin

Jellyfin is an open-source and free media streaming system that enables you to control and manage the stream of your media. It is an alternative to Emby and Plex, which offers media streaming from a dedicated server to end-user devices through multiple applications.

Jellyfin – Media Streaming System

How to Install Jellyfin in Linux

Install Jellyfin via Apt repository in Debian-based distributions.

For other Linux distributions, go to the Jellyfin download page and follow the installation instructions.

9. Universal Media Server

Universal Media Server is a DLNA-compatible UPnP media solution that created as a fork of PS3 Media Server. It enables you to stream media files to a wide range of devices that includes TVs, smartphones, gaming consoles, computers, audio receivers, and Blu-ray players.

Universal Media Server

How to Install Universal Media Server in Linux

To install UMS in Linux, you need to download UMS tarball and compile it from the source.

10. LibreELEC – Open Embedded Linux Entertainment Center

LibreELEC is a lightweight Linux-based operating system for setting up your machine as a media server using Kodi. It is built from scratch for the sole purpose of running Kodi media server software.

LibreELEC – Open Embedded Linux

It allows you to organize your movie collections; offers you a picture browser, music and audiobook player, TV and personal video recorder, and a TV show management functionality. It is highly extensible through a great number of addons.

OpenELEC Features

  • Organize your movie collections and play your media with relevant info, subtitles, and fanart.
  • Manually watch all your photos or use a handy slide show with a zoom effect.
  • Browe, watch and record your favorite TV channels.
  • Manage your TV series and keep track of your favorite episodes.
  • Listen to audio files in various formats with artists’ photos and album covers.
  • Easy expandable with Addons.

How to Install LibreELEC in Linux

As we said, LibreELEC is a small Linux-based operating system built from scratch as a platform to turn your computer into a Kodi media center. To install it, go to the LibreELEC download section and choose your Linux distribution to download DEB or RPM package, and install it using your default package manager.

11. OSMC – Open Source Media Center

OSMC is a free open source, simple, easy-to-use, full-featured media server software and media streamer for Linux. It is based on the Kodi media server software. It supports all well-known media formats and a variety of sharing protocols. In addition, it comes with a remarkable interface. Once you have installed it, you get easy updates and apps to use.

OSMC – Open Source Media Center

How to Install OSMC in Linux

To install OSMC in Debian/Ubuntu, Fedora, and RHEL/CentOS distributions, first go to the OSMC release section and download compiled version of OSMC, and install it.

12. Ampache

Ampache is an open-source audio and video streaming media server and file manager that enables you to host and manage your own audio/video collection on your server. It can stream your music and videos to your computer, smartphone, smart TV, or tablet using Ampache’s web interface from anywhere using an internet connection.

Ampache – Music Streaming Server

For Ampache installation, please visit the wiki page.

13. Tvmobili – Smart TV Media Server [Discontinued]

Tvmobili is a lightweight, high-performance, cross-platform media server software that runs on Linux, Windows, and macOS; NAS as well as embedded/ARM devices. It is easy to install and in addition, tvmobili is fully integrated with iTunes and offers amazing support for full 1080p High Definition (HD) videos.

Tvmobili Media Server

Tvmobili Features:

  • Easy to install, high-performance media server.
  • Fully integrated with iTunes (and iPhoto on Macs).
  • Supports full 1080p High Definition (HD) video.
  • Lightweight media server.

How to Install Tvmobili in Linux

To install Tvmobili in Ubuntu, Fedora, and CentOS distributions, go to the Tvmobili Download section and choose your Linux distribution to download DEB or RPM package and install it using your default package manager.

14. OpenFlixr – Media Server [Discontinued]

OpenFlixr is a virtual, flexible, energy-efficient, and fully automated media server software. It uses several other applications to achieve its overall functions, including Plex as a media server (to organizes movies, series, music, and pictures and streams them), Ubooquity for serving comics and ebooks, and a web-based reader. It supports automated downloading and serving of media, encrypted connections, and smart auto-updating.

OpenFLIXR Media Server

How to Install OpenFLIXR in Linux

To install OpenFLIXR, the only thing you need is visualization software such as VirtualBox, KVM, Vmware, etc.

Once you have visualization software installed, Download OpenFLIXR and then import in the hypervisor, power on, and let it sit back for a couple of minutes till installation finishes, after that go to http://IP-Address/setup to setup OpenFLIXR.

Conclusion

In this article, we shared with you some of the best media server software for Linux systems. If you know any media server software for Linux missing in the list above, just hit us up via the feedback form below.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

We are thankful for your never ending support.

Источник

Оцените статью