Samples/Story/ImageSequenceFrameRateChange.py

Samples/Story/ImageSequenceFrameRateChange.py
1 # Copyright 2011 Autodesk, Inc. All rights reserved.
2 # Use of this software is subject to the terms of the Autodesk license agreement
3 # provided at the time of installation or download, or which otherwise accompanies
4 # this software in either electronic or hard copy form.
5 #
6 # This script demonstrates the ability to change the FrameRate of an image sequence.
7 #
8 # Topic: FBVideoClipImage FBTimeMode
9 #
10 from pyfbsdk import FBVideoClipImage, FBTimeMode, FBVideoClip, FBSystem
11 import os.path
12 
13 # Set to where the image sequence located before run it.
14 lFileName = os.path.join(FBSystem().ConfigPath, 'Scripts/Samples/Story/sample_image_sequence0000.jpg')
15 lFileName = os.path.normpath(lFileName)
16 
17 lImageSquence = FBVideoClipImage('ImageSquence')
18 lImageSquence.Filename = lFileName
19 
20 # Set as an image sequence.
21 lImageSquence.ImageSequence = True
22 # Set do not use system FrameRate, so we are able to set the FrameRate.
23 lImageSquence.UseSystemFrameRate = False
24 
25 
26 # Set the FrameRate through the TimeMode property.
27 lImageSquence.TimeMode = FBTimeMode.kFBTimeMode30Frames
28 
29 # Set the FrameRate through the FrameRate property.
30 lImageSquence.FrameRate = 50