Kodi Community Forum

Full Version: Share DVD Drive over network, KODI to play from it
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

I'm trying to make Kodi play DVD disk from drive which is shared over the network using nbd server and client.

NBD server is configured at the Linux PC with DVD Drive running Debian.

NBD client is configured on Raspberri Pi 2. I can Mount that drive on Raspberry and can see its content. If I then add the directory what the nbd device is mounted to to video files as location and click play, it is not working well. I have tried 3 different disks, :
1/ One disk was played and I could navigate thru it using previous/next keys. It has no menu.
2/ Another disk (Red Dwarf) started the main menu animation and then went back to Kodi GUI. In order to try it again, I had to connect once again to the nbd-server and mount the drive on Raspberry, because the connection had dropped for some reason. But it never played more then a few seconds of menu.
3/ Another disk. When I hit play, it just showed black screen and looked like its just about to play, but then it went back to Kodi gui.

Another issues I haven't solved yet are:
a/ I have to connect to the client and mount the drive manually. I could add the client connecting command to some autostart script, but it fails if theres no disk in the drive.

b/ Once I connect form the client, the drive is locked and cannot be opened. I have to restart the server part of nbd if I want to open the drive.

Has anyone suceeded in configuring shared optical drive so it works smoothly and can be controlled in a "BFU friendly" way?

Thanks a lot!
Hi !
It's an old post but i'm really interesting about sharing my DVD disk with my raspberry!

Have you find a solution?
(2017-02-16, 20:24)Moon_LS Wrote: [ -> ]Hi !
It's an old post but i'm really interesting about sharing my DVD disk with my raspberry!

Have you find a solution?

It would be simpler to rip a DVD using Handbrake, or similar, and sharing the video file it creates.
(2017-02-16, 20:24)Moon_LS Wrote: [ -> ]Hi !
It's an old post but i'm really interesting about sharing my DVD disk with my raspberry!

Have you find a solution?

Hi,

actually I have :-) I was trying to use ATAoE but it did not work. I was able to mount the drive on remote computer, but Libdvdread was not able to access it correctly.

I end up having DVDfs (https://www.jspenguin.org/software/dvdfs/) installed on my server with DVD drive. DVDfs mounts DVD disk and you can access it as normal directory and so you can share it over network using Samba or NFS. But, unlike normal mounting of the DVD, it does the recoding etc. so you can really play it. It works with menu and everything, I have seen no disk which can't be played.

I'm sharing this directory over Samba to Raspberries. This Samba share is added to Kodi to Files section. If you enter that, Kodi tries to access the share, which makes Samba on the server run this script:

#!/bin/sh

#Scanning DVD ...
#libdvdreadBig GrinVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed/VIDEO_TS.IFO failed
#Scan complete!


output=$(mount dvdfs 2>&1 | grep VIDEO_TS.IFO)


if [ "$output" = "" ]
then
beep -f 1500 -l 200
beep -f 2000 -l 300
beep -f 1500 -l 200


elif [ "$output" = "libdvdreadBig GrinVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed" ]
then
beep -f 1500 -l 500
beep -f 1500 -l 500
umount dvdfs
mount /dev/sr0

else
beep -f 2500 -l 1500

fi

... after this, the disk in DVD drive is mounted as DVD using DVDfs or normal DVD with files. And then, if you want to play it, you just click :menu: while standing on that share and choose Tonguelay:. Thats is.

To set samba to run script at accessing/deaccessing of share, you need this in your smb.conf

preexec = sudo /etc/myscripts/mount_DVD
postexec = sudo /etc/myscripts/umount_DVD


So the script above is "mount_DVD". Unmount_DVD looks like this:


umount dvdfs
umount /dev/sr0

beep -f 2500 -l 300
beep -f 1000 -l 400
beep -f 2500 -l 300


Unmount script is executed up to a minute after you stop accessing the drive from Kodi. Before that, you cant open the drive.