View Single Post
Old 4th February 2015, 08:07   #14  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Scan Client Script

Code:
# Start DebugView before script to view output

Import("DBSC.avs")

VideoFileName = "AP10_Out.avi"

Start_Fn    = "Start_Frames.Txt"
End_Fn      = "End_Frames.Txt"
Range_Fn    = "Range_Frames.Txt"
Mid_Fn      = "Mid_Frames.Txt"
ClipClop_Fn = "ClipClop_Frames.Txt"

InfoDB = VideoFileName+"_Info.DB"                                              # INFO DBase
ScanDB = VideoFileName+"_Scan.DB"                                              # SCAN DBase

Avisource(VideoFileName)

RECYCLE_INFO_DB= True
RECYCLE_SCAN_DB= True

OVERRIDE       = "Override.txt"              # Override as Filename

DBSC_CreateInfo(InfoDB,RecycleDB=RECYCLE_INFO_DB)                            # Create INFO DB (REQUIRED), for fast scanning
DBSC_Scan(InfoDB,ScanDB,RecycleDB=RECYCLE_SCAN_DB)                           # Detect Scene Changes and store in ScanDB 

#DBSC_Override(ScanDB,OVERRIDE)
#DBSC_WriteFiles(ScanDB,Start_Fn,End_Fn,Range_fn,Mid_Fn,ClipClop_Fn,VideoFilename=VideoFileName,comment=True)

#Return Last

Return DBSC_SubsClip(InfoDB,ScanDB,Subs=True,Metrics=true,Metrics2=true)    # View detections
#Return DBSC_StackSceneChanges(Last,InfoDB,ScanDB)                           # Check detections START/END of scene STACKED.

# Or Drop through to below to demo DBSC_Select() 
#BilinearResize(Width*2,Height*2)    # DBSC_Select clips need only be same number of frames as ScanDB detection clip.  
SIZE = Round(Height/8.0)
MOTIONCLIP = SubTitle("MOTION",Align=5,size=SIZE,text_color=$80FFC0)
STARTCLIP  = SubTitle("START OF SCENE",Align=5,size=SIZE,y=(Height+SIZE)/2,text_color=$C080FF)
ENDCLIP    = SubTitle("END OF SCENE"  ,Align=5,size=SIZE,y=(Height-SIZE)/2,text_color=$FF80C0)
SINGLECLIP = SubTitle("START OF SCENE\nEND OF SCENE",Align=5,size=SIZE,y=(Height-SIZE)/2,text_color=$C0FF80,lsp=0)
Return DBSC_Select(MOTIONCLIP,ScanDB,STARTCLIP,ENDCLIP,SINGLECLIP)
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 4th February 2015 at 08:39.
StainlessS is offline   Reply With Quote