Книга: Raspberry Pi Beginners Guide: Ultimate Guide For Rasberry Pi, User guide To Get The Most Out Of Your Investment, Hacking, Programming, Python, Best Hardware, Beginners Guide To Rasberry Pi
Назад: Chapter 10: Creating A Classic Game Emulator
Дальше: Chapter 12: A Personal Assitants Made With Raspberry Pi3

Chapter 11: Building A Streaming Program For Your Media With A Raspberry Pi3

One of the most popular uses for the lowcost Raspberry Pi computers is as a media center. Indeed, it doesn’t matter whether you’re using a Model A, a Raspberry Pi Zero, or a Raspberry Pi 3 – while the later model will naturally offer superior performance, the fact is that all of the devices can deliver you compact, affordable, lowpower, media center solution.

But which media center application should you install on your Raspberry Pi’s SD card? Several options are on offer, and we’re going to walk you through them now, looking at the features, advantages, and disadvantages of each.

ReadyMedia (MiniDLNA)

Formerly known as MiniDLNA, ReadyMedia requires installing on a standard Raspberry Pi operating system, such as Raspbian Jessie. Start by mounting the disk drive(s) with the media data on, and then use the standard installation command:

sudo aptget install minidlna

Once installed, this simple tool is compatible with DLNA/UPnPAV, which means that any DLNAcompatible device on the same network should be able to detect your Pi and play media from it.

Fast, lightweight and easily configurable, ReadyMedia is the option to choose if you just want to stream your media and have no interest in indexing it.

Kodi/OpenElec

Perhaps the most recognized name in this list, Kodi — formerly XBMC — is available for the Raspberry Pi. Various options are available for this. Among them are writing a full Kodibased distro to SD card and manual installation using:

sudo aptget install kodi

Such distros include OpenElec, OSMC and XBian. You may already know that OpenElec is available on NOOBs for easy installation.

But wait a minute. Aren’t the Kodibased media servers actually media centers? Well, they’re actually both, which is how they come to be in this list. While you might use these distros (or manually install Kodi) as a media center/HTPC solution on a Raspberry Pi, the provision of DLNA/UPnP means that Kodi (and its forks) can be used as a media server.

If you’re already using OpenElec, OSMX, XBian, etc., then you don’t need a media server as you already have one. Simply open Settings > Services > UPnP and enable Share video and music libraries through UPnP. You’ll then have the ability to stream content from your Kodibased system. It’s simple, but demands that you have already set up the media center software and attached the various hard disk drives that store your media.

OpenMediaVault

Admittedly closer to a NAS than a media server, OpenMediaVault is the current smart choice for Pi owners wishing to make their media files (and documents and other data) available to them from any device on the same network.

Setup is straightforward, if lengthy, but you may run into initial problems mounting any hard disk drives that you have connected to your Pi. This should be quickly overcome, however, enabling you to configure the system correctly. Among the features with OMV are support for a UPS (uninterruptible power supplies) and statistics pages to assist in system monitoring. There is also EXT3/EXT4/XFS/JFS filesystem support and RAID can be set up for HDD mirroring. SSH, FTP, TFTP, SMB and RSync are all supported for direct connection to your OMV device, although you will typically access it via your web browser, by opening the IP address.

Various plugins are also available for OMV, such as a Bittorrent client. You can try a demo version of the console on the OMV website.

Plex Media Server

If you prefer to simply stream from a desktop or dedicated media server to your Raspberry Pi, seek out Plex. A popular name in home media streaming, Plex can be used to stream content to all manner of devices, even the Google Chromecast.

Using Plex Media Server with your Raspberry Pi requires you to first download the RasPlex client installer to your Windows, Mac or Linux PC and write the software to an SD card compatible with your Pi.

Beyond the Raspberry Pi, you’ll be able to enjoy media streamed via Plex on a wide selection of devices, as Plex is perhaps the widestused of all media server applications. Mobile apps are available for Android, iOS and Windows 10 Mobile, while media streamers such as Apple TV, Amazon Fire TV and many Smart TVs also have Plex clients. There are even clients for Xbox One and PlayStation 4, as well as Windows, and Mac OS X, while various thirdparty builds are available for Linux.

Note that Plex demands that your files are named in a particular format if it is to pull the appropriate metadata from the Web. This support page from the Plex website explains file organization and naming.

As things stand, Plex should be your first choice of media server, and the RasPlex client is as good as the mainstream version. For the best results, however, make sure you’re using a Raspberry Pi 2 or Raspberry Pi 3.

Назад: Chapter 10: Creating A Classic Game Emulator
Дальше: Chapter 12: A Personal Assitants Made With Raspberry Pi3