Hi Duncan!

On Fri, May 15, 2009 at 08:39:12PM +0200, Duncan Webb wrote:
> Will you try the attached patch and report back if this works?

The patch fails if MPLAYER_TEMP_DIR is empty and if the current
directory is not writable.

The outdir option in newer MPlayer versions is really a nice
thing, but since the current _videothumb_parse needs to do
a chdir anyways, it'd be easier to just do the chdir in
_videothumb (before starting mplayer) and not use the outdir
option at all (for now). I've attached a modified patch.

so long,

Hias
Index: src/encodingcore.py
===================================================================
--- src/encodingcore.py	(revision 11524)
+++ src/encodingcore.py	(working copy)
@@ -466,19 +466,19 @@
                 self.length = 0
 
         position = str(int(self.length / 2.0))
-        arguments = [ '-vo', 'png:z=1:outdir=/tmp', '-ao', 'null', '-frames', '8', '-ss', position, '-zoom' ]
+        arguments = [ '-vo', 'png:z=1', '-ao', 'null', '-frames', '8', '-ss', position, '-zoom' ]
         if self.titlenum:
             arguments += [ '-dvd-device', self.source, 'dvd://%s' % self.titlenum ]
         else:
             arguments += [ self.source ]
 
+        # chdir to tmp so we have write access
+        os.chdir('/tmp')
         self._run(mplayer, arguments, self._videothumb_parse, None, 0, 'data.png')
 
 
     def _videothumb_parse(self, lines, data):
         from util import vfs
-        # chdir to tmp so we have write access
-        os.chdir('/tmp')
         for line in lines:
             if line:
                 _debug_(line)
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to