Kodi Community Forum

Full Version: Cannot Play DVDs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Works on Linux.
Doesn't work here :-(

Here is my Code as i am using Opdenkamps XBMC-pvr Master.
I changed the file xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp code this way:
Code:
// libdvdcss fails if the file path contains VIDEO_TS.IFO or VIDEO_TS/VIDEO_TS.IFO
  // libdvdnav is still able to play without, so strip them.

  // stripping only works 100% correctly for absolute paths.
  // relative paths are not expected here and wouldn't make sense, so it's safe to assume we'll have
  // at least one path separator character.

  strDVDFile = strdup(strFile);
  int len = strlen(strDVDFile);
CLog::Log(LOGDEBUG, "===============HANNEMANN: strFile %s",strFile);
CLog::Log(LOGDEBUG, "===============HANNEMANN: strDVDFile %s",strDVDFile);
#ifndef _LINUX
  if (len >= 13   // +1 on purpose, to include a separator char before the searched string
  strnicmp(strDVDFile + len - 12, "VIDEO_TS.IFO", 12) == 0)
    strDVDFile[len - 13] = '\0';

  len = strlen(strDVDFile);
  if(len >= 9  // +1 on purpose, to include a separator char before the searched string
  strnicmp(strDVDFile + len - 8, "VIDEO_TS.IFO", 8) == 0)
    strDVDFile[len - 9] = '\0';
#else
  if(len >= 13  // +1 on purpose, to include a separator char before the searched string
  && strncasecmp(strDVDFile + len - 12, "VIDEO_TS.IFO", 12) == 0)
    strDVDFile[len - 13] = '\0';

  len = strlen(strDVDFile);
  if(len >= 9  // +1 on purpose, to include a separator char before the searched string
  && strncasecmp(strDVDFile + len - 8, "VIDEO_TS", 8) == 0)
    strDVDFile[len - 9] = '\0';
#endif
  {
    strDVDFile[len - 13] = '\0';
  }
#if defined(__APPLE__) && !defined(__arm__)
  // if physical DVDs, libdvdnav wants "/dev/rdiskN" device name for OSX,
  // strDVDFile will get realloc'ed and replaced IF this is a physical DVD.
The debugs give me the following (which is a little confusing since trying to open /initrd.img as DVD is senseless):
Code:
19:09:26 T:140479310936032   DEBUG: ExecuteXBMCAction : Translating XBMC.PlayDVD()
19:09:26 T:140479310936032   DEBUG: ExecuteXBMCAction : To XBMC.PlayDVD()
19:09:26 T:140479310936032   DEBUG: CPlayerCoreFactory::GetPlayers(/initrd.img)
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: system rules
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: system rules
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtv
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: hdhomerun/myth/rtmp/mms/udp
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: streams
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvd
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdfile
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdimage
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: dvdimage
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: adding player: videodefaultdvdplayer (1) for rule: dvdimage
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: nsv
19:09:26 T:140479310936032   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: radio
19:09:26 T:140479310936032   DEBUG: CPlayerCoreFactory::GetPlayers: matched 1 rules with players
19:09:26 T:140479310936032   DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (1)
19:09:26 T:140479310936032   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
19:09:26 T:140479310936032   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
19:09:26 T:140479310936032   DEBUG: CPlayerCoreFactory::GetPlayers: adding player: DVDPlayer (1)
19:09:26 T:140479310936032   DEBUG: CPlayerCoreFactory::GetPlayers: added 1 players
19:09:26 T:140479310936032  NOTICE: DVDPlayer: Opening: /initrd.img
19:09:26 T:140479310936032 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
19:09:26 T:140479310936032   DEBUG: LinuxRendererGL: Cleaning up GL resources
19:09:26 T:140479310936032   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avutil-50-x86_64-linux.so)
19:09:26 T:140479310936032   DEBUG: Loading: /usr/lib/xbmc/system/players/dvdplayer/avutil-50-x86_64-linux.so
19:09:26 T:140479310936032   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/swscale-0-x86_64-linux.so)
19:09:26 T:140479310936032   DEBUG: Loading: /usr/lib/xbmc/system/players/dvdplayer/swscale-0-x86_64-linux.so
19:09:26 T:140478649464576   DEBUG: Thread CDVDPlayer start, auto delete: 0
19:09:26 T:140478649464576  NOTICE: Creating InputStream
19:09:26 T:140478649464576   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/libdvdnav-x86_64-linux.so)
19:09:26 T:140478649464576   DEBUG: Loading: /usr/lib/xbmc/system/players/dvdplayer/libdvdnav-x86_64-linux.so
19:09:26 T:140478649464576   DEBUG: ===============HANNEMANN: strFile /initrd.img
19:09:26 T:140478649464576   DEBUG: ===============HANNEMANN: strDVDFile /initrd.img
19:09:26 T:140478649464576    INFO:   msg: libdvdnav: Using dvdnav version 4.1.3
19:09:26 T:140478649464576    INFO:   msg: libdvdread: Using libdvdcss version 1.2.10 for DVD access
19:09:26 T:140478649464576    INFO:   msg: libdvdnav: vm: DVD Title: [���>�8%2��'�������o|@9��~��,�
19:09:26 T:140478649464576    INFO:   msg: libdvdnav: Unable to find map file '/home/xbmc/.dvdnav/[���>�8%2��'�������o|@9��~��,�.map'
19:09:26 T:140478649464576    INFO:   msg: libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
19:09:26 T:140478649464576    INFO:   msg: libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
19:09:26 T:140478649464576   DEBUG: libdvdread: Can't open file VIDEO_TS.IFO.
19:09:26 T:140478649464576   DEBUG: libdvdnav: vm: failed to read VIDEO_TS.IFO

Which other previous commit do I need?

@vdrfan: which version do you use? Youre nick implies that you use opdenkamp and pipelka too, right?
I tried it again with eden-pvr now and its still the same.
I just wanted to let everyone know that I was having the same issue after I installed Eden with recent commercial DVDs. I was reading the post about Eden freezing on Blu-Ray and someone noted that you should try AnyDVD HD. I installed it on my machine and rebooted per the AnyDVD install req's and voila! Everything started working as it did in 10.1. I hope that helps a developer out and I'll be happy to provide some logs if necessary.
I've found a workaround for the initrd.img problem on Linux:

http://forum.xbmc.org/showpost.php?p=971939&postcount=6
it probably works because then in CDVDPlayer::OpenInputStream() it matches the protocol again (it was dvd:// earlier) and the media manager returns the true device with g_mediaManager.TranslateDevicePath("").
Unfortunately this will only open the first available device in case you have two.
The Linux Dev needs to find a more suitable way.
You're right. The workaround works for me as my HTPC's host only one optical Drive. One should keep that in mind if considering to use that ugly piece of code ;-)
BTW make sure you try with the latest trunk and not with Eden and a few manually changes.
Has this been resolved for Windows machines?
beta2 will have the fixes which are in master currently.
Can someone confirm if AnyDVD (not HD) will resolve this on Windows boxes?

I love XBMC but not being able to play the kids DVDs isn't going down well BlushEekSad

Big thank you
Lea
WiSo Wrote:beta2 will have the fixes which are in master currently.

Just tried it with Beta 2 and it still freezes the home screen solid until the dvd is ejected.
I can confirm that Beta 2 seems to have fixed the problems I reported here above (2011-12-16, 22:35). XBMC plays a commercial DVD that I insert in the drive and then plays another different DVD that I insert. The per-DVD position memory appears to be working too. If I see any issues I'll post again.
blimey, beta 2 is released and I didn't know...did I miss the facebook announce? Cheers, will give it a go Smile and let ya know.
Perfect, beta 2 solves the issue...thanks XBMC devs Smile
Pages: 1 2 3 4