[mythtv-users] MythVideo thumbnails

Nick Rout nick at rout.co.nz
Thu Feb 16 05:08:14 UTC 2006


On Wed, 15 Feb 2006 17:46:22 -0500
"Michael T. Dean" <mtdean at thirdcontact.com> wrote:

> On 02/15/2006 05:29 PM, yan seiner wrote:
> > Nick Rout wrote:
> >> Thats a nice idea,  most of my stuff in mythvideo is downloaded tv programmes, and having the same imdb cover art for 30 episodes of Lost is boring.
> >>
> >> In theory the script will:
> >>
> >> for each entry in the video table 
> >> if entry has no cover art
> >> 	make a thumbnail (say 5 mins into the file)
> >> 	store it in a known location
> >> 	insert the path to the thumbnail in the database
> >> endif
> >> next
> >>
> >> thumbnail should not be the first frame of the file, as this is often blank, or an advert, or a studio logo or something.
> >>
> >> I am no programmer, but could probably hack up a half page script to do this (badly) in a week or two of frustration :-)
> > ISTR that you can do this with mplayer or possibly mencoder.  read the 
> > manpage; there is a way to generate jpegs but I'm not sure if you can 
> > specify a position....
> >   
> Yeah, mplayer, not mencoder.  Something like:
> 
> mplayer -ss 00:11:44 -vo jpeg:quality=95:outdir=/myth/posters -frames 1 
> -ao null <video_file>
> 
> to get the frame at 11min 44sec into the video.  However, note that 
> MPlayer always outputs at least 2 frames (even with the -frames 1, 
> above) because it seems to want to ensure the video starts with one 
> blank frame.  So, the output of the above would be (don't remember 
> exactly how many 0's, though):
> 
> /myth/posters/0000001.jpg (black frame)

actually first frame of the video - perhaps not always blank. 

> /myth/posters/0000002.jpg (frame from specified position)
> 
> Then, the script would have to rename 0000002.jpg to something more 
> appropriate and set the value in the databsae.  Note, also, that mplayer 
> is happy to continually overwrite the old ones (so you wouldn't 
> necessarily have to delete 0000001.jpg each time).
> 
> So, really, all you need to do is come up with something to manage the 
> file names (and handle the cases where they're not created) 

why doesn't it always work? I can't figure out why it is creating jpegs
for some files and not others. 

> and to put 
> it in the database.  Oh, and if you want it integrated into Myth, I 
> recommend you make the script so that it's able to work like 
> imdb.pl--i.e. for a particular video instead of always doing the entire 
> videos directory (i.e. use an option to do all videos).
> 

i'd also like to see a script like imdb.pl that accesses tv.com for
episode details for tv series that have been downloaded and saved to
your mythvideo directory. Then you should be able to get a different
description/plot summary for each episode.

> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


More information about the mythtv-users mailing list