SourceTec Software

It is currently Wed Apr 23, 2014 9:04 pm

All times are UTC + 8 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Feb 17, 2009 3:01 am 

Joined: Tue Feb 17, 2009 2:38 am
Posts: 1
Is it possible to extract multiple thumbnails while encoding a videofile? It would be great if you could extend the command line parameters as:

-tm "c:\thumb1.jpg,320,240,[frame/percent];c:\thumb2.jpg,160,120,50%;c:\thumb3.jpg,640,480,99%"

TM is abbrevated for ThumbnailMultiple, and a quoted-string defines the value of the parameter. The value contains groups separated by ; (semi-colon), each group contains 4 - or 3 - values separated by , (comma):

-tm "filename,width,height[,frame[%]][;...]"

filename - defines the name of the thumbnail file to write
width - defines the width of the written thumbnail
height - the height
frame or percentage - if not specified, the first non-empty frame, if specified either the frame number - or if suffixed by % - the frame in % of the entire video file.

For implementation my suggestion is:

- At startup get value of the -tm parameter.

- Build an array of ThumbGroups { sFilename, iWidth, iHeight, bFirstNonEmptyFrame, iFrameNumber }:
- If frame is unspecified, set bFirstNonEmptyFrame = true
- If frame ends with %, calculate & set iFrameNumber based on Duration.
- Else set iFrameNumber.

- For each frame:
- If at first - non empty - frame, check if a ThumbGroup with bFirstNonEmptyFrame exists, and, if so, write that thumb.
- If ThumbGroup with iFrameNumber exists, write that thumb.

Just a suggestion :) Thanks for a great product!


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

All times are UTC + 8 hours

Who is online

Users browsing this forum: No registered users and 1 guest

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