Saturday, February 20, 2016

Install OSMC on Raspberry Pi2

Raspberry Pi 2 (RPI2) provides a flexible multimedia centre for movie streaming, watching youtube, using a web browser and options to addon many Linux applications. OSMC is one of the images that can be downloaded unto an RPI2 from osmc.tv (download page or FTP). This Debian Jessie based system is great at running the RPI2 and allow developers space to enhance to their needs.

The media player system KODI, provides an interface to multimedia contents such as movies, online TV, videos, photos and musics. KODI itself does not have any media contents, but due to its extensible nature, many developers have created plugins to access external contents and addons to extend its functionalities. Media contents could reside in the same device as KODI, in a local area network, stream from the internet or cached contents from internet. KODI 15 comes with the current OSMC.

* Consider OSMC as an upgrade of Raspbmc.

This is an update to previous post "Raspberry Pi: Getting Started with OSMC" and I do not expect it to go into too much details. When I mention OSMC, it might also refer to KODI as its typically the only screen seen when running this RPI2.

Step 1: Starting OSMC

Download OSMC image from raspberry.org and image copy the .img file to the blank SD card. Tools such as Win32 Disk Imager can be used for this purpose.

Plug SD card into RPI2 and start RPI2 (already have internet connection).

Automatically start installation process.


It will reboot once installed successfully.

Step 2: Basic configuration

The default layout uses OSMC skin. Below is the OSMC main menu screen. Default appearance is handled by the skin called OSMC.


 It shows the following options;
  1. Videos
  2. Music
  3. Pictures
  4. My OSMC
  5. Favourites
  6. Programs
  7. Settings
  8. Power

Configure Screen size

The screen display may appear outside of the screen area. Change the zoom size until everything meets your satisfaction. From OSMC home page, click Settings ->Appearance ->Skin. Choose your zoom level and press Esc key until back to OSMC main menu.


Configure Timezone

Configure the timezone for correct time display. Click Settings ->Appearance ->International. Choose your region and the OSMC time should be update instantly.

Configure Skin

Default skin OSMC can be changed to KODI's default skin called Confluence. From OSMC home page, click Settings ->Appearance ->Skin. Choose skin as confluence and press Esc key until back to OSMC main menu.

More notes from KODI website: Quick start guide, Home screen controls,

Step 3: Add Youtube addon

In Videos menu there is an option to link your Youtube account with OSMC. This allows viewing of all your Youtube channels. From the OSMC main menu, click Videos ->Video add-ons ->Get more... ->Youtube

Click Install

Click launch. (From the OSMC main menu, you can click Videos ->Video add-ons to watch Youtube).

Follow the instructions on screen.
One of this includes accessing youtube.com/activate on a PC to enter the code given by the add-on in OSMC.

Troubleshooting:

1. Mode Not Supported

If after installation process, RPI2 boots and screen displays a message "Mode Not Supported", it means the display resolution was not automatically detected correctly. This happens on one Samsung TV.

Solution:
SSH into the OSMC and edit  /boot/config.txt
See command line tips at Raspbian Command Line Basics 101

Updated file for mode CEA
gpu_mem_1024=256
hdmi_ignore_cec_init=1disable_overscan=1
start_x=1
hdmi_group=1
hdmi_mode=20
disable_splash=1
dtoverlay=lirc-rpi:gpio_out_pin=17,gpio_in_pin=18

ALTERNATIVE Updated file for mode DMT
overscan_top=16
hdmi_mode=4
gpu_mem_1024=256
overscan_right=24
force_turbo=0
over_voltage_sdram=0
config_hdmi_boost=4
disable_overscan=1
initial_turbo=0
start_x=1
hdmi_group=2
sdtv_aspect=0
overscan_bottom=16
overscan_left=24
disable_overscan=0
hdmi_force_hotplug=1
arm_freq=900
sdram_freq=450
core_freq=450
hdmi_ignore_cec_init=1
over_voltage=0

2. Youtube add-on errors/issue.

Successfully login after the 2 google app authorisation, but displays empty list and
Display error exceeded quota (of some sort)

Solution:
Step 1: Activate the Google API v3
All Google App requires API v3, as derived from forum posting #2904.

Login to your google developer account and enable the above API.

Step 2: Use your own browser key, Oauth id and secret.
Looks like the default developers combination of above does not allow too many to use it. In posting #2847.

Login to your google developer account and create the above. A new project is created if none is created yet.

The newly created info from above should be updated in the file login_client.py that is found in /home/osmc/.kodi/addons/plugin.video.youtube/resources/lib​/youtube/client/

Find the line as below and edit the key, id and secret values.

'youtube-for-kodi-15': {
            'system': 'Isengard',
            'key': 'The_browser_key',
            'id': 'The_oauth_id_.apps.googleusercontent.com',
            'secret': 'The_oauth_secret_word'
        },

Done