def ffmpeg_extract_subclip(filename, t1, t2, targetname=None):
 (name, ext) = os.path.splitext(filename)
 if (not targetname):
  (T1, T2) = [int((1000 * t)) for t in [t1, t2]]
  targetname = (name + '%sSUB%d_%d.%s'(name, T1, T2, ext))
 cmd = [get_setting('FFMPEG_BINARY'), '-y', '-i', filename, '-ss', ('%0.2f' % t1), '-t', ('%0.2f' % (t2 - t1)), '-vcodec', 'copy', '-acodec', 'copy', targetname]
 subprocess_call(cmd)

def ffmpeg_extract_subclip ( filename , t1 , t2 , targetname = None ) : ( name , ext ) = os . path . splitext ( filename ) if ( not targetname ) : ( T1 , T2 ) = [ int ( ( 1000 * t ) ) for t in [ t1 , t2 ] ] targetname = ( name + '%sSUB%d_%d.%s' ( name , T1 , T2 , ext ) ) cmd = [ get_setting ( 'FFMPEG_BINARY' ) , '-y' , '-i' , filename , '-ss' , ( '%0.2f' % t1 ) , '-t' , ( '%0.2f' % ( t2 - t1 ) ) , '-vcodec' , 'copy' , '-acodec' , 'copy' , targetname ] subprocess_call ( cmd )
makes a new video file playing video file filename between the times t1 and t2 .