Making an XBMC media center using Raspberry Pi. How I made a media center from Raspberry to replace a smart TV

Just recently the Raspberry Pi 3 was released, but without waiting for it, I decided to purchase the time-tested and well-proven single-board computer Raspberry Pi 2 Model B.
The review will contain some information about the computer itself, and I will also tell you how to make a full-fledged home media player from this little thing.

Introduction

Raspberry Pi 2 is a single-board computer originally created for teaching computer science in schools. Subsequently, it received much wider application and popularity than its authors expected. The computer is based on SoC (System on Chip) Broadcom BCM2836. The quad-core processor is built on ARM architecture Cortex-A7 and equipped clock frequency 900 MHz per core. Raspberry Pi 2 Model B was equipped with 1 GB of RAM. This memory is shared with graphics subsystem. In addition, the processor has ARMv7 architecture, which means more choice of operating systems. So, for example, on Raspberry Pi 2 you can install Ubuntu Linux and even MS Windows 10 IoT.

Specifications

Processor:Broadcom BCM2836 quad-core ARMv7 (900MHz) RAM:1Gb Video output:HDMI A/V output:A/V output 3.5mm jack 4 pin USB ports:USB 2.0 x 4 Network:WiFi 802.11n, 10/100Mb RJ45 Ethernet Memory card slot: Micro SD GPIO: 40

Purchase Confirmation

Equipment

I ordered a kit that included not only the board, but also the case, a radiator for the chip and a cooler, and I also ordered wifi usb.
The whole set came in a compact package.






All contents of the kit:


Let's take a closer look at the board






And components




I’ll tell you a little about the case itself, as for me, it’s a little flimsy, during reassembly one of the fasteners broke off, I had to glue it, most likely I’ll order a case of a different type -



Operating system installation

The operating system is installed on microSD card, it's better to use grade 10 cards, I had one of the OV cards I ordered from the crazy sale on JD lying around.
The system image can be downloaded from the official website
I chose as the main system so in the future it is planned to increase the functionality, those who want to use the Raspberry Pi to watch movies can immediately install

Creating microSD with OS in Windows

Download and install the program
We launch the program and select the image you downloaded, as well as the memory card on which you want to install this image

Creating microSD with OS in Linux

Unpack the downloaded image
unzip ~/filename.zip
Let's check what disks we have mounted and determine our memory card
df -h
The memory card can be identified in the system as "/dev/mmcblk0p1" or "/dev/sdd1"
Let's unmount our card by running the following command, replacing sdd1 with your flash drive
umount /dev/sdd1
And load the image onto the card
dd bs=4M if=~/image_filename.img of=/dev/sdd

First start

After the system boots we will see the Raspbian desktop


Now you need to configure the network, if you are using a wired connection, then you should receive an IP address automatically, in cases of WIFI you need to connect to your access point.
The next step we will need to expand the main size of the system to the size of a memory card, for this we will go to special utility for setting up Raspbian Pi Configuration


And click on Expand Filesystem


To fully play FullHD files, we will need to allocate at least 128MB of memory for the GPU. Go to the Performance tab and set the GPU value to 128


On this initial setup finished.

Setting up and installing programs

We will perform all subsequent actions through SSH connection, for this Any will do SSH client, if you are using Windows OS, I advise you to download, connect to Raspberry (the IP address can be found on the router or in the connection properties in the system itself) using the username pi and password raspberry

Installing Kodi

First of all, let's update the list of installed and available packages
sudo apt-get update
And install Kodi
sudo apt-get install kodi
Once launched, you will see something like the following screen.


I won’t go into more detail about setting up the system itself because... there is nothing complicated in it, the only thing worth doing after installation is connecting third party repository repository.seppius which contains add-ons that allow you to watch online videos, for this you need to put the repository on a flash drive and install it from the kodi system itself.

Installing rtorrent + web interface

To install rtorrent, run the following command
sudo aptitude install rtorrent
Let's create a folder where the files will be downloaded
mkdir /media/Torrent/
And the folder where information about downloads will be stored
mkdir /media/Torrent/.rt/
Now go to the home folder of the user under which rTorrent will work, in our case it is /home/pi and create a settings file.rtorrent.rc
sudo nano /home/pi/.rtorrent.rc
And let’s enter the following into it
min_peers = 1 max_peers = 25 download_rate = 1000 upload_rate = 300 directory = /media/Torrent/ session = /media/Torrent/.rt/ port_range = 40890-40890 port_random = no check_hash = yes session_save = yes encryption = allow_incoming,enable_retry,prefer_plaintext use_udp_trackers = yes dht = auto dht_port = 6881 encoding_list = UTF-8 scgi_port = 127.0.0.1:5000

Now let's set up rtorrent autoloading
Install screen to run the torrent client in the background
sudo aptitude install screen
Create the file /etc/init.d/rtorrent
sudo nano /etc/init.d/rtorrent
And copy everything from this link into it, replacing username with pi
Add the script to startup and run it
sudo chmod 755 /etc/init.d/rtorrent sudo update-rc.d rtorrent defaults sudo /etc/init.d/rtorrent start
Let's move on to setting up the web interface
Install apache and the components necessary for the web interface to work
sudo aptitude install apache2 libapache2-mod-scgi php5 php5-common libapache2-mod-php5 php5-curl
Let's edit the file /etc/apache2/apache2.conf
sudo nano /etc/apache2/apache2.conf
and at the very end of the file add the line
SCGIMount /RPC2 127.0.0.1:5000
I chose ruTorrent as the web interface for rtorrent.
First, install Subversion
sudo apt-get install subversion
Download ruTorrent
cd /var/www/html sudo svn checkout http://rutorrent.googlecode.com/svn/trunk/rutorrent
Let's set the rights to the rutorrent folder
sudo chown -R www-data:www-data ./rutorrent/
Well, let's start it all
sudo a2enmod scgi
By clicking on the link you should see the following page


This completes the installation of rtorrent.

Installing a samba server

For easy access We will install a samba server to the files on Raspberry over the network.
sudo apt-get install samba samba-common-bin
As the folder to which we will have access, we will indicate the folder created earlier /media/Torrent/; in order to have access to it over the network, we will need to set full access rights to it
sudo chmod 777 /media/Torrent/
Let's move on to the samba settings, edit the /etc/samba/smb.conf file
sudo nano /etc/samba/smb.conf
Let's delete all its contents and add the following settings
workgroup = WORKGROUP netbios name = RaspberryPi server string = share security = user map to guest = bad user browseable = yes path = /media/Torrent writeable = yes browseable = yes guest ok = yes
All that remains for us is to restart the samba service
sudo /etc/init.d/samba restart
That's it, now it will be visible on your network new computer with a directory writable by everyone on your network.

Addition

Since there are 4 available in Raspberry Pi USB port, I decided to connect a simple Chinese USB a sound card, which was surprisingly detected, I connected the sound system through it, surprisingly everything works fine.


The cooler that comes with the kit cannot be called quiet, which is why I turn it on only in cases when compilation is in progress.
Standard temperature during playback film mkv 4GB in size + downloading torrents


We also plan to connect the WS2822 tape to the Raspberry Pi as an abmilight to the TV.

Conclusion

As a conclusion, I would like to note that this decision Suitable, first of all, for those who are willing to spend a little time setting up and get a multifunctional mini-computer.
The disadvantages of this set include: flimsy case and noisy cooler

P.S: if you find an inaccuracy, error, or typo in the review, please write to me in a PM and I will correct it.

I'm planning to buy +30 Add to favorites I liked the review +33 +66

For its price, the Raspberry Pi is an excellent device for DIY creativity, learning Linux, and programming. At the same time, due to its low cost, low power consumption and small size, Raspberry Pi can become the basis for a powerful media center built on XBMC.

XBMC is an open source media center project originally intended for game console Xbox first generation (hence the name of the project - Xbox Media Center) and currently supports many platforms, including Android, Windows and Linux. Since XBMC is an open source project, any user can create their own build, including for the Raspberry Pi. For this reason, the wonderful Raspberry Pi fan community offers ready-made XBMC package builds for the Raspberry Pi.

So, the first thing you will need is the Raspberry Pi itself. I ordered one of my computers from RS Components and the other from element14 and both turned out great.

The next step is to install the XBMC distribution. Raspberry Pi stores operating system and programs on SD cards, so you will need an SD card. I use a 16GB card, but you can get by with a smaller one, like 4GB. What's great about SD cards is that you can have multiple cards with different distributions and try different configurations.

The best way to connect your Raspberry Pi to your TV is with using HDMI cable, because in this case audio and video will be transmitted over one cable, which will simplify installation. You can also connect audio separately via the headphone output. Please note that the Raspberry Pi does not have optical audio output. You can also connect a TV or monitor using the composite output (bell), but keep in mind that with this connection you will only be able to watch standard quality video and will not be able to get an HD image. Therefore, try to avoid connecting your media center using the composite video output. Sound parameters are determined in the Settings/System/Audio Output menu - here you can select which output to use for sound, HDMI or analog (headphones). Here you can also select the audio transmission format - AC3 or DTS.

Now it's time to install the operating system for the Raspberry Pi. There are several options for XBMC-based media center distributions, the most popular being Raspbmc, OpenELEC, XBian and DarkELEC. All of them are based on the XBMC project and developed specifically for the Raspberry Pi, they have minor differences, and are also supported by quite large communities. In this article we will use Raspbmc, since the author used this distribution the lion's share of the time.

Having prepared your computer and a clean SD card, next step download the distribution image. To do this, open the website http://www.raspbmc.com/download/ and download the required file. There are installation images for Windows and Mac OSX, or you can download an SD card image and burn it to the card. See all download options at the link above.

(Translator's note: about how to write an image to a card)

Immediately after installing and launching XBMC, you can watch videos in mp4 format located on USB disk, network drive or via DLNA server. For more information, I recommend checking out XBMC.org. It contains various instructions and tutorials for beginner XBMC users.

To view copies DVD discs or files recorded from using Windows Media Center on your Raspberry Pi, you will need an MPEG2 decoder, which can be purchased from the Raspberry Pi foundation for £2.40. Install license key very simple - after purchase you will receive an email containing the key. This code must be copied into the config.txt file located in the boot section (more on how to do this). The key must be entered into the config.txt file every time you reinstall the operating system distribution. In addition, the key is tied to serial number your Raspberry Pi, so if you have several computers, you will have to purchase a separate key for each.

Luckily, most XBMC distributions have easier ways to add license code. For example, in Raspbmc you need to open the section Programs and download Raspbmc settings, then in the tab System configuration open Advanced settings, click on MPEG2 codec and enter the key you received by email. The Raspberry Pi foundation also provides a key to decrypt VC1 encoded files. You can also purchase this codec if needed.

Now, with the available codecs, you can view files encoded with h.264 and mpeg2, i.e. You can watch TV shows recorded using Windows Media Center (unfortunately, only without copy protection). You can also record video files on USB flash disk and connect it directly to the Raspberry Pi. Finally, you can record TV shows to an external USB hard disk and watch them on the Raspberry Pi. I am using a USB hub with external power supply in order to connect an external drive with a capacity of 1 TB.

Content USB devices can be viewed in the Videos section. To do this, click Add files and then select the disk device. Now you can see the contents of the disc and select a file to play using XBMC.

You can also use UPNP technology to view content network devices NAS Windows computers and other servers. To do this, select Add Video sources and then click the Browse button. You can now select the content source. In my network, all UPNP devices were listed in the source list, then I added my computer to the sources and after that I saw the video files stored on it. Now I can view video from my computer on the Raspberry Pi, namely, I can watch mkv, WMV, WTV, and also MOV files located on a computer with Windows Media Center.

Most network NAS devices have built-in DLNA servers, as well as Windows Media Player can act as DLNA servers. Alternatively, you can set up another Raspberry Pi as such a server, then connect an external drive to it and stream video from it using a client on the Raspberry Pi. It is also possible to use iPad and Android devices as a video streaming server, using programs like Twonky Beam or Samsung Allshare. I was able to watch videos from my phone on the Raspberry Pi using Twonky Beam. Finally, network resources can be added as content sources for any DLNA server, i.e. you can connect shared folders on your computer or server and view these files on your Raspberry Pi.

There is also the option for Windows Media Center to stream video using DVBLink from DVBLogic. The DVBLink network allows Media Center TVs to transmit images to other devices on the network. In addition to clients for Android, Windows Phone and iOS, there is a plugin for XBMC. By installing this plugin on your Raspberry Pi, you can watch television programs in real time.

To do this, you will need to download DVBLink for Windows and, using its installation program, connect a TV tuner and enable video signal transmission over the network. After this, you can download the plugin for XBMC and, with its help, watch TV programs on the Raspberry Pi, use the EPG service (view the program guide), and also record programs.

Another way to watch live TV on your Raspberry Pi is with a network TV tuner like HDHomerun. This receiver has a built-in network port and is quite easy to configure.

Using plugins, you can add many new functions to XBMC, such as support for Youtube, Vimeo and other video hosting services, as well as Internet television services.

There are plugins for connecting various remote controls remote control media center, for example I used my old Windows Media Center infrared remote to control the Raspberry Pi. However, you may need to configure the correspondence of the remote control keys to the functions of the media center.

You can also use your smartphone or tablet to control your XBMC media center. I use the official Android application from the XBMC project and I am completely satisfied with it. In addition to performing the functions of a remote control, the application can display information about the current video, as well as show the contents of disks connected to the media center. You can download and install the application using this link.

In addition to these, there are a lot of interesting things you can do with XBMC, such as using CEC over HDMI to control your Raspberry Pi using your regular TV remote. The CEC protocol allows remote control commands to be sent from one device to another, so commands from a TV remote can be sent to an XBMC media center. In addition, you can use experimental features XBMC type "pause broadcast" and recording broadcast programs, using servers like TVHeadend, DVBLink, MediaPortal and MythTV.

In this article, I didn't talk about music and picture related features. Let me just say that these functions in XBMC are similar to those for videos. Those. you can listen and view the content USB drives, network resources, as well as UPNP.

It makes sense to buy a case for your Raspberry Pi, they exist great amount and I bought myself an acrylic case for £9.99 of this type.

So, despite its cost, the Raspberry Pi can be an excellent media center and at the same time help you learn XBMC and Linux. At home, I connected the media center to the existing one, on Windows based Media Center, which stores all my videos and also streams live programs using DVBLink. That is, I used several Raspberry Pis as additional media players for each TV in the house.

In this article I described only part of the basic information. There are actually a lot more things you can do with XBMC. I gave only a starting point for your creativity.

The article discusses the deployment of the openELEC media center on Raspberry Pi for playing media files from a flash drive in 20 minutes, which is controlled from a smartphone or tablet (Android or iOS).

NECESSARY EQUIPMENT

TOOLS NEEDED

  1. openELEC recording computer with card reader
  2. USB keyboard
  3. Phillips screwdriver
  4. Boring machine - if you need to trim the housing for the adapter.

WHY openELEC?

There are several for RPi different distributions for the implementation of media centers. The main ones are Raspbmc, XBian, openELEC. My choice fell on openELEC only because of its hardware requirements. The same Raspbmc is much easier to install, but it also eats up resources =))

DOWNLOAD AND INSTALL openELEC

The latest version can be obtained from the openELEC download page. It's important to note that if you Windows user, then you need to download the disk image (Diskimage).

To record an image in Windows, you can use the guide on the official website or the article on RoboCraft. It all comes down to downloading the disk image and burning it to a flash drive using .

My laptop runs Ubuntu, and I have 2 options: burn the image using the dd utility or download a build with the burn utility. Let's use the second option, which is recommended on the openELEC wiki:

  1. Let's unpack the archive:

    $ cd ~/Soft/RPi/ $ tar xvf OpenELEC-RPi.arm-4.0.7.tar

  2. Let's insert the flash drive into the card reader and see where it is mounted using dmesg:

    $dmesg | tail [ 5745.159957] mmc0: card 1234 removed [ 5761.921367] mmc0: new high speed SDHC card at address 1234 [ 5761.925638] mmcblk0: mmc0:1234 SA04G 3.63 GiB [ 5761.929710] mmcblk0: p1

    $dmesg | tail

    [ 5745.159957 ] mmc0 : card 1234 removed

    [ 5761.921367 ] mmc0 : new high speed SDHC card at address 1234

    [5761.925638] mmcblk0: mmc0: 1234 SA04G 3.63 GiB

    [5761.929710] mmcblk0: p1

    Here is our mount point - mmcblk0

  3. Let's move on to installation. To do this, run create_sdcard /dev/ mmcblk0(this is in my case, in yours you need to substitute your value):

    $ sudo ./create_sdcard /dev/mmcblk0

    And now we can remove the flash drive and insert it into the Raspberry.

    I like it better when nothing sticks out of the Raspberry, so I will use an adapter for the media center.

    ASSEMBLY Raspberry Pi AND CONNECT TO TV

    Since I decided to use an adapter, and the selected case is not intended for this (the adapter is thicker than a flash drive. It fits into the case, of course, but the halves of the case do not fit well and therefore does not look very presentable), you can use a burr and get from:

    After that, we put everything together and tighten the screws (included with the case). Then we connect HDMI. It is important to note that there is one feature - if you turn on the Raspberry without HDMI, then there will be no picture; for this you will need to restart it.

    If you have a TV with USB, then the power of our media center can be immediately connected to the appropriate port. Important note - when connecting external hard disk with such power supply, Raspberry will not have enough current and it will reboot. Here it is better to think about a power supply, or a USB hub with external power.

    You can take the same dongle as I have:

    Or it can be smaller and more elegant, the main thing is that it is compatible out of the box. Both options considered do not require driver installation.

    We only need the keyboard for configuration.

    FIRST START

    To start tormenting our media center, we just need to configure the language and WiFi. There is no need to install any drivers for the dongle - it is picked up automatically. It is best to connect a keyboard for ease of setup.

    To set the language: System -> Settings -> Appearance -> Language Settings
    To set up a WiFi connection: System -> openELEC -> Connections

    After that you can insert a flash drive and watch movies =))

    HOW TO MANAGE THE MEDIA CENTER

    1. You can connect a wired/wireless keyboard
    2. Using the web interface from both a computer and a phone
    3. Install Yatse app
    4. TV remote control with CEC support

    The keyboard option is very good, but it doesn't make our media center as cool as it could be - small and without unnecessary devices.

    The web interface is raised automatically based on the IP address assigned to the device on port 80. Thus, you can simply enter the link into the browser and control the media center.

    Probably even the most distant person from the IT industry has heard about miniature PCs with a minimum size no larger than a smartphone. Modern models are able to fit in the palm of an adult, but in terms of performance and functionality they are not inferior to modern full-fledged devices. Recently, creating a full-fledged media center using the Raspberry Pi 3 has become increasingly popular.

    You need a device that can be used to view videos, photos, and listen to music. Raspberry media center- the best solution in terms of price and functionality. Popular option for modern man, striving for universalization and miniaturization. To create a complete and functional system, the free Kodi media center is mandatory. The settings do not take much free time and can be done independently without outside help.


    What do you need to create a Raspberry media center?

    Initially, you need to prepare properly. Affects the final positive result. To create a full-fledged media center you need to use:

    2.Additional Wifi module. (already built into raspberry pi 3)

    4.Monitor.

    5. USB power supply.

    6.Flash card with a capacity of 8 GB.

    You will definitely need a full-fledged PC to load the required operating system onto the memory card. On this preparatory stage can be considered completed and you can proceed to further actions.


    How to create a Raspberry media center?

    After proper preparation, creating a full-fledged media center using a miniature PC does not take much free time. It is important not to rush, because you can make a lot of common mistakes. Don't forget that Raspberry is inexpensive, but powerful computer. Is different high level productivity. Can work as a full-fledged desktop system.

    For software For a media center, it is best to use the open source project Kodi. Experts recommend installing a special operating system for Kodi. The choice in each specific case depends on the personal preferences of the user. Many interesting and original add-ons have been released for Kodi. You should not install too many add-ons, because in this case the operation of the device will seriously slow down.

    Creating a Raspberry media center does not take much free time. With proper preparation and straight hands, you can do it within 60 minutes. If desired, the system can be customized to suit specific user requests. The best option for people who are not afraid to experiment. The system has a high level of performance and can be used for a long time. If desired, you can install special extensions to increase the functionality of the device. The microcomputer will have all the capabilities of expensive and complex speaker systems. Real savings of a decent amount of money.

    Below is a wall of text blah blah blah, you can skip it.

    If you haven't heard of Raspberry Pi, it's a small PC (a board with a processor and other modules) with which you can do anything. The characteristics depend on the model, I took the latest of the powerful Raspberry Pi 3 Model B, it has the following characteristics:

    • CPU: Broadcom 2837 quad-core ARM Cortex-A53 64bit (1.2GHz), OpenGL 2.0
    • RAM: 1Gb
    • Video output: HDMI
    • A/V output: A/V output 3.5mm jack 4 pin
    • USB: USB 2.0 x 4
    • Net: WiFi 802.11n, 10/100Mb RJ45 Ethernet
    • Bluetooth: Bluetooth 4.1, Bluetooth Low Energy
    • Memory card: Micro SD
    • GPIO: 40

    You may have started wondering what you could do with this machine besides a media center, and it’s true, there’s just a lot you can do. In general, I actually bought it not only for a media center, but also for streaming games from a PC to a TV. And yes, it works super - FullHD @ 60fps, input lag 1-4ms, loss in quality is minimal. For example, the same software on a medium-power laptop with 8GB of RAM, GeForce 650M, and i5 performed in quality 2 times worse than when disassembled and froze. But here it’s more likely wifi module old, as well as software for Windows in Java, and for the sake of understanding. Who is interested in this - Moonlight. So owners of Nvidia cards with Nvidia Share support can make themselves a complete analogue of Steam Link, which costs 7k, for 2.5-3k. And even better, since you will not be limited by the Steam library, you will be able to run any streaming software. The truth will be required active cooling, but it costs 50 rubles.

    You can also deploy full-fledged desktops on it, but they will not be so responsive, but Raspbian (Debian + XFCE) just fly, you can work in office packages, the load on the percent does not jump above 10%, the RAM always lasts less than half. The lags start as soon as you open Chrome with media. 1080p on YouTube the last time I looked, it was dragging with stutters, but they released some kind of update for the GPU, they said they had increased the performance, but I was no longer interested. I can watch the same YouTube through the media center which will be discussed.

    If you want, you can install Android TV. Google ported Android TV to Raspberry 3, no official builds available this moment, but there are already a bunch of custom ones, Android TV supports Raspberry already at the kernel level, it doesn’t lag at 1080 at all.

    Fans of old games will also find plenty of room for nostalgia. I’ll just give you the RetroPi link and then dig it yourself. There are just a bunch of such assemblies out there. In general, all old consoles are emulated, even PS One and PSP, of course, on the latter there are no lags and everything is in 1 OS. There are even console emulators like fighting games that used to be in shopping centers. People make full game stands At home, they even sell special manipulators with buttons using such a bundle.

    Those who have hands in more than one place and a rich imagination create simply incredible things. For example smart mirrors() and other incredible things. You can deploy OwnCloud and other services, nginx, apache, or even your own server, no problem.

    And if we go back a little to the web, you can even run phpStorm on it and work. I haven’t checked, but there are a lot of guides, I think it will start right away, and after optimization according to the guides it will work much better. Well, you never know, you might want to get perverted). Please note that the system eats about 20-40MB there - the rest will go to phpStorm.

    If you don’t know what to give an IT professional for some holiday, it’s just a sure thing, at first it’s not clear what to do with it, and then you start Googling, and you’re sitting there thinking about what to try first. Everyone will come up with a purpose for him, and for that kind of money he’s just a godsend. It will be played for many months, and the gift will be very memorable.

    To get ahead of questions, I’ll write right away what I took. Please note that it does not have any disks, it works via Micro SD, so it’s better to buy it right there and from the seller. Minimum 8GB. 4GB is occupied by Raspbian, about 2-3GB is occupied by the media center (on a separate OS the media center itself is 100 MB). That’s enough for me, I just took two of 8 each. If you want a media center and also watch movies online, then it’s better to have an external drive, otherwise take 32GB+ right away so that you have some extra, but it’s still better external hard disk. I ended up with an 8GB flash drive for the system + 4TB + 1TB external drives. The media center does not require cooling. Sometimes it overheats but not critically. It works for me 24/7 - why? You'll find out later.


    Media center KODI

    KODI and varieties

    I'm amazed that I didn't know about Kodi until now - it's just a super media player for everything you can play. Therefore, builds are created for all popular systems - Windows, Linux, MacOS, iOS, Android. If you have some old device that can be connected to a monitor or TV and it has at least 500MB of RAM, you can deploy such a media center on it. Those. Raspberry is not required here at all. It’s just that if you want something small and not voracious for your TV, that doesn’t make any sounds at all, then it’s an excellent choice.

    This player has a lot of distribution options. A bunch of unofficial distributions with different pros and cons, only for Raspberry I tried the following options:

    • OSMC - I installed this particular assembly for the first time, I returned to it, and I also installed it for my mother to disassemble. On the screenshots in the articles, KODI 17 is everywhere, in OSMC Kodi 16 at the moment. What is the disadvantage of this system? It only has a stable build. For some, this is not even a disadvantage. Those. no Knightley builds, beta versions, nothing (upd. there are already builds for Kodi 17, the guide is at the very bottom). Only release, only hardcore. As they say, chick-chick in production. A big plus, which is very important to me personally, is Debian under the hood. If you are not familiar with Linux, this item is a dummy for you, but for me personally, this is room for customization.
    • LibreELEC - as I understand it, a spin-off project from OpenELEC, much more active than the second one, has a default KODI with its own repositories for updates. I didn't use it for long after OSMC. It is very easy to switch to beta versions of the system and back to stable versions. At such a transitional moment, Kodi is wonderful - since the changes are drastic and I somehow didn’t want to sit on the old one, but still returned to OSMC to wait for the official release of Kodi 17 - since this system, for me personally, has a fatal flaw - it has Linux Kernel + compiled and configured for Kodi autostart. There are no package managers, nothing there. Otherwise, the system rather outweighs OSMC, if you ignore the fact that you won’t be able to do anything special with the system here, since compiling from source code is such a task. You need to understand and keep in mind that Kodi has a bunch of add-ons that integrate with system programs, but without installing them, and on Debian installing them takes a couple of seconds, but here there are problems for hours, or even days.

    Those. if you need maximum performance, although there is not much difference in speed between them at all, you don’t want to tune anything, see Linux, you are not interested in it - take LibreELEC, in this regard it is head and shoulders above OSMC. As long as you don't run into needs that require intervention in the system, this will be a wonderful distribution. But, for example, you wanted to deploy an FTP server on your computer, then you’ll understand why, and then oops! and that’s it, we’ve arrived, in OSMC this can be done via apt-get, and even easier, there’s an installation script FTP servers right in the system, just say what you need and he will write and configure everything himself, but on LibreELEC you need to find the program yourself, lucky if there is already a binary for your architecture, otherwise you will have to compile, in any case you need to configure it manually and register autorun with the system - in general, it’s not for everyone. I can tell you from experience that you will run into an addon that requires system software- very problematic, you are more likely to find a binding in Kodi for some software you want than to run into integration, I just don’t know about it. But I ran into it once, and then I rolled back to OSMC. Fortunately, the rollover takes about 10 minutes, since scanning the database is a quick task, after all, on disks.

    There are a bunch of different builds with Kodi for Rasbperry - but these are the most famous. The previously mentioned RetroPi also has the ability to run KODI and it is pre-installed there, and vice versa, it can be launched from KODI through an add-on, but builds are only available for LibreELEC (Google Gamestarter). And now KODI is officially developing a section in the media center for games and repositories for their add-ons - apparently soon this will be at the level of KODI itself.

    So before you do anything, you can install KODI on your OS right now and see what kind of beast it is. True at the time of writing stable version KODI 16, which is radically different in visual terms from KODI 17. In terms of functionality, it’s 1 in 1. But the UX has changed a lot, so the impressions of the versions are different.

    What formats does KODI support?

    An obvious question for this type of software. I have always considered VLC to be the leader in this, and I wouldn’t even be surprised if they somehow collaborate. But this question I would completely rephrase: What formats does KODI not support? I’ll just answer this - I don’t know, but it even eats ISO images of DVD\Blu-Ray. So if you have a great collection of films on disc lying around, and there is external drives, and you want to build a media library, then you remove the images from the disks, put them on the disk and voila - everything is ready.

    Again, is there any doubt? It’s easier to install it on a PC and feed it the format of interest. I can say one thing for sure. Videos in the VC1 codec are glitchy everywhere, even on a powerful PC, since this codec requires the purchase of a license, which costs 1 pound per off. Take it off the site and get attached to the piece of hardware forever. Well, you never know, you have such videos, I warned you;)

    What kind of animal is this and what can it do?

    I will tell you about everything in order. Because he just has a lot of possibilities. In the screenshots, half is disabled and the other is not shown.


    Movies

    This is the section why I fell in love with KODI so much and was incredibly delighted. If you have your own collection of films, the same ISO files from DVDs, it doesn’t matter - it collects it all into a single media library. Adds posters to required language, description, cast, trailers, posters, ratings, etc. It tracks what you watched and how many times, where you stopped, and there is even the ability to hide the plot to avoid spoilers. Groups movies into collections if a movie has more than 1 part. All this is finely tuned, from scanning parameters to output and playback parameters.

    He takes information about films from the no less interesting site The Movie Database - this is something like Wikipedia in the world of films and TV series. I myself added trailers from YouTube in Russian and titles to a couple of films - after updating the media library, all my changes came instantly, without any pre-moderation - which is just cool. I didn't even know about such a site. In general, such data sources can be connected through add-ons, such as Kinopoisk and IMDB. But due to the fact that there is no API or it is expensive, pages are parsed there - which takes a very, very long time. TMDB's API is free and without restrictions for everyone. The site is a simple find. Some information about the media file can be parsed directly from the file, chapter previews, video format, resolution, codec, etc.

    The media library, based on parsed data about the film, is divided into several options and allows you to view it according to different criteria: genre, year of release, specific actor, producer, film studio, rating, title, collection. In general, films are sorted into shelves and you can view them as you wish or set up your own filter for all the data at once. In the display of all films, you can change the display options, which will allow you to customize your media library as you wish.

    On the main screen, having selected the films section but not going into it, it shows films that you started watching but did not finish watching, the latest films that were added to the library. As well as unwatched, random films and suggestions for specific genres.


    Series

    This section is similar to the movies section. Its difference is that it shows how many episodes of a given series you have in your library and how many you have watched. If you promptly replenish it, it will show new episodes. It also indicates which episode you need to watch now, as it marks those already watched. He also takes information from TMDb or other sources. But I warn you right away, do not forget to specify in the settings to hide the description for unwatched episodes - since from experience, for example, the series “Lost” has such descriptions that you don’t need to watch the episode at all. So I highly recommend not enabling this option, since when you pause the video, it is also displayed and your eyes try to read it. It’s also cool that each episode has its own rating and not a general rating for the entire series, and you can set your own for a specific episode.

    Music and music video

    These sections are suitable for those who store music locally. I use Google Music so I haven't even tried them. I guess he can also parse information from various sources. I know for sure that there is a party mode that randomly spins something and does something else, but I honestly haven’t tried it. I'm just hiding these two sections. There you can install add-ons, and for example, you can also listen to Google Music. But you need to understand that GM does not have an API and this addon has extremely poor functionality.

    TV and Radio

    I really wanted to try TV, because what I saw on the Internet was simply impressive. Like all smart TVs, it can schedule a TV program, delay recording of broadcasts, pause, etc. For this, unfortunately, you need IPTV, and our provider is only planning this service and it is unknown when it will appear. But if you have it, this media center will cover 100% of your TV usage. Seriously, if I had IPTV, I don’t see any reason to switch to the main TV mode from Raspberry. It's just an all in one solution. Even though I don’t watch TV, I wanted to indulge myself. I believe it also integrates with the media library somehow. At a minimum, he clearly knows how to record new episodes for a series and save them in a separate series folder, therefore, the library will be replenished automatically. Considering that it can be kept on 24/7, and the TV itself is turned off - this is just 10 out of 10.

    Video

    This section is not so much about video as it is file manager. Here you can set folders for the media library and directly select files from media. I'll touch on it a little later, mostly a completely useless section. I set it up once and forget it, as the update happens automatically.

    Add-ons

    This is another big plus of the media center - it has the ability to write your own add-ons for the media center in Python. There is your own repository where you can add an application, if it, of course, meets the requirements, or you can create your own, independent repository with your own software and conditions, of which there are also plenty and they are no less interesting than the official ones.

    For example, there is YouTube, Twitch, Pusbullet from what I tried and really liked. You will be prompted to install YouTube anyway, since trailers are loaded from there and this addon is needed for playback, and I installed Twitch out of curiosity, I’m not a fan of watching people play, but sometimes when you walk around the apartment it’s cool to listen to the chatter of a couple of interesting people. You can add various RSS readers and follow the news directly from the media center.

    Also, for example, there is even a Docker addon! Yes, they are not exactly called addons, Kodi calls them “apps”, since they install software on the system and add integration with KODI. So yes, by installing docker there, all notifications will come to Kodi. Why, you can display all notifications from your phone, call alerts, and everything on Kodi.

    The only thing that is not there, and that’s not a fact, is a browser. But I honestly didn’t even look. For what? It’s simply not needed, seriously, all needs are covered by add-ons or the core.

    In fact, this section is a treasure and, probably, the core of the entire media center, since it allows you to do what is not there and expand what is already there. The media center has just an awesome API, I’m serious, although it’s not complete, for example, I found the missing command that I needed, but then I found how to do it regular means. I really want to write something, but I have no ideas yet. And of course, the community doesn’t sit still, there’s just a ton of add-ons, you can find anything. And this is only the official repository; the unofficial addons are no less interesting; as a rule, they are removed for reasons of ease of development, or because Kodi does not add them to its repository for reasons of fear. I think you guessed what kind of addons we are talking about, I will write about one of them below.

    After 2 months of use, crawling on the Internet in search of information on Kodi and everything connected with it, I was delighted with their community. It somewhat reminds me of Drupal, a lot of smart people, a lot of freebies in the form of add-ons and third-party software High Quality. One thing I will also talk about later, I even impressed on them how cool things people from the community are doing. Kodi is a great example of OpenSource and I'm actually outraged that I didn't know about it before.

    Web server

    This is not the web server you think about. Kodi has its own built-in web server, which is enabled by checking the box in the settings. What is this? And this is a very interesting thing, although I don’t use it.

    This checkbox activates the web server that hosts the website, which fully allows you to manage the media center. By default, it is available at http://DEVICE_IP_ADDRESS:8080. You can forward a port to the Internet and control the media center from anywhere, it has the ability to set a login and password for entry, right under the activation checkbox - don’t forget!

    This section is one of the reasons why I’m already reviewing the soon-to-be released Kodi 17, since it has been completely, literally radically redesigned this feature media center Now this is not a stupid white page with a list of files and player controls, it is a full-fledged tool for working with the media center directly.


    It has all the same sections, except TV and Radio. It fully allows you to view, edit and manage your media library. You can both create a playback queue and control the current playback, repeats, rewinds, pauses, volume - everything instantly arrives at the media center itself.



    # First of all, we need to create a folder where our USB drive will be mounted. # I decided that I would create a Media folder, and inside there would be a 4TB folder for a specific disk. # Login via ssh to OSMC. ssh osmc@RaspberryIP # Password osmc # Make the first folder mkdir Media # Make the second mkdir Media/4TB # And now you should find the name of your disk in /media (it must be connected) ls /media # For me it is called 4TB # Now we bind it to our folder. First the WHAT folder, then WHERE. sudo mount --bind /media/4TB ~/Media/4TB

    And the last command must be executed every time you reboot. In general, not a problem, considering that for me it only reboots when I do something wrong and it freezes.

    Therefore, try FTP only if you have problems with SFTP. Seriously, you won't get +100% speed and hemorrhoids are guaranteed.

    SFTP

    • OSMC: osmc\osmc
    • LibreELEC: root\libreelec

    I really, really strongly recommend changing the passwords for these users if you want to open ports to the Internet. It’s easy to do, log in via ssh under these users and write the passwd command - after which you will be prompted to enter a new password.

    • Address - IP address where to connect and where the media files are. I have a dynamic IP and the router can send data to all sorts of no-ip.org and other services automatically. He also provides his own, without hassle and registration (ASUS). Therefore, figure out how best to get around this, changing IP every time is not a fun thing, especially if you want to give this device to someone like your mother. Believe me, she won't figure out how to change it. It's much easier to add.
    • Path - here you can specify the base point to which ssh will connect. Out of the box, if you leave /home/USERNAME empty. Again, you won't go down a level through Kodi's built-in file manager. Therefore, it is better to specify media in this field. This way it will go to /media when connected. You will see all connected drives at once.
    • Port - everything is clear here, SSH\SFTP has 22 out of the box, I made it so that externally it is defined through the router as 2222. That is. The router catches the request on port 2222 and redirects it to port 22 locally. You can make 2222 whatever you want. The more random there is, the less likely it is to be hacked.
    • Use the login and password listed above; if you changed the password, then, of course, write your own.

    If everything is ok, this connection will appear in the general list to choose from, and when selected, the /media folder will open and you will see all the connected drives and can do what you want.

    For example, I select 4TB/Movies and mark that this folder contains movies, then it will scan it itself when new files appear on SFTP, or rather, on a flash drive. Those. You won’t have to configure this anymore if nothing changes in your settings.


    Yarr

    Later I’ll talk about another plugin, it’s much cooler! I advise you to start with it right away.

    It's clear that with such a large community, a great media center, and a very powerful API, there was bound to be something useful that wasn't added to the Kodi repositories. And there is a lot of such software. I will tell you only about one thing.

    Since I wanted my mother not only to watch what we have, but also to be able to watch the missed episodes of TV series, most of which are not shown on TV at all in Russia, the only place where you can get them is torrents. And yes, you can stream torrents on Kodi.

    There are a lot of addons, as I already said, but there is one that was made by a Russian developer, and it works quite well, although some aspects of it bother me, but even my mother was able to figure out how to use it the first time. It's called Torrenter. There is all the information about installing it. You can use SFTP via FileZilla to upload the file with the repository to home folder. And in Kodi select "Install from zip file"by selecting this file, a new add-on repository will appear. It contains the Torrenter add-on. I think this will not pose any difficulties.

    I will just briefly describe what he can do. Of course, it can open .torrent files, navigate through folders and files inside, and launch the necessary ones. It can also play magnet links. It’s more convenient for my mother to upload .torrent files via SFTP, sorting them into folders.

    There is a search on trackers, a bunch to choose from, only 2-3 normal Russian ones, but the search is very, very clumsy, I guarantee you, sometimes it’s faster and easier to just log in from a computer or mobile phone, find what you need, download the torrent file - and upload it via SFTP. This will make it easier to return to it.

    A very convenient option is that you can set it different behavior for working with torrents. For example, there are three options when opening a torrent: Ask what to do, Delete, Save. The first option offers the next two, and they, in turn, either delete the file after viewing, or leave it on the disk until you clear it through the addon or physically delete it from the folder. It does not remove them instantly, but quickly enough. I think you have a couple of minutes after closing the file view - after which it deletes them. So if for some reason you need a file, you can pause and drag the file from the addon folder, which you specify yourself.

    Overall it works well, there are no complaints about the speed of operation. New interface, which they actively put in the “Search Window”, is simply incredibly inconvenient, it does not have some functionality, is not at all in the Kodi style, in general everything is its own, inconvenient controls and other problems.

    It can also integrate with torrents via Web interfaces, but I don’t understand what it is and why. Apparently, if you installed torrent downloads on the system, it will allow you to manage them. That's how I see it. Well, on the same LibreELEC you won’t be able to install any of this just like that, hemorrhoids will be hellish.

    In conclusion

    The article, of course, came out oh oh oh so healthy. I didn't even expect it to stretch so much. But I painted as much as possible. There is no point in describing it further, I recommend that you personally install Kodi on the OS, it weighs a little, and try it. If you like it, think for yourself where you want to put it, leave it on the PC or somehow connect it to the TV.

    As I already wrote, it flies on my Raspberry Pi 3 Model B. Of course, he can’t do 4K at all, but 1080 is generally excellent. Because of this media center, I bought a second one specifically to replace my mother’s smart TV. She only has a couple of days of experience with it so far, but she really liked it. I once took her android console, and once explained how to watch online. There were always some problems, a lot of questions, but with Kodi there were no questions at all, everything turned out to be simple and clear to her. I'm really looking forward to Kodi 17 coming out on OSMC - since it seems to me they will fix the problem with SFTP, and the new Kodi itself is simply gorgeous. It's even simpler than the old one. And according to personal feelings, it is much more productive.

    I don't regret buying Rasbperry one bit. After all, you need to understand that here you can limit yourself not only to the media center. You can do anything, but when you buy a TV set-top box for 6-7k you get, say, Android TV and that’s it. Yes, you can install Kodi on top there, but you need to understand that this is still not quite the same. Again, you won’t bet much on the system. Connecting to Android TV via ssh and other protocols will most likely not be so easy since it was obviously locked out of the box for security purposes. I immediately plugged it into the network and immediately Kodi, it launched very, very quickly. Maybe 10-15 seconds. And again, there is room for action; you can install the same RetroPi, or Rasbian. And if Raspberry becomes outdated and stops exporting Kodi, which is very doubtful, because Kodi is still supported by all versions of Raspberry Pi, even version 1, which has generally ridiculous characteristics and 512MB of RAM, then it can always be converted for other tasks. Those. Such a bundle is actually bought for a year, and after a year nothing will have to be changed because the iron is not removed. Moreover, now Kodi is rolling out a very radical version update and the new version is even faster than the old one, so in the coming years I don’t think at all that Kodi will start doing something that won’t be taken out by Raspberry.

    So if we talk about Rasbpberry, for the money it’s an awesome device with a huge range of applications. I am absolutely convinced that this is an ideal gift for an IT person, especially one who doesn’t know what he wants. This is not some kind of gadget that will become obsolete in a year or two and with one task, this is a toy for an IT person to suit his needs and interests. I already wrote that initially I bought it primarily to stream games from PC to TV and play on the big screen, and purely by chance I came across Kodi. Moving smoothly to Kodi, this is a truly excellent OpenSource product that causes delight. I don’t understand why TV producers don’t start cooperating with them. After all, it’s just like Android for mobile phones, it’s completely flexible, customizable, you can even set up your own repositories. This would help both Kodi and smart TVs to become usable. Considering that the iron that he needs actually costs several times less than it costs. And this despite the fact that manufacturers, having direct access to the TV signal, could integrate it into Kodi itself without any problems. Once again, I recommend that if you are interested, install Kodi, preferably 17, not 16, and try it.

    Update from 01/28/2017

    In general, I found in the wilds of the forum how to switch OSMC to Kodi 17 version. A new repository is already ready there. The update went smoothly and everything migrated perfectly. It works as quickly as LibreELEC, SFTP has also started working and works very quickly, so there is no need to bother with FTP anymore. Also, most videos began to be played via the web version in the HTML5 player - which is also good news. Streams VERY quickly.

    If you still have OSMC with Kodi 16, it is easy to distinguish it from Kodi 17; if your interface is not like the screenshots in the article, but with a blue background and a horizontal menu in the middle of the screen, this is version 16.

    How to update OSMC Kodi 16 to Kodi 17

    # Connect via SSH to Kodi. The default password is osmc ssh osmc@IP # Log in as root sudo -s # Add a new package source (Kodi 17 is there) echo "deb http://apt.osmc.tv krypton main" >> /etc/apt/sources. list # Update information about sources apt-get update # Run the update and reboot the system apt-get -y dist-upgrade && reboot