EDIT: SOLVED BY CORRECTING A TYPO IN /etc/fstab
I have Raspberry Pi 3 model B which is connected to my Windows 10 PC via network router. I have used KODI in my PC as a UPnP server to watch movies at my living room from KODI installed to my Raspberry Pi 3 model B. Here is the specifications to my systems:
Raspberry Pi 3 model B
Running: OSMC 18.3
IP address: 192.168.1.106
Windows 10 Pro PC
Running: Kodi 18.4
My PC name in Windows Homegroup / file sharing: KADNDESKTOP
KODI UPnP server name: Kadn PC
IP address: 192.168.1.101
SETTING UP UPnP:
I have set my media via
Settings > Media > From ‘Library’ tab ‘Videos…’ > Add videos… > Browse > UPnP devices > Kadn PC > Video Library > ‘Movies’ folder > ‘Titles’ folder > OK
It has come to my knowledge that the Library function in OSMC does not work if one uses UPnP to browse media from PC like I do. Although I am able to see and watch all my shared media from my PC, I would like to see the Library function to work as it should be in way that it would show me all the cover art and other fancy meta data stuff in the menu view. Now do not be confused as I am able to see all the meta data linked to the movie files in
main menu > Movies > ‘Enter files section’ > ‘Movies’
There is all I need for showing some cover art, plot ect. but the ‘Library’ function does not work (seeing this information in the menu).
The way I got it working was to connect my OSMC to my PC via Samba (SMB). This I achieved via
Settings > Media > From ‘Library’ tab ‘Videos…’ > Add videos… > Browse > Windows network (SMB) > WORKGROUP > KADNDESKTOP
From there I will first select folder ‘Movies’ which contains all my movies in
‘Movie name (year) / test_movie.mkv’
folder hierarchy. For ‘Movies’ folder I set it to contain movies. Then I do this again for my PC folder ‘TV_series’, which contains all my TV series in
‘TV serie name / Season XX / test_serie_S01E01.mkv’
folder hierarchy. For this folder I naturally set it to contain ‘TV shows’. All the meta data needed (NFO’s ect) are as they should be. The naming is done just as the instructions tell me to do
Now the Library function works as it should work; all the fancy cover arts are straight in the ‘main menu’ from ‘Movies’ or ‘TV shows’. The problem is when I try to watch videos with high file size (10 GB+), OSMC starts to buffer video and the whole thing is unwatchable as it stops and buffers again every 10-20 seconds. This problem DOES NOT EXIST when I am using UPnP to stream videos to my OSMC from my Windows PC. Then again I lose the Library function with UPnP.
It has come to my knowledge that setting Samba (SMB) via fstab would do the job so that I would get my library working and still get the speed I need to watch videos without annoying buffering or any other disturbance. I have followed these instructions (Configuring fstab based Samba share mounts) to set up Samba (SMB) to works the “fstab way”.
I open ‘Putty’ from my Windows PC to connect to OSMC via SSH. I use IP address 192.168.1.106 and user name osmc and password osmc. It connects (log in is success).
sudo nano /etc/fstab
and press ENTER. fstab opens with following info:
GNU nano 2.7.4 File: /etc/fstab
/dev/mmcblk0p1 /boot vfat defaults,noatime,noauto,x-systemd.automount 0 0
#rootfs is not mounted in fstab as we do it via initramfs. Uncomment for remount (slower boot)
#/dev/mmcblk0p2 / ext4 defaults,noatime 0 0
- I go to the bottom line and write
//192.168.1.101/Movies /mnt/Movies cifs x-systemd.automount,noauto,rw,iocharset=utf8,username=John\040Doe,password=test123,uid=osmc,gid=osmc,file_mode=0770,dir_mode=0770, vers=3.0 0 0
all the spaces are made with just one (1) spacebar. My Windows PC username is ‘John Doe’ and I can use John Doe as I name to grant rights concerning file sharing in my Windows PC. I add one empty line with ENTER and press Ctrl + X to exit and (Y) to save the modified buffer. Filename to write is
Then I press ENTER.
- I am brought back to the osmc@osmc:~$ in which I write
sudo mount -a
Nothing happenes¹. The instructions say
You should just get a new prompt back. If you get any errors looks again at your /etc/fstab for the errors
but I have no response ²
I then try
sudo systemctl daemon-reload
sudo systemctl restart remote-fs.target
and have no response³
Now, according to the instructions, my shares should just work. I will test it by writing
which gives me
Now I can not see any shared files in my OSMC KODI, when I try to add source via
Browse > Root filesystem > /mnt
I see the ‘Movies’ there (with some old Movie_files, movie_files ect. tryouts) but I am unable to press it. If I press it, nothing happens. If I try to press one of my older tryouts like ‘Movie_files’, it will open as empty.
- I once go to SSH and write
sudo mount /mnt/Movies
I see error(s) and I will do as asked: post my logs to the forum (the link contains my password so I will copy & paste it into new .txt without changing anything else).
Any ideas how to get things going as they should?
¹ Nothing happened anyway. I was using Putty and fstab worked eventhough I didn’t gt any response.
² No response even thoug the instructions worked after all.
³ Worked anyway even though nothing seemed to happen. Perhaps because of I was using Putty