[mythtv-users] Anyone using in crontab?

nospam312 nospam312 at gmail.com
Wed Dec 12 16:37:37 UTC 2007

I am using the script available on the Wiki at this URL to generate
preview images.

I have commented out the following lines and added a few more logging
and debug statements.  Everything works fine when I execute the script
from the command line.

#if (getpwuid($>) ne "mythtv") {
#  print STDERR "You must run this script as the mythtv user.\n";
#  exit 1;

However when I add the script to my crontab the script fails when it
calls the system("mplayer","-noframedrop","-ss",$SKIP,"-vo","jpeg:quality=50:outdir=$OUTPATH","-frames","2", at VC,"-nosound",$FILE);
line as the 00000002.jpg file is not generated and therefore the mv
command fails.

What is strange is the previous calls to mplayer via the line "my
$length=`echo -n q | mplayer -vo null -nosound -identify -vc null
"$FILE" | egrep "^(ID_LENGTH=)" | cut -d '=' -f 2`;" works fine as
$length is assigned the correct value.

This seems to point to the script is able to read the file and
permissions are set correctly.  Does anyone have any idea why the
system("mplayer"...) line is failing?

I am using Mythbuntu 7.10.


More information about the mythtv-users mailing list