Freevo

- User Documentation

# SuSE93DVDPlay

## Workaround for lsdvd 0.15 and Freevo on SuSE 9.3

SuSE 9.3 use lsdvd 0.15 which is available from the apt repositories.

The output of lsdvd causes Freevo not to detect and play a DVD. This is because this version of lsdvd adds the microseconds to the length of a track.

The output looks as follows:

Title: 01, Length: 02:50:38.100 Chapters: 33, Cells: 161, Audio streams: 01, Subpictures: 00

Note the Length format: 02:50:38.100

The expected format is without the microseconds, like this: 02:50:38

This problem can be fixed by making a small change to the lsdvd.py file. The full path of the file should be: '/usr/lib/python2.4/site-packages/mmpython/disc/lsdvd.py'

The change is in the DVDTitle class (line 99).

Following is the changed version of the class as it is on my system:

    class DVDTitle(mediainfo.AVInfo):
        def __init__(self, data):
            mediainfo.AVInfo.__init__(self)
            self.number = int(data[1])

            self.keys.append('subtitles')
            self.keys.append('chapters')

            self.mime = 'video/mpeg'

            l = data[3].split(':')
            """
            Changed by AT to handle different versions of lsdvd
            """
            if len(l[2]) > 2:
              " We have the microseconds also - isolate it"
              sec = l[2].split('.')
              self.length   = (int(l[0])*60+int(l[1]))*60+int(sec[0])
            else:
              " Original line before AT got his paws in here - no microseconds in output"
              self.length   = (int(l[0])*60+int(l[1]))*60+int(l[2])

            self.trackno  = int(data[1])
            self.chapters = int(data[5])

This should actually work for both output formats of lsdvd. Anyone care to test if it works correct on other systems?

last edited 2005-06-06 22:02:34 by AndreTruter
current version: http://freevo.sourceforge.net/cgi-bin/doc/SuSE93DVDPlay