Hi, I'm new here.
I found this script
http://www.gossamer-threads.com/lists/m ... ers/182932 at the bottom. It's for makeing thumbnails for files that don't have cover art in mythvideo.
This is what it looks like after I changed a few small things
Code:
#!/bin/sh -x
until [ "$count" = "0" ]
do
##find out how many movies to process
mysql -u mythtv --password=***** <\
/home/mythtv/.mythtv/MythVideo/scripts/movielist.sql >\
/home/mythtv/.mythtv/MythVideo/scripts/sqllist.out
count=`wc -l /home/mythtv/.mythtv/MythVideo/scripts/sqllist.out | awk '{print $1}'`
##get a movie to process
mysql -u mythtv --password=***** <\
/home/mythtv/.mythtv/MythVideo/scripts/moviefind.sql >\
/home/mythtv/.mythtv/MythVideo/scripts/sql.out
MOVIE="`cat /home/mythtv/.mythtv/MythVideo/scripts/sql.out | grep -v title | grep -v filename | grep /opt`"
MOVIEID="`cat /home/mythtv/.mythtv/MythVideo/scripts/sql.out | grep -v filename | grep -v title | grep -v /opt`"
##create the thumbnail using mplayer
mplayer -ss 00:5:44 -vo jpeg:quality=95:outdir=/home/mythtv/.mythtv/MythVideo/scripts/ -frames 1 -nosound "$MOVIE"
mv /home/mythtv/.mythtv/MythVideo/scripts/00000001.jpg /home/mythtv/.mythtv/MythVideo/"$MOVIEID".jpg
##update the database
mysql -u mythtv --password=***** <\
/home/mythtv/.mythtv/MythVideo/scripts/movieupdate.sql
done
The problems I'm haveing is whit this line:
Code:
MOVIE="`cat /home/mythtv/.mythtv/MythVideo/scripts/sql.out | grep -v title | grep -v filename | grep /opt`"
I'v tried many diffrent ways of useing grep to get only the filename out of sql.out but the truth is I don't know what I'm doing and I have no idea what | grep /opt does... /opt is just an empty folder on my box.
So if anyone can help me figgure this line out I'll be very happy
If you want to try the script yoursellf you'll need to make 3 sql files, you can find them at the link above bottom post.
EDIT: just made it look nice...