Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th September 2015, 03:27   #1  |  Link
siella
Registered User
 
siella's Avatar
 
Join Date: Mar 2007
Location: Turkey
Posts: 66
Movie Screenshot, thumbnails creator with avisynth from selected frame type

Needed:
  • Avsmeter
  • ffmpegsource2 Plugin

Code:
###-----Selection Start----###
video ="c:\test.avi"  #source path
path = "c:\screen" #save image path
thumb = "no" # yes or no
wr = "yes" # yes or no
frame = "BP" # I , P ,B or BP
img = "png" # png, jpg, bmp, etc.
indx = true # creat index file (true or false)
###----Selection end-------###
FFVideoSource(video,cache = indx)
ConvertToRGB32()
AssumeFrameBased()
FrameEvaluate("""asd= string(current_frame)""",after_frame=true)
type = (frame == "BP") ?  "B" : frame
type2 =  (frame == "BP") ?  "P" : nop()
wr == "yes" ? ScriptClip("""Subtitle("Frame Number:"+asd, align=7, size=20)""",after_frame=true) :nop()
ar = Float(width())/Float(height())
y = Round(300/ar)
type == "I" ? SelectRangeEvery(1000,20): SelectEvery(700, 1)
thumb == "yes" ? BicubicResize(300,y) : nop()
vid  = Last
vid2 =  ScriptClip( """(wr == "yes") ? Last.Subtitle("Frame Type:"+type, align=9, size=20)
\.ImageWriter(path+asd+"-",type=img,info = true) : ImageWriter(path+ asd +"-",type=img,info = true)""",after_frame=true)
vid3 =  ScriptClip( """(wr == "yes") ? Last.Subtitle("Frame Type:"+type2, align=9, size=20)
\.ImageWriter(path+asd+"-",type=img,info = true) : ImageWriter(path+ asd +"-",type=img,info = true)""",after_frame=true)
return frame == "BP" ? ScriptClip("""chr(FFPICT_TYPE) == type ? vid2 : chr(FFPICT_TYPE) == type2 ? vid3 : vid""", after_frame=true):
\ScriptClip("""chr(FFPICT_TYPE) == type ? vid2 : vid""", after_frame=true)
__________________
Behappy
BePack.v3.3BeHappy,BeSweet,BeLight,BeSplit,BeSliced,BdAC) with last plugin, encoder and extensions.
Avisynth Movie Screenshot, thumbnails creator

Last edited by siella; 30th September 2015 at 13:19.
siella is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.