Raspberry Pi: Difference between revisions
mNo edit summary |
|||
(156 intermediate revisions by 22 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{mininav|[[Devices]]}} | ||
{{device notice}} | |||
| | |||
}} | |||
[[File:Pi2ModB1GB_-comp.jpeg|320px|right]] | |||
== | {{forum link2|1=For more info and help, check out the [http://forum.kodi.tv/forumdisplay.php?fid=166 Kodi Raspberry Pi support forum]}} | ||
<section begin="intro" />The '''Raspberry Pi''', '''Raspberry Pi 2'''/'''3''' and '''Raspberry Pi Zero''' are a series of ARM-powered, credit card-sized single-board computers (developer boards) made in the UK by the non-profit Raspberry Pi Foundation organization for educational and hobbyist purposes. These low power computers are mass produced at very low prices and the high number of units sold gives it massive community support. As Kodi HTPC, all Raspberry Pis support full 1080p (Full HD) video playback of the most commonly used codecs, most if not all Kodi [[add-ons]], and have reasonably responsive GUI performance.<section end="intro" /> | |||
== Installing Kodi == | |||
{{Main|HOW-TO:Install Kodi on Raspberry Pi}} | |||
{{#lst:HOW-TO:Install Kodi on Raspberry Pi|install}} | |||
== | == Maximizing performance == | ||
<section begin="performance" /> | |||
{{note|Some of these tweaks are more aimed at the Pi 1 CPUs (A, B, A+, B+, Compute Module, Zero) as they only have a slow single-core CPU. Raspberry Pi 2/3 probably doesn't need some of these tweaks to run Kodi really well, but it also won't hurt anything, if you really want to push things to their limit.}} | |||
* Avoid "heavy" skins and lots of "service" type add-ons that run in the background. | |||
* Turn off RSS feeds and any scrolling text options for your skin. Depending on the skin/text, this can really boost a Pi 1, sometimes even a Pi 2/3. | |||
* Use an SD card with good rewrite speeds. The class of the SD card doesn't always mean it will be better, as that speed classification is for sustained reading and writing, whereas for Kodi, random read/write speeds are more important. | |||
::* [http://elinux.org/RPi_SD_cards#Working_.2F_Non-working_SD_cards Raspberry Pi only supports SDHC cards], apart from a few exceptions where the cards are marked as SDXL but maintain SDHC compatibility. | |||
::* [http://swag.raspberrypi.org/products/noobs-8gb-sd-card The class 6/8 Samsung SD cards sold on the Raspberry Pi Store] (the ones with NOOBS on them) typically have much better performance than many class 10 cards. | |||
::* Samsung "EVO" SD/mSD cards also have very excellent read/write speed for their price. | |||
::* For [http://www.raspberrypi.org/forums/viewtopic.php?p=53159 more information about SD card speeds, read this excellent thread on the R-Pi forum]. | |||
* You can also try a combination of SD and fast USB drive for your Kodi install, but with the recent software improvements even just using a good SD card is about as fast as using a fast USB drive. | |||
* | |||
[[ | * Avoid using wifi. If you do use wifi, use a wifi adapter that contains two antennae (internal or external) that advertises "300 Mbps". Otherwise, stick to wired ethernet, local USB drives, or ethernet-over-power devices (like Homeplug). | ||
[[ | |||
[[ | * If you are using wifi and it seems just on the edge of being fast enough, check out '''[[HOW-TO:Modify the video cache]]'''. | ||
[[ | |||
* Try using '''NFS''' file shares instead of SMB file shares. | |||
* [http://forum.osmc.tv/showthread.php?tid=6825 Try mounting network shares through OS rather than Kodi]. This allows more tweaking of filesystem options, like chosing UDP and larger block sizes. | |||
* [http://forum.kodi.tv/showthread.php?tid=199272 Overclock]. Most Pi's can handle a significant overclock, as long as they have a good power supply. There is no universal setting that will work for everyone (except for the default speed that you get without overclocking). Try various overclocking settings and run Kodi for a while to see if it's stable. If one group of overclocking settings causes crashes, try a group of lower settings. | |||
:: {{note|Overclocking is pretty important for the Raspberry Pi 1 (A, B, A+, B+) and Zero, but much less so on the Pi 2/3 due to the multiple CPU cores as well as increased speed per core. You can still overclock the Pi 2 if you really want to, but for most users it makes little difference.}} | |||
* By default, "Extract thumbnails from video files" (in '''Media Video Settings''') is disabled on the Pi, improving browsing performance. | |||
* For smoother video playback, enable "Adjust display refresh rate" in |playback settings | |||
* When using dvdplayer, "Sync playback to display" for sync method are recommended; see playback settings. | |||
* Make sure the video is using H.264 (up to High Profile — Hi10P will not work), or MPEG-4, or, if additional codecs have been enabled, MPEG-2 or VC-1. | |||
* Passthrough is recommended as it lowers CPU usage for DTS and AC3. Use '''audio passthrough''' if your TV/receiver supports it. | |||
* To determine which audio passthrough formats your HDMI-connected TV supports, you can log in via SSH and run this command: <code>/opt/vc/bin/tvservice a</code> (on LibreELEC: <code>tvservice -a</code>). | |||
* Feeling adventurous? [https://forum.kodi.tv/showthread.php?tid=298461 Check out the latest LibreELEC test builds], which often have even more speed improvements. Just remember that these builds can often be unstable! | |||
* For locally connected drives containing videos and music, the filesystem can have an impact on read and write speeds. NTFS for example tends to be much slower on any Linux-based system than the more native ext2, ext3, etc. | |||
* If you use [[MySQL]], you will want to make sure that your images are pre-cached using the '''[[Texture Cache Maintenance utility]] tool'''. Local libraries typically don't need this as their images are cached when videos are scanned in. Using MySQL can improve performance as the database queries are handled by another machine. | |||
* Organizing your movies in single folders for each movie, rather than all movies in one folder, is recommended. The individual folders reduce the time it takes for Kodi to look for supporting media like external subtitles, which makes browsing, scanning and starting playback a little faster. You might also want to consider pre-scraping the meta data using a Library manager to reduce the time it takes to scan in both movies and TV shows. | |||
* [http://forum.kodi.tv/showthread.php?tid=222498 For Raspberry Pi units with only 256MB of RAM, see this thread]. | |||
<section end="performance" /> | |||
== Remote controls == | |||
[[File:gpioir.png|right|250px|thumb|Wiring instructions for a TSOP4838 GPIO IR sensor.]] | |||
;GPIO IR receiver | |||
:Don't have a CEC TV or a smartphone remote? For less than a dollar/euro, you can add an IR receiver to your Raspberry Pi that works with most MCE and Apple remotes (and a few others). Most Kodi install options for the Pi should work with the GPIO IR out of the box, or by enabling a setting from within Kodi. Go to a local electronics store or search on eBay for "<code>TSOP4838</code>" and use some simple jumper wires (or solder the pins directly, if you wish). ''<small>(We need a link to a good, up to date GPIO IR guide. Most of the links I found are outdated and contain instructions for additional configurations that are no longer required. If you find a good link/guide, please add it to the wiki.)</small>'' | |||
:If you are using '''[[LibreELEC]]''', just add this to your config.txt file ''(full help page '''[[LE:Guide_To_lirc_rpi_GPIO_Receiver|here]]''')'': | |||
::<pre>dtoverlay=lirc-rpi</pre> | |||
:The default GPIO pin used is 18. This can be changed by using the following | |||
::<pre>dtoverlay=lirc-rpi,gpio_in_pin=18</pre> | |||
:Where <code>pin=18</code> would be changed to whatever GPIO pin number you would rather use. | |||
:If you are using '''[[OSMC]]''', your remote will probably work out of the box. If it doesn't, go to My OSMC -> Remotes and select your desired remote. There is also [https://osmc.tv/store/product/osmc-remote-control/ an official OSMC remote] which also works on other distributions. | |||
;CEC | |||
:If your TV supports '''CEC''', you should be able to use the remote control that came with your TV to control Kodi. The remote control signals are sent over the HDMI cable and most often don't require any further settings or configuration. | |||
;MCE remote controls | |||
:Various '''MCE''' USB receivers and remotes will work on the Pi. | |||
;[[Keyboard controls]] and mice | |||
:Any keyboard such as wired, wireless, bluetooth. This includes remotes that are seen as keyboards, such as Rii remotes, the Mele F10-Pro remote, or the (very awesome) '''[[FLIRC]]'''. | |||
;Smartphone/tablet remotes | |||
:Use your smartphone or tablet as a remote control. | |||
;Web interfaces | |||
:Control Kodi from anything that has a web browser. | |||
{{-}} | |||
== Further reading == | |||
* [http://raspberrypi.org RaspberryPi.org] | |||
* [http://elinux.org/RaspberryPiBoard Raspberry Pi Hub Wiki] | |||
* [http://lea-linux.org/documentations/Raspberry_Pi Raspberry Pi French Wiki] | |||
* [[Wikipedia:Raspberry Pi]] | |||
== Random notes == | |||
{{large|''Feel free to place various notes, tips, and links here. As this section of the wiki gets more organized, those notes will be properly sorted. Consider this like a dumping ground for when you're not sure where to put something.''}} | |||
* Notes for using a Pi with a GPIO touch screen: | |||
** http://forum.kodi.tv/showthread.php?tid=222880&pid=2000331#pid2000331 | |||
** http://markamc.traki-iski.co.uk/raspberry-pixbian-egalax-touchscreen/ | |||
** http://arendwierks.blogspot.nl/p/touchscreen-fix-raspberry-pi-xbmc-kodi.html | |||
* Add-on for turning off the HDMI port when idle: https://github.com/timker/kodi.screensaver.pimon | |||
* How to enable and configure onboard Wi-Fi and bluetooth: https://www.digikey.com/en/maker/blogs/raspberry-pi-3-how-to-configure-wi-fi-and-bluetooth/03fcd2a252914350938d8c5471cf3b63 | |||
{{Updated|17}} |
Latest revision as of 04:18, 28 July 2020
![]() |
![]() |
![]() |
![]() |
These pages are maintained by the community and should not be considered an endorsement or recommendation. Device pages are made when there's a bunch of useful information for a particular device, and someone takes the time to make that page. Keep in mind, some devices simply don't need a page of specific information, but are still excellent devices. * |
![]() |
For more info and help, check out the Kodi Raspberry Pi support forum |
The Raspberry Pi, Raspberry Pi 2/3 and Raspberry Pi Zero are a series of ARM-powered, credit card-sized single-board computers (developer boards) made in the UK by the non-profit Raspberry Pi Foundation organization for educational and hobbyist purposes. These low power computers are mass produced at very low prices and the high number of units sold gives it massive community support. As Kodi HTPC, all Raspberry Pis support full 1080p (Full HD) video playback of the most commonly used codecs, most if not all Kodi add-ons, and have reasonably responsive GUI performance.
Installing Kodi
- Easy / Kodi centric distributions
- OSMC - Home Installing • Wiki • Support Forum
- XBian - Installing • FAQ • Starters guide • Forum
- Advanced / can be used with Kodi
Note that Arch ARM provides different Kodi packages optimized for different RPi models. All builds offer some flavor of HW accelerated decoding just like LibreELEC. The following packages will supply the current stable version of Kodi:
kodi-rpi for RPi 3/4/400
kodi-rpi-legacy for RPi 2
Users wanting to track the master branch may select:
kodi-rpi-git for RPi 3/4/400 only
- Batocera Linux - Learn More
- Buildroot - For experienced users only !
- CarPC - Guide
- Raspberry Pi OS - Up-to-date versions (Currently Leia 18.7) of Kodi are now on the default Raspbian repositories. See full guide here.
- Recalbox - Installing
Maximizing performance
Note: Some of these tweaks are more aimed at the Pi 1 CPUs (A, B, A+, B+, Compute Module, Zero) as they only have a slow single-core CPU. Raspberry Pi 2/3 probably doesn't need some of these tweaks to run Kodi really well, but it also won't hurt anything, if you really want to push things to their limit.
- Avoid "heavy" skins and lots of "service" type add-ons that run in the background.
- Turn off RSS feeds and any scrolling text options for your skin. Depending on the skin/text, this can really boost a Pi 1, sometimes even a Pi 2/3.
- Use an SD card with good rewrite speeds. The class of the SD card doesn't always mean it will be better, as that speed classification is for sustained reading and writing, whereas for Kodi, random read/write speeds are more important.
- Raspberry Pi only supports SDHC cards, apart from a few exceptions where the cards are marked as SDXL but maintain SDHC compatibility.
- The class 6/8 Samsung SD cards sold on the Raspberry Pi Store (the ones with NOOBS on them) typically have much better performance than many class 10 cards.
- Samsung "EVO" SD/mSD cards also have very excellent read/write speed for their price.
- For more information about SD card speeds, read this excellent thread on the R-Pi forum.
- You can also try a combination of SD and fast USB drive for your Kodi install, but with the recent software improvements even just using a good SD card is about as fast as using a fast USB drive.
- Avoid using wifi. If you do use wifi, use a wifi adapter that contains two antennae (internal or external) that advertises "300 Mbps". Otherwise, stick to wired ethernet, local USB drives, or ethernet-over-power devices (like Homeplug).
- If you are using wifi and it seems just on the edge of being fast enough, check out HOW-TO:Modify the video cache.
- Try using NFS file shares instead of SMB file shares.
- Try mounting network shares through OS rather than Kodi. This allows more tweaking of filesystem options, like chosing UDP and larger block sizes.
- Overclock. Most Pi's can handle a significant overclock, as long as they have a good power supply. There is no universal setting that will work for everyone (except for the default speed that you get without overclocking). Try various overclocking settings and run Kodi for a while to see if it's stable. If one group of overclocking settings causes crashes, try a group of lower settings.
- Note: Overclocking is pretty important for the Raspberry Pi 1 (A, B, A+, B+) and Zero, but much less so on the Pi 2/3 due to the multiple CPU cores as well as increased speed per core. You can still overclock the Pi 2 if you really want to, but for most users it makes little difference.
- By default, "Extract thumbnails from video files" (in Media Video Settings) is disabled on the Pi, improving browsing performance.
- For smoother video playback, enable "Adjust display refresh rate" in |playback settings
- When using dvdplayer, "Sync playback to display" for sync method are recommended; see playback settings.
- Make sure the video is using H.264 (up to High Profile — Hi10P will not work), or MPEG-4, or, if additional codecs have been enabled, MPEG-2 or VC-1.
- Passthrough is recommended as it lowers CPU usage for DTS and AC3. Use audio passthrough if your TV/receiver supports it.
- To determine which audio passthrough formats your HDMI-connected TV supports, you can log in via SSH and run this command:
/opt/vc/bin/tvservice a
(on LibreELEC:tvservice -a
).
- Feeling adventurous? Check out the latest LibreELEC test builds, which often have even more speed improvements. Just remember that these builds can often be unstable!
- For locally connected drives containing videos and music, the filesystem can have an impact on read and write speeds. NTFS for example tends to be much slower on any Linux-based system than the more native ext2, ext3, etc.
- If you use MySQL, you will want to make sure that your images are pre-cached using the Texture Cache Maintenance utility tool. Local libraries typically don't need this as their images are cached when videos are scanned in. Using MySQL can improve performance as the database queries are handled by another machine.
- Organizing your movies in single folders for each movie, rather than all movies in one folder, is recommended. The individual folders reduce the time it takes for Kodi to look for supporting media like external subtitles, which makes browsing, scanning and starting playback a little faster. You might also want to consider pre-scraping the meta data using a Library manager to reduce the time it takes to scan in both movies and TV shows.
Remote controls
- GPIO IR receiver
- Don't have a CEC TV or a smartphone remote? For less than a dollar/euro, you can add an IR receiver to your Raspberry Pi that works with most MCE and Apple remotes (and a few others). Most Kodi install options for the Pi should work with the GPIO IR out of the box, or by enabling a setting from within Kodi. Go to a local electronics store or search on eBay for "
TSOP4838
" and use some simple jumper wires (or solder the pins directly, if you wish). (We need a link to a good, up to date GPIO IR guide. Most of the links I found are outdated and contain instructions for additional configurations that are no longer required. If you find a good link/guide, please add it to the wiki.)
- If you are using LibreELEC, just add this to your config.txt file (full help page here):
dtoverlay=lirc-rpi
- The default GPIO pin used is 18. This can be changed by using the following
dtoverlay=lirc-rpi,gpio_in_pin=18
- Where
pin=18
would be changed to whatever GPIO pin number you would rather use.
- If you are using OSMC, your remote will probably work out of the box. If it doesn't, go to My OSMC -> Remotes and select your desired remote. There is also an official OSMC remote which also works on other distributions.
- CEC
- If your TV supports CEC, you should be able to use the remote control that came with your TV to control Kodi. The remote control signals are sent over the HDMI cable and most often don't require any further settings or configuration.
- MCE remote controls
- Various MCE USB receivers and remotes will work on the Pi.
- Keyboard controls and mice
- Any keyboard such as wired, wireless, bluetooth. This includes remotes that are seen as keyboards, such as Rii remotes, the Mele F10-Pro remote, or the (very awesome) FLIRC.
- Smartphone/tablet remotes
- Use your smartphone or tablet as a remote control.
- Web interfaces
- Control Kodi from anything that has a web browser.
Further reading
Random notes
Feel free to place various notes, tips, and links here. As this section of the wiki gets more organized, those notes will be properly sorted. Consider this like a dumping ground for when you're not sure where to put something.
- Notes for using a Pi with a GPIO touch screen:
- Add-on for turning off the HDMI port when idle: https://github.com/timker/kodi.screensaver.pimon
- How to enable and configure onboard Wi-Fi and bluetooth: https://www.digikey.com/en/maker/blogs/raspberry-pi-3-how-to-configure-wi-fi-and-bluetooth/03fcd2a252914350938d8c5471cf3b63