Advertisement
AzraelNewtype

ugly loop

Nov 6th, 2011
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     for thread in range(1, total_threads + 1):
  2.         new_lossless = lossless.replace('[NUM]', str(thread))
  3.         joined_avs.write('tmp = FFVideoSource("{0}",colorspace="YV12_10-bit_hack",track=-1,pp="")\n'.format(new_lossless))
  4.         if(thread == 0):
  5.             if(total_threads == 1):
  6.                 #first and only thread
  7.                 joined_avs.write('total1 = tmp\n')
  8.             else:
  9.                 #first thread
  10.                 joined_avs.write('total1 = tmp.Trim(0,tmp.FrameCount() - 51)\n')
  11.         elif(thread == total_threads - 1):
  12.             #final thread
  13.             joined_avs.write('total1 = total1 + tmp.Trim(51,tmp.FrameCount())\n')
  14.         else:
  15.             joined_avs.write('total1 = total1 + tmp.Trim(51,tmp.FrameCount() - 51)\n')
  16.  
  17.  
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement