[Touchdesigner] Loading Multiple Video Source

Myungduk Kim·2023년 2월 14일
0

touchdesigner

목록 보기
1/1
post-thumbnail
[playback system]

Loading multiple video source from the folder, create a list & click to play

Get an information from playback

ie) _rate, frames, length, resolution 

Function that return the info of video source

def getSourceInfo():
	srcInfo = op('srcInfo')	# Tis is a new 'table' operator
    srcInfo.clear()			#clear table
    src.appendRow(['name', 'rates', 'length', 'audio', 'resx', 'resy']) # crate name on table DAT

Create a list that corrects the copy of video source(replicants).
Loop through all the instancing[item*] and retrieve the information, then assign it to the list.

def getSourceInfo():

item = []											#create an empty list
path_to_item = op('project1/main_/your_path_here')	#path to the multiple source
item = path_to_item.ops('item*')					#grap the copies, put into the list, don't forget ' '
srcName = op('srcName_')							#extrude the name in 'table' list
#print(item)
srcInfo = op('srcInfo')	
srcInfo.clear()			
src.appendRow(['name', 'rate', 'length', 'frames', 'audio', 'resx', 'resy'])

for k in range(1, len(item) + 1):
	startPath = 'item{index}.format(index=k)
    endPath =  '/player'
    combine = op(startPath + endPath)
    appendRow([srcName[k, 0],combine.rates, combine.numSeconds, combine.numImages, combine.hasAudio, combine.fileWidth, combine.fileHeight])

profile
Media Artist | Composer | Creative coder | Builder of strange sounds

0개의 댓글