Multimedia - marco1475/linux-htpc GitHub Wiki
-
Install the
mplayerpackage:sudo pacman -S mplayer -
Test that
mplayerworks:mplayer -ao alsa:device=hw=0.8 <file>
-
Install the
mpdandncmpcpppackages:sudo pacman -S mpd ncmpcpp -
Add the
mpduser to the groupaudio:sudo gpasswd -a mpd audio -
Edit the
/etc/mpd.confconfiguration file:# See: /usr/share/doc/mpd/mpdconf.example pid_file "/run/mpd/mpd.pid" db_file "/var/lib/mpd/mpd.db" state_file "/var/lib/mpd/mpdstate" playlist_directory "/data/audio/playlists" music_directory "/data/audio/music" user "mpd" password "<password>@read,add,control,admin" default_permissions "read,control" port "25286" filesystem_charset "UTF-8" auto_update "yes" audio_output { type "alsa" name "MPD HDMI" device "hw:0,8" } audio_output { type "httpd" name "MPD Stream" encoder "lame" port "65535" bitrate "192" always_on "yes" }- Remember,
mpdclients are only controlling the music; to listen to the HTTP stream, you have to load thehttp://server:portaddress in a music player, e.g. VLC.
- Remember,
-
Install the
ncmpcpppackage:sudo pacman -S ncmpcpp -
Set your desired options in
~/.ncmpcpp/config. -
If you are connecting through PuTTY and see
qs andxs instead of horizontal and vertical lines, this is due to PuTTY ignoring VT100 "Alternate character set" commands in UTF-8 mode [0]. Runncmpcppthroughscreenortmuxor tellncursesto always use UTF-8 box-drawing characters:export NCURSES_NO_UTF8_ACS=1
-
Install the
emby-serverpackage:sudo pacman -S emby-server -
Start the
emby-serverservice and make sure it is started at boot:sudo systemctl start emby-server.service sudo systemctl enable emby-server.service -
Finish the server setup using a web browser by navigating to
http://<server>:8096/.
-
Install the
kodipackage:sudo pacman -S kodi -
Install the
kodi-standalone-servicefrom AUR:mkdir ~/aur && cd ~/aur wget https://aur.archlinux.org/cgit/aur.git/snapshot/kodi-standalone-service.tar.gz . tar -xvf kodi-standalone-service.tar.gz cd kodi-standalone-service makepkg -sri # Run this as normal user, not root! -
Start and enable the
kodi.service:sudo systemctl start kodi.service sudo systemctl enable kodi.service- Once you start the
kodi.serviceyou should see Kodi running on your TV. - When you restart the server will automatically start Kodi.
- The Kodi home directory for the service is
/var/lib/kodi/.kodi.
- Once you start the
-
In Kodi, navigate to Main Menu -> Settings -> System Settings and set the Options level from
BasictoExpert. -
Configure video:
- Navigate to Main Menu -> Settings -> System Settings -> Video.
- In the General category:
- Keep Monitor as
Default. - Keep Display mode as
Full screen. - Ensure the Resolution is
1920x1080p.
- Keep Monitor as
-
Configure audio:
- Navigate to Main Menu -> Settings -> System Settings -> Audio.
- In the Audio Decoder category:
- Click on Audio output device and select
HDA Intel, MEI Panasonic-TV on HDMI #2. (You should hear menu sounds after you do this.) - Set the Number of channels to 5.1.
- Click on Audio output device and select
- In the Audio Passthrough category:
- Enable Allow passthrough.
- As the Passthrough output device select
HDA Intel, MEI Panasonic-TV on HDMI #2. - Enable Dolby Digital (AC3) capable receiver, Dolby Digital Plus (E-AC3) capable receiver, DTS capable receiver, TrueHD capable receiver, and DTS-HD capable receiver.
-
Configure interface settings:
- Navigate to Main Menu -> Settings -> Interface Settings -> Regional.
- In the Unit Formats category:
- Region default format: USA (24h)
- Timezone country: United States
- Temperature Unit: C
- Navigate to Main Menu -> Settings -> Interface Settings -> Screensaver.
- Screensaver mode: Black
- Enable installation of add-ons from unknown sources:
- Navigate to Main Menu -> Settings -> System Settings -> Add-ons.
- In the General category enable
Unknown sourcesand agree to the pop-up.
- Add a source for the Emby for Kodi repository:
- Navigate to Main Menu -> Settings -> File manager.
- Click Add source.
- Create a source named
Emby for Kodi (Source)with the URL http://kodi.emby.media.
- Install the Emby for Kodi repository:
- Navigate to Main Menu -> Add-ons and click Enter add-on browser.
- Click Install from zip file.
- Select "Emby for Kodi (Source)".
- Select
repository.emby.kodi-X.X.X.zipand click OK.
- Install the Emby for Kodi add-on:
- Navigate to Main Menu -> Add-ons and click Enter add-on browser.
- Click Install from repository.
- Select "Kodi Emby Addons".
- Select "Video add-ons".
- Select "Emby".
- Click "Install".
- Configure the Emby for Kodi add-on:
- Click Manually add server:
- Server: http://localhost
- Port: 19115
- Select your user.
- Select
Native (Direct Paths)as the Playback Mode. - Do not add Network credentials to allow Kodi to access your content.
- Do not disable the Emby music library.
- Emby for Kodi should perform the initial sync.
- Click Manually add server:
- Create Kodi video nodes for each Emby library:
- All files provided by Emby are tagged with the Emby library name in Kodi.
- By default, the library type (movies, tv shows, etc.) determines how the files will be displayed in Kodi.
- For mixed-content libraries you need to create video nodes that group files based on tags.
- Custom skins (e.g. Aeon Nox), but not the default one, allow you to place links to video nodes in the main menu.
- Make sure you are creating links to the entries found in Main Menu -> Videos (i.e. the ones that show you the "directory" contents) and not the Library Node Editor entries (which should you the Library Node Editor page).
Both Emby and Kodi create their own users (emby and kodi respectively) as well as groups (emby and kodi respectively). However, Emby requires the ownership of any files it manages, while Kodi needs read rights for "native playback".
-
Create a new
mediagroup:groupadd media -
Add the user, as well as the
embyandkodiusers to themediagroup:usermod -aG media <user> usermod -aG media emby usermod -aG media kodi usermod -aG media mpd -
Change the ownership of your media files to
emby:mediaand apply the correct user permissions:chown -R emby:media <path> chmod -R 750 <path>