2013-03-10, 21:40
this will play your dvds from a connected usb dvd drive, since a lot of people are having problems playing dvds natively...like me...
if i use the xbmc dvd player then the dvd always freezes on the initial screen...it takes too much effort to try and play a dvd this way. from what i have read, there seems to be no fix...it can possibly be due to an older board with 256mb ram and polyfuses which limit the amps to the usb ports...or it could be due to a powered usb hub that is controlling the usb dvd player
so i took some ideas have read here in the board and elsewhere and made this addon...
it uses lsdvd to scan the dvd drive and then uses mplayer to load the longest track that is listed on the dvd as a mpg
and then on the tv screen it is automagically playing the longest track
if your raspbmc works to play dvds properly then it is not for you, mine does not and i wanted an easy way to load dvds from my usb dvd drive. i have tried many ways of doing this and from my perspective this works the best with what i have...all other solutions i have seen using mplayer will only play dvd://1 i have it now so that it will scan and play the longest track or it will scan and ask you which track to play
this should work with raspbian since it is a l;inux base, i dont know about openelec since i have never worked with it...
it also checks to makesure /dev/sr0 is mounted and if not it will mount /dev/sr0 to /media/cdrom
prereqs to get it to work (you need of course to have libdvdcss compiled)
alternatively, you can use the script i included to scan the dvd for all of the tracks longer than 60 seconds...i would like to figure out how to get this manualselectDVD.sh to work via xbmc (right now it only works via the linux terminal)
:
to use the manualselectDVD.sh script; it only works thru terminal/ssh so far
it will look like this
root@raspbmc:/home/pi# sh manualselectDVD.sh
mounted
libdvdread: Using libdvdcss version 1.2.12 for DVD access
Disc Title: FIREFLY_D3
Title: 01, Length: 00:43:55.053
Title: 02, Length: 00:42:48.176
Title: 03, Length: 00:42:53.000
Title: 04, Length: 00:43:41.300
Longest track: 01
Enter the track you want (^C to quit): 2
you entered track 2
{"id":"1","jsonrpc":"2.0","result":"OK"}root@raspbmc:/home/pi# ps -ef | grep mplayer
root 1722 1 6 18:30 pts/0 00:00:01 mplayer dvd://2 -dumpstream -dumpfile /media/LARGEFILES/dvd.mpg
root 1733 1312 0 18:31 pts/0 00:00:00 grep mplayer
root@raspbmc:/home/pi#
so it will use your input to play the track you want instead of only dvd://1
let me know if anyone can help with getting this manualselectDVD.sh to work via xbmc, i dont know python much to get output to show on screen and input selection
https://www.dropbox.com/s/qtffm7c7acfr3l....0.2.1.zip
here is the addon, i hope you like it
if i use the xbmc dvd player then the dvd always freezes on the initial screen...it takes too much effort to try and play a dvd this way. from what i have read, there seems to be no fix...it can possibly be due to an older board with 256mb ram and polyfuses which limit the amps to the usb ports...or it could be due to a powered usb hub that is controlling the usb dvd player
so i took some ideas have read here in the board and elsewhere and made this addon...
it uses lsdvd to scan the dvd drive and then uses mplayer to load the longest track that is listed on the dvd as a mpg
and then on the tv screen it is automagically playing the longest track
if your raspbmc works to play dvds properly then it is not for you, mine does not and i wanted an easy way to load dvds from my usb dvd drive. i have tried many ways of doing this and from my perspective this works the best with what i have...all other solutions i have seen using mplayer will only play dvd://1 i have it now so that it will scan and play the longest track or it will scan and ask you which track to play
this should work with raspbian since it is a l;inux base, i dont know about openelec since i have never worked with it...
it also checks to makesure /dev/sr0 is mounted and if not it will mount /dev/sr0 to /media/cdrom
prereqs to get it to work (you need of course to have libdvdcss compiled)
Code:
apt-get install -y mplayer curl lsdvd
mkdir /media/LARGEFILES; mkdir /media/cdrom; mkfifo /media/LARGEFILES/dvd.mpg; chmod o+w /media/LARGEFILES/dvd.mpg;
alternatively, you can use the script i included to scan the dvd for all of the tracks longer than 60 seconds...i would like to figure out how to get this manualselectDVD.sh to work via xbmc (right now it only works via the linux terminal)
:
to use the manualselectDVD.sh script; it only works thru terminal/ssh so far
Code:
sh /home/pi/.xbmc/addons/script.playDVD/resources/manualselectDVD.sh
it will look like this
root@raspbmc:/home/pi# sh manualselectDVD.sh
mounted
libdvdread: Using libdvdcss version 1.2.12 for DVD access
Disc Title: FIREFLY_D3
Title: 01, Length: 00:43:55.053
Title: 02, Length: 00:42:48.176
Title: 03, Length: 00:42:53.000
Title: 04, Length: 00:43:41.300
Longest track: 01
Enter the track you want (^C to quit): 2
you entered track 2
{"id":"1","jsonrpc":"2.0","result":"OK"}root@raspbmc:/home/pi# ps -ef | grep mplayer
root 1722 1 6 18:30 pts/0 00:00:01 mplayer dvd://2 -dumpstream -dumpfile /media/LARGEFILES/dvd.mpg
root 1733 1312 0 18:31 pts/0 00:00:00 grep mplayer
root@raspbmc:/home/pi#
so it will use your input to play the track you want instead of only dvd://1
let me know if anyone can help with getting this manualselectDVD.sh to work via xbmc, i dont know python much to get output to show on screen and input selection
https://www.dropbox.com/s/qtffm7c7acfr3l....0.2.1.zip
here is the addon, i hope you like it