View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 2 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Thu Sep 07, 2006 5:58 am 
Offline
Joined: Wed Sep 06, 2006 10:45 pm
Posts: 2
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...


Last edited by tripmix on Thu Sep 07, 2006 8:37 am, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 07, 2006 8:36 am 
Offline
Joined: Wed Sep 06, 2006 10:45 pm
Posts: 2
Since all my videos are on /media/disk1/Videos/ this worked
Code:
MOVIE="`cat /home/mythtv/.mythtv/MythVideo/scripts/sql.out | grep media | grep -v /opt`"

And I had to change the mplayer part to:
Code:
mplayer -ss 00:5:44 -vo jpeg:quality=95:outdir=/home/mythtv/.mythtv/MythVideo/scripts/ -frames 2 -nosound "$MOVIE"
mv /home/mythtv/.mythtv/MythVideo/scripts/00000002.jpg /home/mythtv/.mythtv/MythVideo/"$MOVIEID".jpg

Guess this will work as long as I dont name my files media somthing, or I could always change it to disk1 :)


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu