Kodi: Difference between revisions

From 太極
Jump to navigation Jump to search
Line 214: Line 214:


== Rsync ==
== Rsync ==
https://forum.libreelec.tv/thread/1265-rsync/ It's in the libreelec repo under '''virtual network-tools''', bundled with a few other bits and bobs.
https://forum.libreelec.tv/thread/1265-rsync/ It's in the '''LibreELEC Add-ons''' -> '''Program add-ons''' -> '''Network-tools''', bundled with a few other bits and bobs.


== Youtube ==
== Youtube ==

Revision as of 12:29, 5 December 2022

Install on Raspberry Pi OS

sudo apt-get update
sudo apt-get install kodi

When it is launched, it will ask if we want to enable "version check" add-on. We can enable it. If we want to change mind, we need to go to Kodi -> Add-on -> Box icon on top-left corner. Install from repository -> Services and select "Version Check".

Some tips

  • When I use "htop" from another machine to check the memory usage when I watch pluto.tv, it uses 580MB.
  • Inputstream adaptive missing? sudo apt-get install kodi-inputstream-adaptive It works on my Kodi 19.
  • If I hit 'ESC' key, it will bring up a Kodi menu and put the video playing in the background. To go back to the video, hit the tab key. See Best Kodi Keyboard Shortcuts You Should Know in 2020.

Install to USB

  • On RPI 3B+, I can directly install Kodi/LibreElec to USB and boot from it.
  • On RPI 3B, it's a 2-step process.
    • The OS contains 2 partitions. One is fat32 and the other is ext4. For LibreElec case, the fat32 partition took only 511.7M.
    • I first install the Kodi/LibreElec to SD card. Then move the rootfs/STORAGE partition (ext4) from SD card to USB drive. I also need to open cmdline.txt file from the fat32 partition and modify the 2nd UUID (like, ab60c86b-b9bd-4048-ab59-2f570bce4662, below obtained by using the blkid command) to match it with my USB drive.
    boot=UUID=0603-1735 disk=UUID=ab60c86b-b9bd-4048-ab59-2f570bce4662 quiet
    

    As we can see below, the original /STORAGE partition from SD card (/dev/mmcblk0p2 or /var/media/STORAGE) is empty. And the new STORAGE partition is on the USB drive (/dev/sda1).

    LibreELEC:~ # df -h
    Filesystem                Size      Used Available Use% Mounted on
    devtmpfs                330.5M      4.0K    330.5M   0% /dev
    tmpfs                   184.4M      9.3M    175.2M   5% /run
    /dev/mmcblk0p1          511.7M    124.9M    386.9M  24% /flash
    /dev/loop0              110.0M    110.0M         0 100% /
    /dev/sda1                28.3G      1.3G     25.6G   5% /storage
    tmpfs                   461.0M         0    461.0M   0% /dev/shm
    tmpfs                     4.0M         0      4.0M   0% /sys/fs/cgroup
    tmpfs                   461.0M      2.3M    458.8M   0% /var
    tmpfs                   461.0M         0    461.0M   0% /tmp
    /dev/mmcblk0p2           27.4G    398.0K     27.4G   0% /var/media/STORAGE
    LibreELEC:~ # du -sh /var/media/STORAGE
    1.0K	/var/media/STORAGE
    

Install using PPA on Ubuntu

https://kodi.wiki/view/HOW-TO:Install_Kodi_for_Linux

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install kodi

Docker

https://github.com/linuxserver/docker-kodi-headless

docker run --name=kodi-headless \
  -v <path to data>:/config/.kodi \
  -e PGID=1000 -e PUID=1000 \
  -p 8080:8080 \
  -p 9090:9090 \
  -p 9777:9777/udp \
  linuxserver/kodi-headless

The username/password is kodi/kodi

OSMC

The Ultimate Guide to Install Kodi on Raspberry Pi (OSMC) including installing a VPN on it (Kodi)

LibreELEC

# ssh [email protected]
# vcgencmd measure_temp
temp=56.9

# cat /etc/os-release

NAME="LibreELEC"
VERSION="10.0.2"
ID="libreelec"
VERSION_ID="10.0"
PRETTY_NAME="LibreELEC (official): 10.0.2"
HOME_URL="https://libreelec.tv"
BUG_REPORT_URL="https://github.com/LibreELEC/LibreELEC.tv"
BUILD_ID="8fd15cdad59fb70083aa25b5c9680d8826b94696"
LIBREELEC_ARCH="RPi2.arm"
LIBREELEC_BUILD="official"
LIBREELEC_PROJECT="RPi"
LIBREELEC_DEVICE="RPi2"

LibreELEC:~ # ls /flash
SYSTEM                    bcm2710-rpi-3-b-plus.dtb  cmdline.txt
SYSTEM.md5                bcm2710-rpi-3-b.dtb       config.txt
bcm2708-rpi-b-plus.dtb    bcm2710-rpi-cm3.dtb       distroconfig.txt
bcm2708-rpi-b-rev1.dtb    bcm2710-rpi-zero-2-w.dtb  fixup.dat
bcm2708-rpi-b.dtb         bcm2710-rpi-zero-2.dtb    kernel.img
bcm2708-rpi-cm.dtb        bcm2711-rpi-4-b.dtb       kernel.img.md5
bcm2708-rpi-zero-w.dtb    bcm2711-rpi-400.dtb       overlays
bcm2708-rpi-zero.dtb      bcm2711-rpi-cm4.dtb       start.elf
bcm2709-rpi-2-b.dtb       bcm2711-rpi-cm4s.dtb
bcm2710-rpi-2-b.dtb       bootcode.bin

VPN

ProtonVPN

Install CLI in Ubuntu/debian

sudo apt update
sudo apt install openvpn dialog python3-pip python3-setuptools
sudo pip3 install protonvpn-cli

Setup ProtonVPN

sudo protonvpn init
# Enter username/password
# Choose UDP
# done!

Disable IPV6. sudo nano /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1 
net.ipv6.conf.default.disable_ipv6 = 1 
net.ipv6.conf.lo.disable_ipv6 = 1 
net.ipv6.conf.tun0.disable_ipv6 = 1

sudo sysctl -p

Connect to ProtonVPN

sudo protonvpn connect
# Select a server location
# Select UDP for fast speeds

Run curl ifconfig.me to confirm the new IP.

To disconnect from VPN

sudo protonvpn disconnect

Settings

Chinese font

Settings - Interface - Skin - Fonts - Change to Arial from default.

Data location

Kodi data folder

Mount Network Share

Stream video to browser, phone

Remote controller and CEC

  • Kodi wiki
    • CEC. Kodi comes with libCEC (CEC abstraction and interface library from Pulse-Eight) which allows control of the Kodi input over the standard TV remote that comes with your TV.
    • Remote controls
  • If your TV and media center both support HDMI-CEC (the CEC stands for Consumer Electronics Control), you'll be able to use the TV remote to control Kodi. How to Set Up a Kodi Remote Control

Web interface/remote control via HTTP

Webserver

https://kodi.wiki/view/Webserver

How to set up a Kodi UPnP server

How to set up a Kodi UPnP server

Resume video playback

Kodi builds

Add-on

Rsync

https://forum.libreelec.tv/thread/1265-rsync/ It's in the LibreELEC Add-ons -> Program add-ons -> Network-tools, bundled with a few other bits and bobs.

Youtube

Tips:

  • youtube.com/activate and google.com/device go to the same place.
  • The "project name" should not contain any space or use the project ID (check the URL to find the ID),
  • It is pain to enter the credentials API key, client ID & client Secret in Kodi. We can also create a json file (~/.kodi/userdata/addon_data/plugin.video.youtube/api_keys.json); see the Github page. It's a good idea to save the file for future use if we want to re-installl Youtube addon on Kodi. NOTE: ~/.kodi is a soft link to /opt/retropie/configs/ports/kodi for the Kodi installed in Raspbian Lite. So we essentially need to back up the corresponding file from there.
  • You have to enter the authorization codes two times. On the 2nd time, I will get an error 403 - access denied. The trick is to add a test user and click the button of "publish the app" on OAuth page (not sure if both are needed). At the 2nd time verification, we won't see the 403 error. But we need to go to "Advanced" and click the "Allow" button.
  • Some instruction based on an old version of addon How to install the YouTube Kodi addon 2017
  • The Youtube addon does not provide much more information about videos (eg how popular a video). So it is better to use the 'cast' function to send videos from Android or PC's browsers to Kodi. See Web interface/remote control via HTTP.

Exodus-redux

How to Install Exodus Redux Kodi Addon [2022]

Chinese

Clear cache

IPTV

The 10 Best Kodi Add-Ons to Watch IPTV

Plex

How to Install Kodi Plex Addon & Use Plex Media Server (2021)