Since a long time ago I wanted to share my server setup in this awesome forum, sorry for my english in advance . In my university residence some years ago everybody was constantly asking for external HDD's to share movies and tv shows, so one day I wondered what could I do to make this sharing simpler. After using Plex for several years I switched to Emby cause Plex added a 100 users limit share and we were +-120 users. I rented a SoYouStart Opteron Server with 6Tb of storage in order to make Emby accesible outside the residence's LAN. Everything was perfect but we were (all the users) paying 45€ a month for the server, in addition I hadn't control of the hardware and if I wanted to change something or add more disk space was impossible. So with the installation of 300/300 fiber in my house, I decided to setup a home server and migrate all the stuff from the cloud server to my home server. That way we'll only have to pay for the electricity and the initial hardware cost. So, went to amazon and started looking for a nice budget setup for my server, the key of the purchase was the energy saving.
The home server specs are the following:
- Intel i5-6600 Processor
- Asus B150M-A Motherboard
- 2x4Tb HGST Desktar NAS HDD's (installed in Software RAID 0), for storing the media files
- Kingston SSDNow V300 120Gb for the OS and Emby metadata, etc.
- 16 Gb DDR4 HyperX Fury Kingston RAM
- Corsair Series CX430 PSU
The system is running under Ubuntu 16.04 after trying to do it under Debian 8.5, but the system due to the recent processor and the Linux Kernel in Debian 8.5 (I suppose) wasn't very stable with Emby. In order to do the migration transparently for the users I downloaded all my library (1300 SD Movies, 500 1080p 5Mbps Movies and 130 SD TV Shows) from the cloud server to my 8Tb /home partition in RAID 0, after this I installed and configured Emby and letting it scan the library and download all the metadata (notice that I didn't back up the library from the cloud server, just the users and their play status). With this completed, I configured my TP-Link wr1043nd router with OpenWRT installed to forward the necessary ports to the server, and setted up a dynamic DNS with NOIP as my ISP IP is dynamic. Everything almost ready, users backed up in the cloud server and restored in the home server I switch my Domain to point to my home ddns instead of the cloud server and watch the users loging in. Everything was fine and nobody noticed the change (correction, somebody had dns issues but after erasing history and cookies in their browser the problem was solved).
The average number of users connected at the same time is 5-10, with 20-30 in peak hours (siesta time 3-4pm, after dinner 11pm, before luch 1-2pm, you know spanish regime ), almost everybody uses the server through the Web interface (some tablets or chromecast but it's 5-10% of the users) so what I do to deal with transcoding, or better said, how do I do to AVOID transcoding without losing quality. It's very simple, the solution was to convert all the media to h264/AAC/mp4 with a daily script which executes ffmpeg at 2am, looks for .avi or .mkv files and converts them to h264/AAC/mp4. The script is veeeery veeery simple (i'm not a scripting or programming boss) and this is the conversions it does:
Input --> Process --> Output
- Movies and episodes in sd/mpeg/mp3-AC3/avi:
sd/mpeg/mp3/avi --> x264 CRF 20, audio_bitrate aac 128kbps, web_optimized --> sd/h264/aac/mp4
-Movies in sd/h264/DTS-AC3/mkv
sd/h264/DTS-AC3/mkv --> video stream copy, audio_bitrate aac 128kbps, web_optimized --> sd/h264/aac/mp4
-Movies in hd/h264/DTS-AC3/mkv with video bitrate around 5mbps
hd/h264/DTS-AC3/mkv --> video stream copy, audio_bitrate aac 192kbps, web_optimized --> hd/h264/aac/mp4
For movies with bitrate over 5mbps I use another script to do a 2-pass conversion cause it takes time for each file. In addition the scripts removes all subtitles and conserves only one audio track in spanish.
The question now is, why I do this? Well mainly because all my users don't care about DTS, surround or having a 20mbps full hd bluray. The only thing they want is that the movie plays well, fast, and good quality if possible, so this is a way of optimizing resources and disk space. The SSD gives an amazing speed charging the menus and all the web frontend I really recommend it, the server is now running perfectly and growing little by little. Oh! important, I have one directory for SD movies and another for HD movies, and for TV shows the structure is like this --> /home/shows/show_name/season/episodexx.avi
Hope you like it! and if you have questions I'll be pleased to answer them. (converting script attached and modified for understanding, the script is named wololo , if you played Age of Empires you should know why ).
Edited by plexman, 21 July 2016 - 11:36 AM.