Media Center from MacMini and Rapsberry PI

Or the simplest and most convenient media center, understandable to all households

card to attract attention

Hello, Habr! It’s getting easier every day to assemble a media center at home. There are many options - from HTPC from old iron to nameless devices the size of a flash drive. On the hub there were many reviews of home-made silent HTPCs, android-boxes and no-tops for the implementation of home media servers. I tried many different options before finding the most suitable for myself and, most importantly, for households.

Minimum task:
1. Assemble and structure the entire media library
2. Make it as accessible as possible for viewing on two televisions in different rooms
3. Have the ability to view or download (for offline viewing) movies from the music library on mobile devices
4. Remote launch of torrents from mobile devices
5. Silent operation of devices.

Through trial and error, I came to use XBMC on an old Mac-mini + Rapsberry Pi.
Samples, errors, and convenient configuration under the cut.

Why there was a desire to do a home media server, I think no need to explain. First of all, it's just convenient. And sticking a flash drive between a laptop and a TV (not SmartTv) several times a day had no more strength.

Sample 1

In an attempt to get by with little blood, a piece of iron was assembled. The

miracle machine was assembled from an old asus, which served faithfully for about 5 years. But time did its job, and the laptop's frame scattered around the screen, loops broke out and the hard drive almost stopped working. After some simple manipulations, the screen moved to the top of the lid, and the machine itself worked on XUbuntu, which was loaded from a flash drive, and was controlled only by the mouse.
Leaving him working 24/7 was scary, given his love of overheating. Yes, and he worked ugly slowly.
After a couple of days of torment, this design returned to the shelf of the cabinet where she had lived the past few years.

Summarizing the experience: Such an HTPC can be taught to perform almost all the necessary tasks.

But: Inconvenient, slow, unsafe, and most importantly noisy.

Sample 2 and 3.

A little later, a package arrived from England with Sumvision Cyclon Nano.

The device, let's say that we have been in reviews on Habré more than once.

A small box with Android OS on board. It is controlled by the remote control that came with the kit.
The box didn’t work fast, but for a 40 pound device it’s bearable. Managing with the air-mouse was unusual. But, an obvious plus, she (the box) was not heard.

After playing with the settings for some time, it turned out to teach her a media shell to play video from an external drive, which was not as convenient as we would like. In this regard, it was decided to install the recently released (at that time) XBMC for Android. And while XBMC was downloading, I experienced the first serious disappointment ... the batteries ran out in the remote. Seriously, the new batteries that I put 25-26 hours ago. Fortunately, several more batteries were found, and the XBMC was able to launch. Then a second disappointment awaited me. The video was played with jamming. Moreover, with such that it was not possible to watch. All attempts to change the settings and somehow defeat the problem ended in failure.

Later I tried to raise DLNA on this box and stream video on the Xbox, but this was accompanied by constant freezes. Yes, and viewing DLNA stream through the Xbox is not the most convenient solution. Long, difficult and inconvenient management.
Things never got to setting up the torrent rocking. Cyclon went to the same shelf as the old Asus.

For me personally, continued use seemed unrealistic. Watching a video on YouTube or surfing the Internet is good, if not with your own remote control. But he does not pull HD video. DLNA holds poorly. Some minor functions may perform. It does not heat up and works quietly.

Sample 4. Successful

I started looking for a suitable net-top. After the failure with the Cyclone, I didn’t want to buy “anyhow”, and the good ones were already worth serious money. Here, I honestly admit, I was lucky - one very good person, seeing my torment, gave me his old Mac-Mini (2009 release) for experience.

It is strange that there is almost no mention of the use of these computers as media servers on Habré. Perhaps the reason is its overly high price. But, it seems to me that this, if not an ideal option, is certainly worthy of attention.

It works quietly and quickly. Almost does not get warm. Connects to a TV via HDMI via Mini DisplayPort. It is worth noting that the computer does not transmit sound through HDMI and this is not treated. I had to connect an additional wire to the sound.

I’ll tell you a little more about configuration this is exactly the option that suited me and my spouse.

Although the computer works for me 24/7, sometimes there are interruptions in electricity and you have to turn it on with your hands. At startup, MacOS loads and loads MySQL, uTorrent, DropBox, and XBMC. IP in the local network is registered static.
A minute after pressing the button, we see the shell of the media center on the screen.

UTorrent launched by the background checks the special folder in DropBox and if a torrent file appears there, it immediately starts downloading it. Thus, the problem of remote launch of torrents with films was solved. It is worth noting that such a trick did not work either with Google Drive or Yandex.Disk. The problem is that Google and Yandex’s poppy apps do not sync automatically. A dropbox does this, and right away. Although, I admit that the problem is in my crooked hands.
Series are downloaded automatically from RSS feeds and distributed in folders thanks to a filter system built into uTorrent.

Media Library
Files are stored in 2 folders on an external hard drive: Movies, TV Shows. They share in a network through SMB. The XBMC WatchDog plugin is updating the music library. At any change (adding, deleting, transferring, renaming files) in folders connected to XBMC, the plugin launches content scanning and cleaning.

XBMC can distribute media over UPnP. So, any device in the home Wi-Fi network sees a UPnP server and can use it with special software to play it. For iPad, I decided to use ArcMC. Its obvious advantage is that it can download and save movies to the device directly from the UPnP stream.

Thus, before traveling, we don’t have to suffer with wires and throwing films through itunes. There is a truth to this program and cons. It may turn off during playback. On average, this happens 1 time in 4-5 hours of viewing. I hope the bug will be defeated in the next update.

Second tv
In the process of a long search for a device for a second TV, the study of "whistles on anroyd", it was decided not to get on the rake, but to take the Raspberry Pi mod. B.
An SDCard 8 GB class 10, a case and a small Wi-Fi receiver were immediately purchased for it.

Powered by RPI from the USB port of the TV, picture and sound via HDMI. The box was comfortably placed behind the TV.

OpenElec, a stripped-down version of XBMC, was chosen as the OS for the RPI. What's good about it is that it is fast and supports HDMI CEC. Those. You can control the system right from the TV remote control. From it all the device settings were made.
To prevent OpenElec from slowing down, we immediately turn off the useless built-in RSS-Feed in the settings. You can still overclock the RPi a little, from the standard 700 to 800 MHz (you can more) in config.txt:


That worked fast enough for me. If you load the shell with plugins, it will slow down again, then you can enable Dirty Regions . On regular XBMC distributions, this option is enabled by default, but it is off on OpenElec. To do this, add advancedesttings.xml


Synchronization allows you to store in a single database all the films, covers, descriptions, views and pauses. Therefore, at the second media center, we no longer need to scan sources for new films and series, all the data in the home library will cling from the network. One of the most pleasant bonuses in this case is that we can achieve that by putting the film on pause in the kitchen, we continue viewing from the moment we stop in the living room.

GRANT ALL ON *.* TO 'xbmc';

Do not forget to enable MySQL autorun. And do not forget to change the IP of the machine on which the database is running in /etc/my.cnf (by default it costs
bind-address = 192.168.***.***

Complementing on all machines advancedesttings.xml

Now you can start scanning the library. It is worth noting that for this, even on the server computer, you need to register a network address so that synchronization works. An example is smb://192.168.***.***/Фильмы/. After the scan is completed, so as not to clog these paths again, you can simply transfer the sources.xml file to the second machine.
Mack and RPi made great friends. At first, when watching big films on RPi, there were freezes. It was cured by replacing the router.

The RPi variant is controlled by the TV remote, but with the poppy, a different solution is needed. Unfortunately, Apple, as in many other cases, is very important in terms of the use of certain technologies. And HDMI CEC, its computers do not support at all. Initially, a small apple remote was planned, but when the xbmcRemote program was installed on all phones and tablets, the need for a physical remote disappeared.

The XBMC remote is convenient and ugly easy to use. It is connected to the system via the IP of the machine in the local network and remembers all the devices.

Recently, by the way, on Habrauser, dmitryredkin published a good article about managing HTPC


Something could be made simpler, something faster and more reliable. But summing up, I can say that I achieved the task set by myself. The wife learned to use the entire system in one evening. Everything is simple and convenient to disgrace. We have been using such a system for half a year, and during this time there were no problems.

Thanks UFO for invite!

Also popular now: