A quick blog on installing OpenElec XBMC on the Raspberry PI and the settings that worked best for me in terms of performance while still having a stable PI. Instructions are based on Raspberry PI 512 and a Windows PC for preparation.
Preparation
- Raspberry PI 512
- Decent SD Card (for OS Storage)
- Small USB Stick (for User Storage)
2. Do some more shopping, buy the MPG2 license from Raspberry Store
3. Download & install SDFormatter to PC, see here
4. Make sure SD Card is inserted in PC
5. Format SD Card with SDFormatter, make sure to name it System
6. Download MiniTool Partition Wizard Home Edition to PC, see here
7. Make sure USB Stick is inserted in PC
8. Erase USB Stick and Partition it with MiniTool Partition Wizard, type EXT4 and make sure to name it Storage
Installation
9. Download latest compiled OpenElec Image (R1*****.img.zip) from this location to PC
10. Download & install Win32DiskImager to PC
11. Make sure SD Card is inserted in PC
12. Start Win32DiskImager, write downloaded OpenElec Image to SD Card
13. With SD Card still inserted, check that its name is indeed System
14. With USB Stick still inserted, check that its name is indeed Storage
15. On the inserted SD Card open the cmdline.txt file
16. Find the line:
boot=/dev/mmcblk0p1 disk=/dev/sda1 ssh quiet17. Change it to:
boot=LABEL=System disk=LABEL=Storage ssh quiet18. Eject SD and USB from PC
19. Insert SD and USB in Raspberry
20. Connect Network Cable
21. Connect HDMI Cable to Raspberry and TV
22. Connect power to Raspberry
23. Raspberry boots
Configuration - Hardware
24. From PC ping OPENELEC, which is default hostname. Note the returned IP number
25. Install Putty or any other SSH Client
26. SSH into the Raspberry by connecting to the IP from step 22, Username = root, Password = openelec
26. By default the Flash folder is mounted Readonly, so for changing configfiles, this folder has to be remounted. Enter the following command in SSH:
mount -o remount,rw /flash27. Now open the config.txt file in VI by entering the following command in SSH:
vi /flash/config.txt28. Erase all lines from the file by entering in VI:
:1,$d29. Once the file is cleared, put VI into Insert mode by pressing I and enter the following lines:
gpu_mem=256
arm_freq=900
core_freq=333
sdram_freq=450
over_voltage=2
force_turbo=0
initial_turbo=30
decode_MPG2=<MPG key from step 2>
30. Press Escape to put VI back in to command mode. Save and exit VI by entering the following command:
:wq31. Now the hardware setup has been completed, the Flash folder can be remounted again in Readonly mode by entering:
mount -o remount,ro /flash32. All the harware configuration is done, the SD card could be write-procted by this time (many of them have a physical toggle). Time for some configuration.
Configuration - Hardware
33. Open VI to edit the guisettings.xml file, by entering the following command:
vi ~/.xbmc/userdata/guisettings.xml
34. Now put VI into Insert mode by pressing I and change the following entries in the <Services> section:
<services>
<airplay>true</airplay>
<airplaypassword></airplaypassword>
<devicename>Mediacenter</devicename>
<esallinterfaces>true</esallinterfaces>
<escontinuousdelay>25</escontinuousdelay>
<esenabled>true</esenabled>
<esinitialdelay>750</esinitialdelay>
<esmaxclients>20</esmaxclients>
<esport>9777</esport>
<esportrange>10</esportrange>
<upnpannounce>true</upnpannounce>
<upnprenderer>true</upnprenderer>
<upnpserver>false</upnpserver>
<useairplaypassword>false</useairplaypassword>
<webserver>true</webserver>
<webserverpassword>xbmc</webserverpassword>
<webserverport>80</webserverport>
<webserverusername>xbmc</webserverusername>
<webskin>webinterface.default</webskin>
<zeroconf>true</zeroconf>
</services>
35. Put VI back in command mode by pressing Esc and save and exit VI:
:wq
36. Once this file is saved, the webserver, eventserver and airplay services will be enabled.
37. Open VI once again to create a new file called advancedsettings.xml
vi ~/.xbmc/userdata/advancedsettings.xml
38. A new empty file is opened in VI. Put VI in insert mode by pressing I and enter the following entries:
<advancedsettings>
<network>
<cachemembuffersize>30242880</cachemembuffersize>
</network>
<fanartheight>540</fanartheight>
<thumbsize>256</thumbsize>
<gui>
<algorithmdirtyregions>3</algorithmdirtyregions>
<nofliptimeout>0</nofliptimeout>
</gui>
<lookandfeel>
<enablerssfeeds>false</enablerssfeeds>
</lookandfeel>
<bginfoloadermaxthreads>2</bginfoloadermaxthreads>
</advancedsettings>
39. Put VI back in command mode by pressing ESC and save the file by entering:
:wq40. Once this file is saved, the performance will be slightly better.
41. Start VI again by entering the following command in SSH:
vi ~/.xbmc/userdata/addon_data/os.openelec.settings/settings.xml42. Put VI in insert mode by pressing I, find the NET_HOSTNAME line and change it to the same as the devicename from step 34:
<setting id="NET_HOSTNAME" value="Mediacenter" />
43. Once again, put VI in command mode by pressing Esc and save/quit the file by entering:
:wq44. Now all configuration is done, it's time to reboot the Pi by entering:
reboot45. The PI should reboot and be back online in about a minute.
Configuration - GUI
46. In the meantime, download XBMCRemote to your ipad/iphone, android device
47. Once the PI has been rebooted, you should be able to add it as a host in XBMC Remote.
48. Once connected to the PI, you should be able to use the Remote Control within XBMCRemote to control the PI. Please click the ( i ) icon for guidance on using the Remote Control functionality
49. Go to XBMC's home screen and enter System.
50. Choose System again to enter the System configuration part of the GUI
51. Choose the topmost Video Output and make sure the resolution is set to the best mode your TV allows you to.
52. Go doen a few options and navigate to Video Calibration
53. Click on it and follow the Video calibration routine
54. Once completed, click the Return icon on the Remote Control to get back to the previous menu
55. In the left pane navigate to Audio output
56. In the right pane make sure the appropriate output has been selected
57. Make sure your speaker configuration matches the one of your receiver (or make sure your receiver does down/upmixing)
58. Select the appropriate AC3/DTS options
59. Navigate one step back to get into the System menu
60. Navigate to Add-ons
61. Pick Get Add-ons
62. Navigate to the Subtitles section and install XBMC subtitles
63. Once installed, configure the Subtitles addon by enabling the appropriate subtitle services
Configuration - Sources
64. Now everything is all set, it's time to define content sources so your content can be accessed by XBMC
65. Go back to XBMCs home screen and select Music or Videos
66. Choose Add files
67. Browse to the appropriate Network location, for example your Video share on your NAS and select it.
68. Click OK, define the type of content for your source and select OK
69. Let it scan all content so your library will be populated.
70. Repeat for all required content sources.
71. Good to go! This is probably a good time to make some backups.