XBMC for Raspberry Pi

This page describes how to install XBMC on a Raspberry Pi running Raspbian. You can either install packages on an existing Raspbian installation, or you can download a prebuilt image and flash it to an SD card.

Installing packages on an existing installation

I've published a Debian archive containing packages for XBMC and some dependencies which it requires. This can be setup on an existing Raspbian installation (including the foundation image).

Installing

The easiest way to install the package is to add my archive to your system. To do this, store the following in /etc/apt/sources.list.d/mene.list:

deb http://archive.mene.za.net/raspbian wheezy contrib

and import the archive signing key:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5243CDED

Then update the package lists:

sudo apt-get update

You can then install it as you would with any other package, for example, with apt-get:

sudo apt-get install xbmc

The user which you're going to run XBMC as needs to be a member of the following groups:

audio video input dialout plugdev tty

If the input group doesn't exist, you need to create it:

addgroup --system input

and setup some udev rules to grant it ownership of input devices (otherwise the keyboard won't work in XBMC), by placing the following in /etc/udev/rules.d/99-input.rules:

SUBSYSTEM=="input", GROUP="input", MODE="0660"
KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"

The GPU needs at least 96M of RAM in order for XBMC to run. To configure this add or change this line in /boot/config.txt:

gpu_mem=128

You will need to reboot if you changed this value.

Running

To run XBMC, run xbmc-standalone from a VT (i.e. not under X). XBMC accesses the display directly and not via Xorg.

If you want XBMC to automatically start when the system boots, edit /etc/default/xbmc and change ENABLED to 1:

ENABLED=1

You also need to set the user which XBMC should run as (the xbmc user is not automatically created at the moment). Run sudo service xbmc start to test this.

Release history

  • 13.1-2: Link to libshairplay for better AirPlay support.
  • 13.1-1: Gotham 13.1 release.
  • 12.3-1: Frodo 12.3 release.
  • 12.2-1: Frodo 12.2 release.
  • 12.1-1: Frodo 12.1 release. Requires newer libcec (also in my archive).
  • 12.0-1: Frodo 12.0 release. This build requires newer firmware than the raspberrypi.org archive or image contains. Either install the packages from the raspberrypi.org untested archive, the twolife archive or use rpi-update. (Not necessary as of 2013/02/11.)

Flashing an SD card with a prebuilt image

I've built an image containing a Raspbian system with the XBMC packages which you can download and flash to an SD card. You'll need a 1G SD card (which will be completely wiped).

Flashing

Decompress the image using unx:

% unxz raspbian-xbmc-20121029.img.xz

And then copy the image to the SD card device (make sure that you pick the correct device name!)

% sudo cp xbmc-20121029-1.img /dev/sdb

Customising

The image uses the same credentials as the foundation image, username "pi" and password "raspberry". You can use the raspi-config tool to expand the root filesystem, enable overclocking, and various other configuration tasks.

Updating

Both Raspbian and XBMC can be updated using normal Debian mechanisms such as apt-get:

# sudo apt-get update
# sudo apt-get dist-upgrade

Release history

Unstable versions

I've started building packages for the upcoming Helix release. These are in the new unstable section of the archive. To install these packages update your source list to look like this:

deb http://archive.mene.za.net/raspbian wheezy contrib unstable

Release history

  • 14.0~git20141002.d2a4ee9-1: Helix 14.0 Alpha 4

Trackback URL for this post:

http://michael.gorven.za.net/trackback/1498

Setting up alternative controller - XBMC remote and/or USBgamepa

Hi!!

Excellent binary source- I was up and running in no time. I have one little problem... I have no keyboard at the moment (just laptops). I've attempted to turn on the webserver controls manually (guisettings.xml) but the official XBMC remote can't find the XMBCpi server. I also have a USB SNES controller I use with RetroPie. I'd love if I could utilize it with XBMC. However, I can't tell if simple keymapping a keymap.xml will work for this (I suspect it will).

Any thoughts? Has anyone else had problems with the xbmc remote?

Anyone else using the snes usb controller for retropie here?

Thank you again!!

Remote working now, keyboard/mouse necessary Audio problems

Looks like I got the remote working now- it required keyboard/mouse to interface with the xbmc software. (borrow from a friend). I was surprised to see I couldn't edit the config files directly- I may have missed something (they were changed using sudo nano- but didn't matter to the system!). But- after using keyboard and mouse, I have remote on iphone using the official app working.

However, now, my problem is I'd prefer to use headphone jack out rather than hdmi... so a new series of problems. I appear to only have left-channel output right now, no stereo. I set the output using amixer cset numid=3 1 which didn't appear to work for quite some time, but rebooting appears to have solved the problem... then within xbmc, I noticed that xbmc hits the hardware directly... so I had to set it within settings to use analag output rather than HDMI. No matter what setting I choose in XBMC, it appears analog is stuck on left only. :( I can't confirm if it's on left only in the command line- so I'm turning there next.

Any comments regarding audio setup with raspbian and xbmc, I'd love to hear about! Thank you!!

(web interface using chrome to the web device also works, as well as the official xbmc app)

Thank you. and a tiny problem (picture larger than screen)

First of all I would like to thank you. followed your instructions, installed, updated, rebooted and it works well with all the fonts ant etc. (before I updated and rebooted , there was problem in fonts - it displayed quadrants instead of letters and screen was flicking all the time) . The only issue I have is that a display a bit larger then the screen . I tried to adjust it in settings but unsuccessfully.

all ok.

did it through video settings in xbmc itself. works like a charm :) thanks again ( besides the exit part) .

Try adding the following line

Try adding the following line to /boot/config.txt and rebooting:

disable_overscan=1

did it - the resault is the same

and from some reason now it get stuck on exit and I need to force reboot by unpluging the power

Only exit on the menu

Hi, I ENABLED=1 in /etc/default/xbmc and it runs fine. However when I want to powerdown or reboot the pi, the menu options are missing - it only shows me Exit, while the menu options are then if I log in as PI and run XBMC-Standalone I see the extra menu items fine. XBMC seems to be running as user PI when it runs automatically

White Light Lines ad Border of Movie's

I'am getting Light shining Lines at the Borders of the movies I watch. Anyone else had that Problem? How can I solve it?

Keyboard does not work for search

The keyboard seems to work everywhere except when a text entry box has popped up. Searching for a file by its name would be a good example of this. Everywhere else the keyboard is working as it should though.

Airplay video IOS 8

Hi, thanks for your work Michael

Do you think you will be able to post a release including the fixes for Airplay video support with IOS 8 ?

Laurent

Stuck

Realised I was still on 2.12 and apt-get update doesn't seem to be working.

Removed xbmc and tried from scratch, but for some reason apt-get is convinced 2.12 is the latest? Any ideas?

$ sudo apt-get install xbmc Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: xbmc-bin The following NEW packages will be installed: xbmc xbmc-bin 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 30.5 MB of archives. After this operation, 63.7 MB of additional disk space will be used. Do you want to continue [Y/n]? Err http://archive.mene.za.net/raspbian/ wheezy/contrib xbmc-bin armhf 2:12.2-1 404 Not Found Err http://archive.mene.za.net/raspbian/ wheezy/contrib xbmc all 2:12.2-1 404 Not Found Failed to fetch http://archive.mene.za.net/raspbian/pool/contrib/x/xbmc/xbmc-bin_12.2-1_... 404 Not Found Failed to fetch http://archive.mene.za.net/raspbian/pool/contrib/x/xbmc/xbmc_12.2-1_all.deb 404 Not Found E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

12.2, not 2.12 I mean.

12.2, not 2.12 I mean.

the installation has deleted some important packages

How can I control what packages the installation will remove?

I have a distro of Rasbian wiht Gambas3. And the command : sudo apt-get install xvmc Delets the following packages which I need: Gambas3 , fonts-dejavu-core and more

Dont you need to increase GPU

Dont you need to increase GPU mem? If so you should add a note.

Where can i find the source. Its working fine for me so far and i am wondering why i should use openelec anymore :D Thats just great man! A bit more documentation/source would be nice though :)

(and an email notification about new comments/answers)

I thought I had mentioned

I thought I had mentioned that, but seems that I hadn't; thanks. OpenELEC is probably a bit more polished and has additional functionality or improvements, this is pretty much plain XBMC.

LIRC support? Raspbian-settings?

Hi, firstly, thanks for your work Michael, its so good that we able to install xbmc this way.

My question is: Is it possible that in tha latest stable gotham version (im on: deb http://archive.mene.za.net/raspbian wheezy contrib) there is no raspbian-settings addon in PROGRAMS section?

Anyway....im not found it in frodo 12.3 either, so i made a dist-upgrade and now im on gotham, but there is no luck, still not found raspbian-settings.

There is no addon named this, so i unable to enable LIRC.

What am i doing wrong? I missed something..?

Thanks a lot! Viktor

This build doesn't have any

This build doesn't have any additional functionality, the addon you're referring to is probably provided as part of RaspBMC. It doesn't look like LIRC support has to be specifically enabled, so it should be available.

Pingback

[...] http://michael.gorven.za.net/raspberrypi/xbmc Posted in: How-To ⋅ Tagged: KODI, [...]

Airplay

Thanks a lot for your work! Installation and everything went fine.

I tried airplay however (Settings->Enable Airplay) but it is not detected by the two iDevices I have whereas an android device detects the wi-fi reader (surely a different protocol such as UPnP). Both iPad and iPhone are up to date (ios 7.1.2).

Anyone has the same issue? Is it necessary to install a deamon (avahi-daemon) to handle airplay?

Thanks in advance for any help.

Alex

With a fresh install of

With a fresh install of raspbian and xbmc, avahi-daemon is not installed. It is mandatory for airplay to be detected. With a quick :

sudo apt-get install avahi-daemon

the problem is fixed.

Alex

Gotham 13.2 beta 2 hdmi no signal

after play video for some time (i think 20 minutes?) hdmi signal would stop and tv displays "no signal"... i don't think i have enabled power save tho. even if power save was enabled, why would it activate power save mode when video is playing? thx

I had this problem too. I

I had this problem too. I think its firmware-related, downgrade to earlier kernel fixed this for me, now im on somewhat 3.10.** now

[HELP] Broken packages held - Errors

pi@raspberrypi ~ $ sudo apt-get install xbmc Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: xbmc : Depends: xbmc-bin (>= 2:11.0~git20120510.82388d5-1) but it is not installable Depends: xbmc-bin (< 2:11.0~git20120510.82388d5-1.1~) but it is not installable Recommends: python-qt3 but it is not going to be installed E: Unable to correct problems, you have held broken packages.

followed instructions and the

followed instructions and the same thing happened to me

[HELP] Broken packages held - Errors

You may forget to add to source list or apt-get update

  1. Add this line into /etc/apt/sources.list deb http://archive.mene.za.net/raspbian wheezy contrib
  2. sudo apt-get update
  3. sudo apt-get xbmc

Won't play MP4 video, mouse issues

I installed on Raspbian according to these directions.

If I run

xbmc file.mp4

or

xbmc-standalone file.mp4

the file does not play. In both cases, I see xbmc running fullscren. In fact, the application is slightly larger than fullscreen, and some of the text is clipped.

I used the mouse to navigate the application. Sometimes, the mouse becomes frozen, and other times, I see multiple mouse cursors. If I click on "Files", I get a dialog, but I can't choose anything from it.

h264 encoded video files not playing

i have the exact same issue. unable to play h264 (mpeg4 part 10) encoded video files. (but they do play in omxplayer)

mpeg4 part2 encoded files are playing ok though.

libcec 2.1.4 in contrib

Hey,

any news on that? 2.1.4 is now available in raspbian/jessie and remote control support is broken again on the Pi. Too bad they don't build it with rpi support.

Thanks for this repo :)

Thanks for this repo :)
Will Kodi have another repo?

Pingback

[...] Có hai cách cài XBMC trên RaspBian, hoặc biên dịch từ file nguồn XBMC (mất hơn 12 giờ trên RPI), hoặc dùng gói đã biên dịch sẵn của Michael Gorven. [...]

Pingback

[...] to install it on top of the image I am already building. Back in 2012 I found a blog entry (found here) that seemed to be the easiest way possible to install XBMC with just a few [...]

Gotham 13.2 Beta 2 works

Gotham 13.2 Beta 2 works perfect!

Thanks for your work!

Pingback

[...] / Kodi (教程:http://michael.gorven.za.net/raspberrypi/xbmc ),然后用Yatse [...]

Pingback

[...] Pour installer dernière version d’XBMC (v13) (pour information XBMC sera renommé Kodi à partir de la version 14) je vous propose un excellent tutoriel que j’ai trouvé sur internet, et que je vais traduire en français et modifier un peu. L’article original sur lequel je me suis basé se situe ici [...]

RTMP

Is it possible to stream rtmp? Do I have to add addon? Any help would be greatly appreciate.

Thx

Im testing version 13.2 in

Im testing version 13.2 in unstable and no major problems so far. Looks good. Please push it to contrib.

Thanks

terminate called after

terminate called after throwing an instance of 'dbiplus::DbErrors' Aborted (core dumped) any idea about that crash?

/usr/bin/xbmc: 82: /usr/bin/xbmc: systemd-coredumpctl: not found
Crash report available at /home/pi/xbmc_crashlog-20140824_023124.log
terminate called after throwing an instance of 'dbiplus::DbErrors'
Aborted (core dumped)
/usr/bin/xbmc: 82: /usr/bin/xbmc: systemd-coredumpctl: not found
Crash report available at /home/pi/xbmc_crashlog-20140824_023140.log
terminate called after throwing an instance of 'dbiplus::DbErrors'
Aborted (core dumped)
/usr/bin/xbmc: 82: /usr/bin/xbmc: systemd-coredumpctl: not found
Crash report available at /home/pi/xbmc_crashlog-20140824_023204.log
XBMC has exited uncleanly 3 times in the last 55 seconds.
Something is probably wrong
Couldn't get a file descriptor referring to the console
Couldn't get a file descriptor referring to the console
Couldn't get a file descriptor referring to the console

can't update

i couldn't update from the version 12.3. i have changed the source code with this

deb <a href="http://archive.mene.za.net/raspbian" title="http://archive.mene.za.net/raspbian">http://archive.mene.za.net/raspbian</a> wheezy contrib unstable
and implemented
sudo apt-get update
sudo apt-get dist-upgrade
commands. however it does not update to gotham.

Gotham is in contrib now, so

Gotham is in contrib now, so you don't need to add unstable. What is the output of the apt-get commands?

problem was my sd card. i

problem was my sd card. i think it stuck at non-writable position. thank you.

Config.txt file location

Just wondering If anybody could tell me where the config file is I've looked everywhere

It is in /boot on the sd card

It is in /boot on the sd card

How to compile xbmc for pi

Thanks for providing xbmc package. It works well!! I flashed RetroPie 2.3 img and followed instructions in here to install xbmc.

Could you tell me how to compile xbmc for pi? I don't mind if it works either cross-compile or from pi.

Here is the reason why I'm asking you:

I'm using PS3 controller in emulationstation(sixad)(after appling [1]), but xmbc does not work with PS3 controller.

After enabling debug, I found that xbmc can receive event from PS3 controller in log file(keycode 29x ~ 30x in decimal) even though it looks like compiled with --disable-joystick. So, I like to put my custom keymap at CLinuxInputDevice so that xmbc can handle events from PS3 controller.

I read http://www.raspbian.org/RaspbianXBMC, but I think git://github.com/xbmc/xbmc-rbp.git is too old. So I haven't tried yet.

[1] https://github.com/petrockblog/RetroPie-Setup/wiki/Setting-Up-a-PS3-cont...

Problem when exiting xbmc

Hi, when I exit xbmc via the power off menu and the exit button, I get a black screen and xbmc.bin continues running in the background. I have to reboot my raspberry pi to kill xbmc. Is there a way to exit xbmc cleanly without having to reboot ?

Here is the crash report : http://pastebin.com/ztsL629e

Thank you!

Re: Problem when exiting xbmc

Hi,

I experienced the same problem. Try to run only "xbmc" instead of "xbmc-standalone". It still crashes sometimes when exiting, but it stops running in the background. Hope it helps!

Have the same issue

on exit , it just a black screen . although I can control my pi in ssh without need to restart . but it is not so convenient. I am using xbmc command to start

XBMC Black screen on exit...

It was suggested to run just "XBMC" instead of "XBMC-Standalone". How is this done?

Pingback

[...] window._wp_rp_static_base_url = 'https://wprp.zemanta.com/static/'; window._wp_rp_wp_ajax_url = "https://lordong.net/wp/wp-admin/admin-ajax.php"; window._wp_rp_plugin_version = '3.5.1'; window._wp_rp_post_id = '1558'; window._wp_rp_num_rel_posts = '5'; window._wp_rp_thumbnails = true; window._wp_rp_post_title = '%E6%A0%91%E8%8E%93%E6%B4%BE%E4%B8%8A%E5%AE%89%E8%A3%85XBMC%E5%B9%B6%E9%83%A8%E7%BD%B2PT%E4%B8%8B%E8%BD%BD'; window._wp_rp_post_tags = ['%E6%A0%91%E8%8E%93%E6%B4%BE', '%E4%B8%9C%E4%B8%9C%E5%8D%9A%E5%AE%A2', 'acceler', 'xbmc', 'hardwar', 'script', 'pt', 'input', 'render', 'graphic', 'a', '1', 'vi', 'instal', 'accept', 'opengl', 'keyboard']; window._wp_rp_promoted_content = true; .related_post_title { } ul.related_post { } ul.related_post li { } ul.related_post li a { } ul.related_post li img { display:none; }.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;} LorDong's Blog最永恒的幸福是平凡,最长久的拥有是珍惜« Win7下共享3G拨号网络给WIFI树莓派上安装XBMC并部署PT下载一直关注树莓派,最近在淘宝上买了一款刚刚升级的B+版本,UK出品主板230元,其它带风扇外壳、TF卡、无线网卡等合一起共计320元,想用来兼顾学习、高清播放器和下载机用的。官方系统下载要这里,“树莓派实验室”博客提供下载索引,我选择用Win32DiskImager来写IMG系统到TF卡,我下载的最新版是v0.9.5。先试了在Raspbian系统下安装XMBC,第一次搜到这个方法“树莓派系统(raspbian)安装XBMC的方法”,安装后运行时提示跟评论的一样“xbmc needs hardware accelerated opengl rendering. install an appropriate graphics driver.”,无法使用。然后在Twitter上提到这个,有推友说可能是源不对,后来又在“Install script for XBMC in Raspbian”找到了一个新的源和安装脚本,直接用脚本安装中间出错,一步步的安装并与安装原理网页对比发现有脚本有两处错误: 1. $USER=`awk -F: "/:$(id -u):/{print \$1}" /etc/passwd` // 本来想设变量USER为当前用户pi,语法有错 2. #Make keyboard work下面的两行执行后99-input.rules文件里字符内容的双引号没了,导致键盘不响应后来还是按安装原理网页逐一执行的,但运行起来后发现在XBMC里CPU经常占用100%,还动不动就卡死。现在是另找一个旧TF卡安装Raspbian系统用来学习,还给它部署了中文,方法见这里。原理是安装中文字库“sudo apt-get install ttf-wqy-zenhei”,再安装输入法“sudo apt-get install scim-pinyin”,然后运行scim激活输入法,再进入“sudo raspi-config”把默认语言改成“zh_CN.UTF-8”。新买的TF卡则直接安装Raspbmc系统,并部署成PT下载(自动识别NTFS分区): 1. 从官网下载Raspbmc系统img文件,在Windows下用Win32DiskImager写到TF卡上。 2. 进入系统先配置wifi,等系统自动安装完成,然后在另一台电脑上通过ssh连接到树莓派,因为不知道怎么退出正在运行的XBMC进入操作系统界面和执行ssh命令。 3. 在ssh远程终端先更新系统“sudo apt-get update”,发现如果不先做这一步的话直接安装transmission会出错。 4. 这个页面有比较详细的安装transmission方法,我把用来的命令大概说一下: sudo apt-get install transmission-daemon //安装软件 sudo /etc/init.d/transmission-daemon stop //安装后PT自动运行,配置之前先停掉 sudo vi /etc/transmission-daemon/settings.json //这里是配置文件,考虑到PT要部署防吸血,我多配了几步 dht-enabled改为false禁用DHT功能 download-dir改成/media/XXX/YYY,即外挂硬盘目录,XXX通常是分区标签,YYY是下载目录 encryption改为2强制加密,可以禁止迅雷等的吸血 peer-port改成对外开放的监听端口,路由器上做这个端口的转发就可以成为HighID用户 pex-enabled改为false禁用PEX功能 port-forwarding-enabled我改成true,因为我是通过路由器做端口映射的,但发现为false也能成为HighID rpc-username和rpc-password改成web登录的用户名和密码,密码先用明文,系统会自动加密 rpc-whitelist-enabled改成false,这样可以通过任何电脑通过web进行PT管理。 其它的看情况改,不熟悉的最好不要动。 5. 运行“sudo /etc/init.d/transmission-daemon reload”重新加载配置文件 6. 运行“sudo /etc/init.d/transmission-daemon restart”重新启用PT。这时应该可以在本地通过浏览器打开http://IP:9091登录进行PT管理了,如果想在局域网之外的地方管理PT下载,首先需要在路由器上对9091做端口映射,接着修改树莓派的防火墙添加开放的端口。默认情况下wan0进来的都是被禁的,这里是参考,下面两行之间加需要开放的端口: iptables -A INPUT -s $NETMASK -i $IFACE -j ACCEPT iptables -A INPUT -i $IFACE -j DROP比如我需要开放PT的端口是3456,则加下面几行: iptables -A INPUT -s $NETMASK -i $IFACE -j ACCEPT iptables -A INPUT -p tcp --dport 3456 -j ACCEPT // PT TCP iptables -A INPUT -p udp --dport 3456 -j ACCEPT // PT UDP iptables -A INPUT -p tcp --dport 9091 -j ACCEPT // PT WEB iptables -A INPUT -i $IFACE -j DROP重启树莓派和完全路由器端口映射后就大功告成了。相关日志CentOS下安装vim及配置 (0)iptables设置实例 (0)自建obfsproxy的速度还不错 (1)推荐一个开源的PHProxy (0)安装大型msi程序时出现Error 1718的解决办法 (0)标签: 树莓派 这篇文章发布于 2014年08月14日,星期四,11:36,归类于 东东博客。 您可以跟踪这篇文章的评论通过 RSS 2.0 feed。 您可以留下评论,或者从您的站点trackback。 留下回复 点击这里取消回复。 名称 (必须) 邮件地址(不会被公开) (必须) 网站 [...]

Network manager add on Incompatible

Anyone know how to fix this?

Says I require Network manager 0.9 included in XBMCbuntu

USB Sound Card

Has somebody made it work with a USB audio card? I have tried using Pulseaudio but it is not detected by XBMC.