Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Problem with subtitles files
#1
Thumbs Down 
Hi folks,

Although I've been using Kodi for 6 years or so (on every kind of gear : from tablet and phone, to desktop (either Win, OS X, Linux) or RSP), it's my 1st time on the forum. Previously, a look at the wiki pages was enough to solve my problems, but not today it seems. Btw, I hope I'm posting on the right place, please bear with me if I don't.

The context :

I stream my videos from my computer (Mini desktop under Linux Mint) via Wifi and UPnP to my Raspberry Pi 3B (OSMC) connected to my TV set. No problem there. I use Kore on old smartphone as a remote.

The problem :

When it comes to subtitles, hard coded ones just work perfectly, but when they're on a separate file (.srt) there's no way I can use them, althought I try to select them. If I do the same on kodi on my computer, the sub just work fine. The only solution I've found so far, is to copy both video and sub files to a flash drive and plug it in the Raspberry Pi. Not really a problem, but not really convenient either.

Does the problem come from streaming the video ? What's your opinion and what would you advise ?

Thanks.
Reply
#2
(2021-12-04, 12:14)jmbl Wrote: I stream my videos from my computer (Mini desktop under Linux Mint) via Wifi and UPnP to my Raspberry Pi 3B (OSMC) connected to my TV set. No problem there.

Yes, there is. The UPnP part is the problem with external subtitles. Something I stumbled onto myself years ago. If you would mux the subtitle file(s) into your video's .mkv file, then UPnP probably plays the subtitles just fine.

Question: Why do you use UPnP to begin with? Linux Mint supports both SMB and NFS as best suited file protocols for "streaming" videos to a Kodi client. One cavit: you may need to 'scrape' your video collection into Kodi's video library on the OSMC box for the full Kodi experience.
Reply
#3
(2021-12-04, 13:08)Klojum Wrote: Question: Why do you use UPnP to begin with? Linux Mint supports both SMB and NFS as best suited file protocols for "streaming" videos to a Kodi client. One cavit: you may need to 'scrape' your video collection into Kodi's video library on the OSMC box for the full Kodi experience.

Ok, I use UPnP because it was the easiest to use. Prior to that I had ABSOLUTELY no experience whatsoever with computer networking. I'm just beginning to dabble with SAMBA for an unrelated project I have. I'll see if I can use it between my computer and my pi. Thanks.
Reply
#4
I would also certainly dive into NFS, I find it much less hassle on a Linux machine than setting up SMB.

python:
# INSTALL NFS SERVER
sudo apt update
sudo apt install nfs-kernel-server nfs-common

# EDIT THE NFS SOURCE(S)
sudo nano /etc/exports # Adjust location/path and IP address to your own situation and add:
/media/disks/videos/movies 192.168.1.0/24(rw,nohide,insecure,no_subtree_check,async,all_squash,anonuid=1000,anongid=1000)
# Save the file
Ctrl-S / Ctrl-X.

# ACTIVATE THE LATEST CHANGES
sudo exportfs -a
# RESTART THE NFS SERVER WITH NEW CHANGES
sudo systemctl restart nfs-kernel-server
and you're good to go.
Reply
#5
So far, no luck with samba. May I ask what I should do with those command lines ? Meaning : is that for the Raspberry or my computer. I'm sure it sounds like a dumb question, but it's all greek to me.
Reply
#6
(2021-12-04, 21:41)jmbl Wrote: is that for the Raspberry or my computer.

It's always difficult to get a sense of how much someone knows of a certain operating system. Linux Mint is usually not a beginner's OS so I was hoping that you would already be (somewhat) familiar with terminal sessions and the command line. But that is clearly not yet the case.

Linux Mint has a GUI, and the OS itself is based on the Ubuntu distribution, which in turn is based on Debian, a Linux OS. That means that a lot of commands work in the same way on computers with those operating systems. So the answer is yes, it can also be applied on a Raspberry Pi computer when it runs the proper operation software. Raspbian OS is also Debian-based, so the above commands would work.

The nice thing about Linux is that you can basically install and manage (almost) everything. The advanced users would be able to add new printers to the OS just by typing on the command line. Once you are on that level, managing your computer will often go faster than moving a mouse around on your graphics screen. I typically install the OpenSSH server on a new Linux computer, so I can install and manage that machine remotely. Either on my local network, even over the internet like the computer at my parents.

What I typed in the previous post, is the simply way of setting up the NFS file server, set up the file location that needs to be shared (your videos, preferably), and activate the NFS server with those new settings. Without any window/GUI/mouse in sight. If you know which location/path you need for that NFS server, the whole process of setting the NFS server on a newly installed Linux Mint machine can be done in 3-4 minutes. I never managed that with Samba/SMB.

So how long have you been using Linux Mint?
Reply
#7
(2021-12-04, 22:51)Klojum Wrote: What I typed in the previous post, is the simply way of setting up the NFS file server, set up the file location that needs to be shared (your videos, preferably), and activate the NFS server with those new settings. Without any window/GUI/mouse in sight. If you know which location/path you need for that NFS server, the whole process of setting the NFS server on a newly installed Linux Mint machine can be done in 3-4 minutes. I never managed that with Samba/SMB.

So how long have you been using Linux Mint?
Ok, thank you for the explanation and for your patience. I've been using Linux Mint for 5 or years now, but mainly through GUI. I'm quite a baby as far as command line is concerned, but I've guessed you've noticed. Big Grin

I'll try to install NFS and will let you know if I'm successful or not.
Reply
#8
(2021-12-04, 15:18)Klojum Wrote:
python:
# INSTALL NFS SERVER
sudo apt update
sudo apt install nfs-kernel-server nfs-common

# EDIT THE NFS SOURCE(S)
sudo nano /etc/exports # Adjust location/path and IP address to your own situation and add:
/media/disks/videos/movies 192.168.1.0/24(rw,nohide,insecure,no_subtree_check,async,all_squash,anonuid=1000,anongid=1000)
# Save the file
Ctrl-S / Ctrl-X.

# ACTIVATE THE LATEST CHANGES
sudo exportfs -a
# RESTART THE NFS SERVER WITH NEW CHANGES
sudo systemctl restart nfs-kernel-server

Just a few questions before I start : what's written in red is obviously what I need to change.

For example 192.168.1.0 should be changed by my computer's IP address.

But I fail to recognise "anonuid=1000,anongid=1000" what shall I do with that ?
Reply
#9
The first one you'll definitely need to change, the second one maybe: /media/disks/videos/movies 192.168.1.0/24

1) You first need to know in which path your media files are stored in Linux Mint.

2) Secondly you need to know which network subnet you are using. Yours may be 192.168.215.0/24, or any other subnet. Only you know that. Check your local IP/network address in Linux Mint.

(I'm going to move this thread because this has become more about networks than subtitles)
Reply
#10
Just to add for the OP, to check your IP address from the Linux command line (so in the scary terminal window!) type in ifconfig and hit <enter>.

The response will include a bunch of stuff but the bits you are looking for are firstly a line that includes <UP,BROADCAST,RUNNING,MULTICAST>.  Under that line should be a line that reads inet xxx.xxx.xxx.xxx where xxx are numbers consisting of one, two or three digits.  The first three parts of that are your network subnet, so in my case, for inet 192.168.1.50 the subnet is 192.168.1 and so in Klojum's example, you would use 192.168.1.0/24

To explain that a bit further, the 0/24 at the end means the nfs server will allow connections from any address starting with 192.168.1 

If your inet line reads 192.168.0.xxx then you would use 192.168.0.0/24 and if it reads 10.3.7.15 then you would use 10.3.7.0/24 etc etc.

To further elaborate on his post, the anonuid=1000,anongid=1000 part forces the user id and group id for an anonymous connection to be 1000.  1000 is usually (on Debian/Ubuntu anyway) the first user added to the system (you in other words).  It effectively means that other machines connecting to the nfs share are connecting as the user doing the sharing and so have the same read/write permissions as that user.

It seems complicated at first but once you get your head around what is happening and what the stuff in the commands actually means, it's pretty simple and very powerful.
  
Klojum is sharing a directory at /media/disks/video/movies to his entire local network and each machine that connects to it connects as his user.

Note : Samba is just as easy to set up, it's just a different config file.  The options in are different but I can add a samba share to my network as easily as adding an nfs share.
Learning Linux the hard way !!
Reply
#11
Thread moved again.
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with subtitles files0