My Home Theatre

It’s been a hiatus… I’ve been a bit busy lately, it’s summer time and all… I’ve been enjoying the beautiful weather with my family but I feel like I’m due, so here we go!

Home Theatre! This topic interest me big time, ever since I bought my “new” house 5 years ago I had been planning to do something nice in terms of an entertainment space. The space I had in my mind was a bit different then your typical audio/videophile types dream of but it’s what I dream’t of at this stage in my life.

I will be the first to admit that this post is late to the game, and I anticipate to upgrade my projector and receiver to native 4k within the next 6-8 months. I have my eye on you Optoma UHD60!

Coming from my previous house (a shoebox) I had a big room to actually call my mancave, a 25’x16′ room. The picture below is pretty unflattering… and it only shows the room from one angle, but this is all I could find for the time being… This was a couple days after we moved in. In hindsight I should’ve taken more before and after photos for this project.

mancave_before-1

Here is the original conceptual design of what I envisioned the room to actually become.

mancave-schematic

First step was to build the A/V closet and shelving, the closet did not exist originally so I had to rip out some drywall and attach into the existing framing. Here is a before picture of where I put the closet in.

AVcloset-before

Here are some pictures of the AV closet build out. The shelf design I found on another site, if I can find it again I will give them a kudos link, man is it a solid design – homemade shelf that can hold a ton of weight and gear. All of the supplies for the shelf I purchased at Canadian Tire and Rona. All of the cabling, connectors, wall plates and in ceiling speakers I purchased through Monoprice.

 

Here are pictures of what it looks like today, don’t mind the mess I have a few kids.

Projector Mount

If you look at the projector mount picture below you’re probably saying wow that’s a crazy mount is this guy a nutcase? Actually it’s pretty much mandatory in my mind to design something like this if the projector is going to be installed in a basement like setting.

When I originally mounted the projector I was truly a newbie… I affixed it directly on the floor joists, what a mistake. The feedback was vicious and the projector was bouncing like no tomorrow… and when it started to bounce it really didn’t recover quickly since there was nothing to absorb the movement that reverberated off the joists.

This is something I came up with through trial and error, this works for me, it doesn’t eliminate movement entirely, if my kids are bouncing off the walls upstairs it will shake, but it’s absorbed quickly by this design and I can rest well knowing that my investment is safe. To date I have almost 5000 lamp hours using this rig and the projector and lamp still lives on.

I used a large piece of MDF that spans three joists, I tapped into the joists using 2 1/2″ wood screws. From there I lined up where the projector was going to be mounted and penciled in four pilot holes where the bolts were going to be installed. These four bolts affix the actual mount to the MDF base, they are 3/8″ in width in my application, the bolts are fairly long I believe around 3 1/2″. I used several washers, rubber grommets and springs as you can see from the photo, these items are doing a lot of the hard work to minimize any vibration and impact.

projector-mount

Projector

At the end of 2012 I was on the hunt for the right projector for me. I didn’t want to spend a ton but I wanted a projector that was a good bang for the buck, but mandatory was good input lag and 3D. I stumbled across the BenQ W1070 Home Theatre DLP Projector. It’s a great unit, I’ve been using it now for almost 5 years, so it’s done really, really well… no issues whatsoever.benq_w1070

 

Screen

I went the Do-It-Yourself route. After abundant research I ended up using the following for the screen paint:

Sherwin Williams ProClassic Smooth Enamel Satin Finish Extra White – 6260 UNIQUE GRAY. I don’t believe Sherwin Williams carries this formulation anymore.

Down the line I believe I will switch to an actual screen for my next projector install. Don’t get me wrong the paint is great and a money saver, but I found that it cannot cover imperfections in your actual drywall. If you look close enough you can pick up on these subtle things while the unit is on.

I used a somewhat dark color for the rest of the wall around the screen. Sherwin Williams Classic 99 Satin Finish Extra White – 6549 ASH VIOLET.

The screen is approximately 110″ measured diagonally.

Screen Frame

I used 2 1/2″ MDF trim I mitered the corners at 45 degrees and installed L shaped hinges on the back side. I primed and painted with flat black paint and used brad nailer to affix it to the wall.

Speakers

I opted for a 7.1 configuration, the front and center speakers I got a sweet deal on from Newegg, they were on clearance dirt cheap… I could not pass it up. I picked the JBL Studio 1 Series Studio 190 Front and Center speakers. For the subwoofer I went with the Klipsch KW-100, for the sides I went with Klipsch RS-62s. For the in ceiling I went with Monoprice 6-1/2 Inches Kevlar 2-Way In-Ceiling Speakers.

The in-ceiling speakers I cut a plywood template to hold the speaker since I have a drop ceiling with soft fiberglass tiles. The plywood template fits into the 2’x2′ grid and the grid take the weight of the speaker and not the tile.

For the Klipsch surround speakers, I mounted the speaker to a stud on opposing walls using a single screw.

I am not an audiophile but they sound good to me, most would recommend not mixing and matching, but really for me I was going with the best value/deal at the time as speakers can be really expensive for something better then bottom of the barrel.

AV Receiver

For the receiver I went with the Onkyo TX-NR616, I had never purchased an Onkyo before but I can say I have been really happy with it.

The receiver can not fully power my front speakers in it’s current 7.1 configuration, if I used 5.1 it can power them fully, but the sound is still good, I don’t pump it too often… just something to keep in mind if you are purchasing an AV unit.

The one issue I have had which seems to be some kind of glitch where HDMI switching stops working after the projector is turned off, it doesn’t happen all the time… it is a random thing. Simply recycling power on the receiver corrects the issue.

IR Repeater

For extending my IR remotes (satellite receiver, AV receiver, etc…) I went the cheap route. I picked up a USB powered IR repeater from Amazon – Neoteck IR Repeater Infrared Remote 1 Receiver 4 Emitters Control Kit. I just plugged it into my AV receiver’s USB port to get power, and I installed the IR receiver discreetly along the edge of my drop ceiling. It’s cheap but it does the job and I can close my cabinet if need be and not have to fight with pointing remotes directly at the device.

Advertisements

Home Media – Part 4 – OSMC/KODI/XBMC

This is part 4 of a series of write ups called Home Media.

Part 1 – The NAS build

Part 2 – The Setup

Part 3 – The Rip

Now that you have a whole infrastructure setup for streaming in your house, what do you do?

First thing is first, you will need some sort of hardware. Be it an old laptop, a Odroid-C2 box, an Android Box or a Raspberry Pi3. Then you will be creating two xml files called Sources.xml and/or AdvancedSettings.xml. These two files are responsible for media sources and database connections respectively. With Advancedsettings in the mix you can also add an SQL instance to your setup.

The benefit to the SQL database is that if you have multiple devices in your home, you can pause your content in one room and resume it in another. Your library info is stored in one place, the databse, and can be easily backed up and restored using software such as HeidiSQL. Library updates can be performed using headless installations of KODI and are picked up by all other devices on the network connected to the DB.

Easiest way to run a headless installation of KODI is to use the LinuxServer.io docker container which they have created and is available from here https://github.com/linuxserver/docker-kodi-headless. This works well if you have a server at home. If you are running a Pi or Odroid device with KODI on it this might not be necessary, since these are always on low power devices. Potentially you can send all update requests to these boxes.

For Laptop and Android Boxes go to their respective app stores and install KODI. On Linux you have to install KODI manually. Head over to Kodi.TV and they have all the packages you need over there. For further installation instructions head over to the KODI wiki.

In this example I will be working with v17.x or K, code named Krypton. For the Odroid-C2 and RaspberryPi I suggest heading over to LibreELEC and grabbing the installation source from there. The equivalent LibreELEC version of KODI version 17 is 8.x. For the Odroid and RPi you will need to image the storage device, SD card or eMMC storage. On Windows use the Rufus software. Alternatively LibreELEC has built their own installation tool to install the OS on a storage device. For further installation instruction for LE suing their tool go to their wiki site. An alternative to LibreELEC is OpenELEC, this has builds for devices that Libre does not support.

Note that when you boot in to KODI for the first time, specifically LibreELEC, you should enable SAMBA and SSH. SAMBA will be useful for copying the xml files to your KODI box later on.

Installation:

Once you have installed Rufus and plugged your SD/eMMC card to your computer start Rufus and locate the drive letter that is the storage device of your choosing.

In Rufus click the drop down list and select DD Image, then to the right of it click the image icon.

Rufus will prompt for a file with a Open selection window. Select the appropriate image and click Open.

It will warn you about erasing all the data on the storage device, accept the prompt and let Rufus run through it’s thing.

Once complete close Rufus and check that your file structure of the SD card look something like the above. The storage device is now ready to be plugged into your hardware and you can proceed to boot it.

Database:

Install the database of your choice. I use MariaDB, it’s a free open source SQL software. It was forked after MySQL was bought out by Oracle. I run this in a docker on my home server. However you like to proceed pick the installation of your choice.

The docker container is available on the Docker hub and can be found here: https://hub.docker.com/_/mariadb/

To run the docker with persistent storage run the following docker commands.

First you need to pull the installation.

docker pull mariadb:latest

An alternative to the latest tag you can use the versions available on the site, 5, 10… etc. Then you will need to run the docker using the docker run command. It will look something like the follwing.

docker run -d –restart=always –net=bridge –name mariadb -v /my/own/datadir:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=SomePassword -e MYSQL_USER=kodi -e MYSQL_PASSWORD=kodi -p 3306:3306 mariadb:latest

For Unraid 6 you can use a Docker MariaDB template available here:

https://github.com/Exist2Resist/docker-templates/tree/master/exist2resist

There are 3 key commands you need to execute on the database after you have installed it. You can find the database installation instructions for various OS versions on the KODI wiki.

Make sure after you setup a sa or root user on the database you write down the password. After this log into the database and run the following 3 commands.

  1. Type in: CREATE USER 'kodi' IDENTIFIED BY 'kodi'; and press return
  2. Type in: GRANT ALL ON *.* TO 'kodi'; and press return
  3. Type in: flush privileges; and press return

These commands create a user with the name kodi and password kodi. This will be used in your KODI installations via the advancedsettings.xml file to connect to the database.

sources.xml:

The sources file is used to connect KODI to your network shares and sources for your media and music. A sources file has the <sources></sources> tags at the beginning and end of the file and should look something like the following…

smb: stands for samba, your other option would be nfs which is the file sharing protocol in linux. Also if you notice the above shares are accessible to anyone on the local network. If you want to password protect these shares go ahead but you will need to change the <path>, using the example above to smb://username:password@Tower/Music/.

The sections (<music>), name (<name>) and path(<path>) are all mandatory in the example above. Every other field is optional.

Note that if you are using a database to store the media information you do not need the sources.xml file on all your instances of Kodi. You will only need both files on the instance which updates the library and database. All other instances only need to connect to the database. The database contains a files table which has an idPath column that stores the path to the files.

For further detail on the sources xml you can head over to the KODI wiki, http://kodi.wiki/view/Sources.xml

Note that with the database in the mix you should enable the option to wait for network before starting KODI. This is only available in OpenELEC and LibreELEC builds of KODI. I have not been able to find this in the vanilla KODI, but that should not matter as more than likely these installations will usually run on a box that requires manual KODI start anyways.

advancedsettings.xml:

The advanced settings file has the <advancedsettings></advancedsettings> tags at the beginning and end of the file and below is an example of what the advancedsettings.xml should look like. This file is very fickle and it has a lot of options it can take. Use the example below as a starting point.

<videodatabase> and <musicdatabase> point to an sql instance via the IP address username and password. Default port for sql is always 3306.

Also if you want to pause and resume your playback at different locations in your home, include the <importwatchedstate> and <importresumepoint> tags and set them to true under the <videolibrary> tag. Under the same tag <backgroundupdate> updates the library without any popups of notifications. <recentlyaddeditems> sets the amount of new items that will be visible under the TV Shows and Movies sections. Default I believe is 25, you can set this to whatever.

In version 17+ of KODI the cache tag is pretty important. If you are experiencing the odd buffering interruption while watching content from your file server set this option and have all content buffer.

In previous versions of KODI this option was set under the network tag. Sections 2.8.4 and 2.8.3 of the Advancedsettings.xml wiki, respectively.

Cache buffers the file in memory instead of the local storage. If you notice a lot of stutter on your streams, especially with version 17 if you add this sections the performance should greatly improve. Mind you if you have terrible internet and you are using external or http video sources there are no guarantees. If want to do this you will need to do some math first, use this bit calculator if you’d like, don’t trust google they mess the calculation and conversion up badly. But more on that later.

The cache section looks something like the following.

<cache>
<buffermode>1</buffermode>
<memorysize>477184000</memorysize>
<readfactor>10</readfactor>
</cache>

Buffer mode with value of 1 will cache any content streamed in KODI. Local or remote it doesn’t matter.

Memory size is where you will need to do some converting and calculating. So the max memory size depends on your system and this value can not exceed a third of your max free memory. So if your device is running while playing content with 300 MB of free memory your max memory size should be 100MB or 104857600 bytes. If you don’t adhere to the 1:3 ratio rule, there is a high probability that your box will crash.

Read factor is the speed at which the content gets buffered at or read into memory at. If a files average bit rate is 6MB/s, with a read factor of 10 the file will be read at 60MB/s into the cache buffer. Average bit rate multiplied by the read factor. Take your network bandwidth into consideration when calculating this. If not specified the default is 4.

For further details on the advancedsettings xml you can head over to the KODI wiki http://kodi.wiki/view/Advancedsettings.xml

File placement:

If you enabled SAMBA and SSH on your KODI device you can navigate to the Userdata share of the device and place both xml files there. Even though you don’t need both it is recommended that you do. The network name or IP will be required for you to navigate to the shared folder. You should have enabled SAMBA when you set up your KODI box. During said setup you gave the installation a name, if you kept it default navigating to \\LIBREELEC via file explorer should bring up the box’s shares.

Open up the Userdata folder and you should see some folders and 4 xml files.

Place both the XML files in here.

Alternatively you can SSH into your box using putty or similar software. Default user name is root and the password is libreelec.

Once in there you can use either vi or nano to create both the files and paste the contents. The location of where the file should be stored are as follows.

/storage/.kodi/userdata/

You can create the files manually by performing the following commands in SSH.

nano advancedsettings.xml

Then paste the contents of the file into the window and click ctrl + x, this will prompt you if you want to save the file, type in y and hit enter to confirm the file name.

Repeat the same for the sources file.

A very important step, you will need to set KODI to wait for the network when it boots if you are using a db connection. If you do not do this your library will not populate.

In your add-ons select the LibreELEC Configuration add on.

Then set the Wait for network… option and set it to 10 second. There has not been an instance where 10 seconds has not been enough for me.

Your KODI box should now be ready to go, reboot and enjoy.