I have my raspberry pi about a year now. It's time to talk about the usability of an raspberrypi as an media provider. Lets be clear: It only downloads and provides media. It isn't directly hooked up to a TV. - If you try, it's not gonna be multi tasking -
I'm running the following hardware setup:
- Raspberry Pi Model B: 512MB RAM with an 32GB sd card.
- Used the Cyntech casing because it has mounting holes for the wall.
- 100Mbit Ethernet cable directly connected to the home router.
- 10Mbit external internet connection
- external USB powered HUB for external HDD and an second Raspber> ry Pi (which does nothing media related).
- Used an Western Digital My Passport 2TB because of its formfactor / USB 3.0 and it's strong price/storage.
- Raspberry Pi is powered by the USB 2.0 data port, this is not recommended on stackexchange but it still works..
Setup in the basement
I'm running the following software setup:
- Sickbeard: automatic downloading of TV series through Usenet
- Couchpotato: automatic downloading of movies through torrents/Usenet
- NZBGet: Usenet client which provides a clean Web interface and lightweight backend.
- NzbToMedia script to clean, rename and send an NZB or Torrent to Sickbeard or Couchpotato.
- Transmission for torrent downloads. Has a nice clean Web interface.
- Using SunnyUsenet as Usenet provider with an max of 10Mbit downloading speed.
- Running a Samba service to stream any file raw over my local network.
The other Raspberry pi has an Nginx proxy running for al the services running on my Media pi, which allows me to reach all services from one webservice which does the HTTP Auth for me.
I'm using the following clients to watch TV series / movies:
- Nexus 7 2012 in combination with the App Mizuu.
- Tronsmart T428 (Android TV Stick) in combination with the App Mizuu.
- Windows 7 with VLC player.
I will adress these clients in the following chapter.
After a year using my setup i learned some things i want to share. Most of the problems were just trial and error because of the lack of questions on the internet.
Downloading an ~900MB video goes with about 6-7MB per second with Samba
When reading a file from Samba, the CPU becomes the bottleneck. This is actually optimized, in the beginning in only got about 3-4MB per second. It was because i used NTFS on my external disk. I chose for NTFS so that Windows as well as Linux could read the disk (hot swapping). Choosing for NFTS took a big performance hit because it required more CPU power, something that an Raspberry pi doesn't really have .. My second improvement was putting an USB HUB in between, the external harddisk required a lot of power to operate, which meant it actually was slower when directly connected to the Raspberry pi.
- Use EXT4 on your external harddisk. It requires less CPU performance for an Samba Share.
- Power the HDD by placing an USB hub in between, it allows the Harddisk to spin faster.
- You can overclock the CPU to squeeze some extra performance out of it.
- 6-7MB/s is more than enough to stream an Full HD video file, most MKV's have an bitrate of about 600-800kbytes/s.
Uploading an ~900MB video goes with about 11-12MB per second with Samba
When uploading to the Raspberry pi, the ethernet port becomes the bottleneck. Apparently it costs less CPU power to write then to read. I'm not really sure why though. It might do some caching tricks to speed things up.
RAM is -enough- for all services to run smooth
First of all, when you use your Raspberry pi as an media downloader and provider: it doesn't need any GPU RAM. In Wheezy the default configuration is 256 for the CPU and 256 for the GPU. You can adjust this with
sudo raspi-config. I've set 16MB RAM for the GPU which is the minimum.
When my Raspberry pi is idle,
total used free shared buffers cached Mem: 438 425 13 0 39 230 -/+ buffers/cache: 155 282 Swap: 355 0 355
270MB is used for the OS and services, the other 150MB is claimed for cache which improves loading times for the Web interfaces. On default these cached files stay in RAM unless someone else requires the RAM. When torrenting and downloading from usenet this cache usually dries up and all the RAM is used for the services. Despite the small amount of RAM in the Raspberry pi, it never actually failed because of it.
Sickbeard is excellent for an TV series archive
Before i knew sickbeard, i had one big messy harddisk with all torrents of TV series i wanted to watch. Because my internet sucks, i needed to download series in advance.
Sickbeard is advertised as an automatic downloader for TV series, but you can handle that as well. You can manually import an folder and sickbeard will find out which TV series it is, rename it and place it in the designated folder.
I Still don't understand Couchpotato
I've already downloaded "some legal obtained" movies with couchpotato, but i have no idea how many times it actually tried to download a "better" version of a movie. You can assign which qualities you want to look for and which quality has a higher preference, but i have no idea how to let it stop after the first hit. I tried matching the boxes after each quality (which should means it stops after it finds that quality), but i never saw it happen. It's just to eager to find a better release.
For the rest, movies finally end up in my media folder so it works..
NZBGet is much more user-friendly than SabNZBD
I prefer NZBGet far above SabNZBD. The Web client is very lightweight and easy to use. When the NZB fails, you can see where it went wrong. It uses less RAM than SABNZBD.
Unpacking NZB's of 30GB is not an good idea
One thing a Raspberry pi (+ external HDD) can't handle very well:
- Unpacking an 30GB NZB which contains an whole season.
Unpacking would just take days, with no progress after a while. The CPU load indicators just went up to 300 times the normal processing power. At this point the Raspberry pi stayed on but just didn't do anything. You could still SSH into OS, but any operation would never end. I could only fix this by restarting the HDD + Raspberry Pi.
The problem is that Sickbeard has no option to disallow season pack downloads. When i add a new show to sickbeard i throw out the season NZB's and manually search for each episode with Sickbeard (click the search icon behind each episode).
Dont use SSL for usenet
Just don't, unless you're paranoid. It does decrease download performance because the CPU of the Raspberry Pi is weak.
Mizuu works excellent in combination with my Samba Share and Trakt.tv
Mizuu is an perfect match with Sickbeard and Couchpotato. It allows you to index samba locations for Movies and TV Series (As seen in the second screenshot). It retrieves all information from external API's and tries to find matching files by looking at the file- and foldername.
It allows you to use your own media player. I use MX Player since it got great controls and codec support. You can also connect your Trakt.tv account for automatic check-ins.
Mizuu has become free to use! A more basic approach is to download Lidroid file manager, add an Samba host and let the intent open MX player to watch the movie/TV series.