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"

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.)
  • 12.0~git20130102.7a6cb7f-1: Frodo RC 3.
  • 12.0~git20121219.74b907c-1: Frodo RC 2.
  • 11.0~git20121114.25bb46a-1: Frodo Beta 1. This includes a database schema upgrade, so make sure to backup your userdata folder before upgrading.
  • 11.0~git20121027.99da926-1: Fixes the issue of the last few seconds of video being cut off.
  • 11.0~git20121018.ff434fe-1: Upgrading to this version will probably result in the GUI resolution being zoomed as described in this forum post. To fix this edit userdata/guisettings.xml and remove the contents of the <resolutions> element.
  • 11.0~git20120804.efef226f-1
  • 11.0~git20120728.365953fb-4: Initial release

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 Gotham 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

  • 13.2~git20140719.6d3bb09-1: Gotham 13.2 Beta 2
  • 13.1-1: Gotham 13.1
  • 13.1~git20140525.4410736-1: Gotham 13.1 RC 1
  • 13.0r2-1: Gotham 13.0 release
  • 13.0~git20140426.2372235-1: Gotham RC 1
  • 13.0~git20140418.482ccd3-1: Gotham Beta 4
  • 13.0~git20140328.2dcc855-1: Gotham Beta 3 (same firmware requirements as Beta 2)
  • 13.0~git20140315.a1cab7a-1: Gotham Beta 2 (this requires newer firmware, my archive includes packages as of 20140319)
  • 13.0~git20140303.128426f-1: Gotham Beta 1
  • 13.0~git20140218.6e16f0f-1: Gotham Nightly 2014/02/18
  • 13.0~git20131231.8eb49b3-1: Gotham Alpha 11
  • 13.0~git20131201.27834c6-1: Gotham Alpha 10

Trackback URL for this post:

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

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!

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.

USB Sound Card

It is not possible to get an USB audio card working with the default XBMC build. You can try a build from http://forum.xbmc.org/showthread.php?tid=176043 and install it on Raspbian. I have installed it on Raspbian and can use my audio card in XBMC. Also if you have a audio card it is required to use XBian, RaspBMC or OpenElec instead of the default Raspbian.

Pingback

[...] (Raspbian mit XBMC) Retro-Gaming-Station (RetroPie) Webserver (Apache) AirPrint Server (mit CUPS – Anleitung) [...]

13.2 beta 2 working great

Thanks for Gotham 13.2 Beta 2, it's working great !

Pingback

[...] /etc/default/xbmc sudo sed -i 's/USER=xbmc/USER='"$USER"'/g' /etc/default/xbmcRef: http://michael.gorven.za.net/raspberrypi/xbmc Raspberry Pi, Raspbian, Softwarescript, XBMCYou might also likeAdd Shutdown option to XBMC in [...]

vnc

Hi Michael, thank you so much for sharing this! I'm running Raspbian headless at the moment (SSHing in my home network as I don't have a spare screen right now), and using tightvnc works fine. However I have no idea how to run xbmc "from a VT (i.e. not under X)" using vnc. I'd be grateful if somebody could give me a brief hint!

cheers, mo

I highly doubt that XBMC will

I highly doubt that XBMC will run under VNC, since it requires OpenGL and accesses the display directly on the Pi.

vnc

hm, that's a pitty! Still - thanks for your quick response!

vnc - update

In case anybody else is interested in this: I've made some progress following this thread: http://www.raspberrypi.org/forums/viewtopic.php?f=67&t=49707&sid=5e2142b... Note that at it's end there is a git repository mentioned. I've got the vnc server running, and logging in from my android works to some degree. cheers

Problem with starting

Hi,

I've done everything, but the xbmc does not start.

Log: https://www.dropbox.com/s/4ca3dwcnxke0uo2/Screenshot%202014-07-10%2021.4...

If you have any idea please send me a message: sandrosdj @ hotmail. com

XBMC dvdplayer

I think dvdplayer is missing in your builds. Can you please add it in the next build? Thanks

Packages with unmet dependencies at installation

Hi Michael Thanks a lot for your work. I'm getting an error message when I try to install: "The following packages have unmet dependencies: xbmc : Depends: xbmc-bin (>= 2:11.0~git20120510.82388d5-1) but it is not going to be installed Depends: xbmc-bin (< 2:11.0~git20120510.82388d5-1.1~) but it is not going to be installed E: Unable to correct problems, you have held broken packages." Could you please help? Hugo

I retried and it worked

I retried and it worked

Graphic problems

Same graphic problems here for me.

Graphic problems

Sorry, now I've read comments below.

graphic problems :-/

Hi followed this guide on a fresh and up2date system.

The installation was no problem and after starting with "xbmc-standalone", I see the main menu.

That works - but when I start selecting something in the menu - e.g. "System" - the screen starts "blinking": It is shown in 3 different "variants", the cursor is gone. Sometimes it's possible to go back to the main menu with a combination of "Esc", "Left" and "Right", but in most cases, I have to pull the power plug :-(

So, two questions:

  1. is there something like "CTRL + C" for xbmc? ;-)

  2. The more important question: What is wrong with my installation?

Thanks in advance, RoCMe

Waste of keyboard

What a waste of keyboard... when you could just scroll down and read a little to find the answer for your problem...

*shame.on.me*

Sorry, I didn't see :-( Now it works!

libcec 2.13 packages

There's some sort of regression lurking in libcec 2.14 that results in the remote getting ignored after a while. 2.13 worked fine, and there are some patches for RPis waiting to be merged at https://github.com/Pulse-Eight/libcec/pull/29 too. Could you keep serving 2.13 in your repo for those of us with issues?

Thanks for the report. I've

Thanks for the report. I've put libcec 2.1.3 back into contrib, and added 2.1.4 to unstable.

5.1 FLAC audio

Hi Michael, After upgrading to 13.1 5.1 FLAC audio in mkv files stop woking.

Thanks, Marcin

XBMC Scaling of 3d sbs movies in 2d mode

Hi Mike, thanks for the work you put into this, it allowed me to get my piface control and display working with xbmc finally :D I started up a movie that is 3d half side-by-side and chose to view it in 2d. The image is halved to show only the left or right eye which makes sense, however, with openelec and raspbmc it stretches it to the correct aspect ratio to fill the screen. Do you have any insight to how i can make this happen with your build of xbmc? Thanks

Maybe it's not XBMC.....

Upon doing a little more digging I understand that xbmc on the rpi uses omxplayer to playback content within xbmc. So I'm thinking openelec has a custom build of omxplayer that has code in place to account for the scaling of sbs/ou 3d files. If anyone has any insight please let me know if I am on the right track. Thanks

Pulseaudio

Hi Michael,

Thank you for the latest release. It works perfectly apart from pulseaudio which is not detected in the audio output settings. Could you please test it and confirm whether it is supported or not?

Thanks.

jessie

on raspbian jessie i have these errors :(

xbmc: Depends: xbmc-bin (> = 2:13.1-2) but it is not going to be installed          Depends: xbmc-bin (<2:13.1-2.1 ~) but it is not going to be installed          Recommends: python-qt3 but it is not installable          Recommends: samba-common-bin but it is not going to be installed E: Unable to correct problems, you have held broken packages.

I haven't looked at building

I haven't looked at building XBMC for jessie. The wheezy packages are unlikely to work on jessie.

Screen flickering

After updating to V13.1 I too have bad screen flickering and text overlay. This version is completely usable to me on my raspi. Hope there will be a fix soon.

when screen flickering, set gpu_mem to 128

Hi,

I also had problems with screen flickering in 13.1. Setting gpu_mem=128 helped. Now 13.1 works fine.

Love u!

My gpu mem was on default 64. Did what you said. XBMC works like a charm now!

For me the same. I set

For me the same. I set gpu_men=128 and XBMC works perfectly. Nice work, Thank you!

The same

Hi :) It's the same for me, flickering and a noise sound with the 2:12.3.2 :s

I tried with the version 2:12.3.1 and the problem does not appear and XBMC is realy so good :)

Have a good day :)

Is your firmware up to date?

Is your firmware up to date?

Ok I completely removed xbmc

Ok I completely removed xbmc and all the relevant packages with autoremove. Then updated firmware to 3.12.22+. Installed V13.1 as instructed above. Still screen flickering...

Kernel version

My kernel version is: Linux raspberrypi 3.12.21+ #689 PREEMPT Wed Jun 11 21:45:12 BST 2014 armv6l GNU/Linux