Package: dftt-timecode
dftt_timecode1. 简介 Introduction为影视行业设计的Python时码库，支持HFR高帧率以及其他丰富的功能。Python timecode library for film and TV industry supports HFR and a bunch of cool features.DFTT是Department of Film and TV Technology of Beijing Film Academy的简称。DFTT stands for the short of Department of Film and Tv Technology of Beijing Film Academy.1.1 主要功能 Main Features支持多种时码格式输入，如SMPTE、SRT、DLP（Cine Canvas）、FFMPEG、FCPX、帧号、现实时间等。Multiple timecode format support, including SMPTE, SRT, DLP(Cine Canvas), FFMPEG, FCPX, frame count, time, etc.支持高帧率，目前支持0.01-999.99fps范围内的帧率。High frame rate support, currently supports frame range from 0.01 to 999.99fps.支持严格的丢帧/非丢帧SMPTE格式。Strictly support SMPTE DF/NDF format.目前支持-99到99小时时间范围。Currently support time range from -99 to 99 hours.支持严格模式，在该模式下时码会在0-24小时范围内循环，任意超出该范围的时码会自动转换至范围内。StrictMode support, the timecode will circulate from 0 to 24 hours, any timecode outside this range will be automatically converted to a timecode inside it.内部以高精度时间戳进行存储和计算，各类FPS转换、时码格式转换输出都能保持最高精度。Uses high precision timestamp inside for storage and calculation, any FPS conversion or format conversion output can maintain their highest precision.常用运算符支持，包括时码与时码、时码与数字的各类加减乘除、比较运算。Common operator support, including addition, subtraction, multiplication, division, and comparison operator between two timecode objects or a timecode object and a number.2. 如何安装 How to installpythonpipinstalldftt_timecode2.1 包依赖 Package dependencyfractionsloggingmathfunctoolsre3. 使用方法说明 How to use3.1 导入 Importfromdftt_timecodeimportDfttTimecode3.2 新建时码类对象 Create timecode objectsa=DfttTimecode('01:00:00:00','auto',fps=24,drop_frame=False,strict=True)#以SMPTE非丢帧时码新建对象 Create object using SMPTE NDFa=DfttTimecode('1000f','auto',fps=119.88,drop_frame=True,strict=True)#以帧数新建对象 Create object using frame counta=DfttTimecode('3600.0s','auto',fps=Fraction(60000,1001),drop_frame=True,strict=True)#以时间秒新建对象 Create object using timea=DfttTimecode(-1200,'auto',fps=23.976,drop_frame=False,strict=False)#以int帧数新建对象 Create object using int frame count对DfttTimecode()相关参数的详细说明，请查阅4.1 DfttTimecode()参数说明。For detailed parameters descriptions of DfttTimecode(), please refer to chapter4.1 Parameters Descriptions of DfttTimecode().3.3 操作时码类对象 Operate DfttTimecode objectsa=DfttTimecode('01:00:00:00','auto',fps=24,drop_frame=False,strict=True)asserta.type=='smpte'asserta.fps==24asserta.framecount==86400asserta.timestamp==3600.0asserta.is_drop_frame==Falseasserta.is_strict==Trueasserta.timecode_output('smpte',output_part=0)=='01:00:00:00'asserta.timecode_output('srt',output_part=1)=='01'a=DfttTimecode('25:00:01:103','auto',fps=120,drop_frame=False,strict=False)a.set_fps(24)asserta.fps==24asserta.timecode_output('smpte')=='25:00:01:21'a.set_strict(strict=True)asserta.timecode_output('smpte')=='01:00:01:21'a.set_strict(strict=False)asserta.is_strict==False对时码类对象操作的详细说明，请查阅4.2 时码类对象操作说明。For detailed descriptions of DfttTimecode objects' operations, please refer to chapter4.2 Descriptions of DfttTimecode class operations.3.4 时码类运算符 Operators of DfttTimecode classa=DfttTimecode('01:00:00:00','auto',fps=24,drop_frame=False,strict=True)b=DfttTimecode('01:12:34:12','auto',fps=24,drop_frame=False,strict=True)print(a)# <DfttTimecode>(Timecode:01:00:00:00, Type:smpte, FPS:24.00 NDF, Strict)print(-a)# <DfttTimecode>(Timecode:23:00:00:00, Type:smpte, FPS:24.00 NDF, Strict)print(a+b)# <DfttTimecode>(Timecode:02:12:34:12, Type:smpte, FPS:24.00 NDF, Strict)print(a-b)# <DfttTimecode>(Timecode:23:47:25:12, Type:smpte, FPS:24.00 NDF, Strict)print(a*2)# <DfttTimecode>(Timecode:02:00:00:00, Type:smpte, FPS:24.00 NDF, Strict)print(a/2)# <DfttTimecode>(Timecode:00:30:00:00, Type:smpte, FPS:24.00 NDF, Strict)print(a==b)# Falseprint(a!=b)# Trueprint(a>b)# Falseprint(a>=b)# Falseprint(a<b)# Trueprint(a<=b)# True对时码类运算符的详细说明，请查阅4.3 时码类运算符说明For detailed descriptions of DfttTimecode's operators, please refer to chapter4.3 Descriptions of DfttTimecode class operators.4 参数详细说明 Detailed Parameters Descriptions4.1 DfttTimecode()参数说明 Parameters Descriptions of DfttTimecode()4.1.1 参数一览 General Descriptionsa=DfttTimecode(timecode_value,timecode_type,fps,drop_frame,strict)timecode_value是时码对象的时码值，可以是str、int、float、tuple、list、Fraction类型。timecode_valueis the value of a timecode, it can be astr,int,float,tuple,list,or aFraction.timecode_type是时码对象的类型，是str类型，目前支持的时码类型包括auto、smpte、srt、ffmpeg、fcpx、frame、time。timecode_typemust be astr, currently supported timecode types includeauto,smpte,srt,ffmpeg,fcpx,frame,time.fps是时码对象的帧率，可以是int、float、Fraction类型。fpsis the frame rate of the timecode object, can be anint,float, or aFraction.drop_frame是时码对象的丢帧设置，是bool类型，只有当帧率存在丢帧格式时，这一设置才会生效，否则会强制将丢帧设为False。drop_frame的默认值是False。drop_framemust be abool, a timecode object can only be drop-frameable under specific frame rate settings, if not so,drop_framewill be forced toFalse. The default value ofdrop_frameisFalse.strict为时码对象设置严格模式，是bool类型。设为True后，负值和超过24小时的时码都将被转换为0-24小时范围内的值，例如25:00:00:00将被转换为01:00:00:00,-01:00:00:00将被转换为23:00:00:00。strict的默认值是True。strictwill set the strict mode for a timecode object, it must be abool. When set toTrue, negative timecode value and timecode value over 24 hours will be converted to a value inside the range 0 to 24 hours. For example, 25:00:00:00 will be converted to 01:00:00:00, -01:00:00:00 will be converted to 23:00:00:00. The default value ofstrictisTrue.4.1.2 timecode_valuetimecode_value决定了时码对象的时间值，DfttTimecode支持以多种类型的数据初始化时间值，且都支持负数。下面详细列出了各个数据类型对应的（可选）初始化方式：timecode_valuedetermines the actual time of a timecode object. DfttTimecode supports initialize time by different data types, including negative numbers. The following table lists different data types and their supported initialization methods.数据类型Data type支持的初始化方式Supported initialization methodsstrauto,smpte,srt,ffmpeg,fcpx,frame,timeintauto,frame,timefloatauto,timetupleauto,timelistauto,timefractionauto,time目前，DfttTimecode不支持以小数为单位的帧计数方式。Currently, DfttTimecode does not support frame count value in decimals.4.1.3 timecode_typetimecode_type决定了时码对象的类型。DfttTimecode支持自动判断类型，也支持手动指定类型。在部分场景，如输入值是int类时，手动指定类型可以有效地区分以帧计数初始化时码和以时间初始化时码这两种行为。timecode_typedetermines the timecode type of a timecode object. DfttTimecode supports auto-configure timecode type as well as manual assign a timecode type. Under some circumstances, for example, the input data isint, manual assign a timecode type is a sufficient way to clarify whether the input is intended to be a frame or a time value.下表列出了一系列样例**timecode_value** 输入和他们在'auto'模式下对应的时码类型：The following sheet gives a list of exampletimecode_valueinput and their corresponding timecode type under'auto'mode.timecode_valueauto模式下的typeType under auto mode备注Comment'01:00:00:00'smptedrop_frame将自动设为Falsedrop_framewill be set toFalse'01:00:00;00','01:00:00;000'smptedrop_frame将自动设为Truedrop_framewill be set toTrue'01:00:00:000'smpte高帧率smpte时码，形式与dlp相近，如果输入值为dlp请强制指认**timecode_type** 为dlpHigh frame rate timecode, this format is similar todlptimecode, so if your input timecode is actually indlpformat, please forcetimecode_typetodlp'01:00:00,000'srt最后三位表示毫秒The last three digits represent milliseconds'01:00:00.00'ffmpeg最后两位表示秒的小数部分The last two digits represent the decimal part of a second'1/24s','1/24'fcpx可以省略“s”scan be omitted'1000f,'1000'frame可以省略“f”fcan be omitted’1000s','1000.0','1000.0s'time可以省略“s”scan be omitted1000frameint数据会自动被认定为frame类intdata will be considered as aframetype1000.0timefloat数据会自动被认定为time类floatdata will be considered as atimetype[1000, 2000]time前者会成为Fraction的分子，后者成为分母the former part will become the numerator of aFraction, and the latter will become the dominator(1000, 2000)time前者会成为Fraction的分子，后者成为分母the former part will become the numerator of aFraction, and the latter will become the dominatorFraction(1000, 2000)time也可以直接传入一个Fraction对象Just passing aFractionobject is also acceptable如果输入的时码值与所选择的时码类型不匹配，会抛出错误。If the input timecode value does not match the given timecode type, an error will be raised.4.1.4 fpsfps是时码对象的帧率，可以是int、float、Fraction类型。fpsis the frame rate of the timecode object, can be anint,floator aFraction.4.1.5 drop_framedrop_frame是时码对象的丢帧设置，是bool类型，只有当帧率存在丢帧格式时，这一设置才会生效，否则会强制将丢帧设为False。drop_frame的默认值是False。drop_framemust be abool, a timecode object can only be drop-frameable under specific frame rate settings, if not so,drop_framewill be forced toFalse. The default value ofdrop_frameisFalse.当**timecode_type** 为auto时，会根据输入数据的分隔符自动设置**drop_frame** 。Whentimecode_typeis set toauto,drop_framewill be auto-set according to the separator of the input data.当**timecode_value** 在当前**drop_frame** 设置下不合法时（仅当**timecode_type** 为smpte时会有这种情况），将会报错。Whentimecode_valueis illegal under the currentdrop_framesetting (this should only happen whentimecode_typeissmpte), there will be an error.4.1.6 strictstrict为时码对象设置严格模式，是bool类型。设为True后，负值和超过24小时的时码都将被转换为0-24小时范围内的值，例如25:00:00:00将被转换为01:00:00:00,-01:00:00:00将被转换为23:00:00:00。strict的默认值是True。strictwill set the strict mode for a timecode object, it must be abool. When set toTrue, negative timecode value and timecode value over 24 hours will be converted to a value inside the range 0 to 24 hours. For example, 25:00:00:00 will be converted to 01:00:00:00, -01:00:00:00 will be converted to 23:00:00:00.The default value ofstrictisTrue.特别地，对于丢帧时码，由于严格模式的规则是不出现超过24:00:00:00的时码（实际上这个值会被转为00:00:00:00）。因此，在该模式下可容纳的总帧数会小于相同帧率的非丢帧时码。In particular, as for a drop-frame timecode, the rule of strict mode does not allow a timecode value greater than 24:00:00:00 (actually, this value will be converted to 00:00:00:00). So, the maximum frame count number a drop-frame timecode can reach under strict mode will be less than a timecode with the same framerate but set to non-drop-frame mode.4.1.7 补充说明 Additional info暂无。Currently, this part intentionally remains blank.4.2 时码类对象操作说明 Descriptions of DfttTimecode class operations4.2.1 self.typea=DfttTimecode('01:00:00:00','auto',fps=24,drop_frame=False,strict=True)asserta.type=='smpte'返回DfttTimecode对象的**timecode_type** 属性，返回类型为str。Returns thetimecode_typeattribute of a DfttTimecode object, returned data type isstr.4.2.2 self.fpsa=DfttTimecode('01:00:00:00','auto',fps=24,drop_frame=False,strict=True)asserta.fps==24返回DfttTimecode对象的**fps** 属性，返回类型取决于设置fps所用的变量类型。Returns thefpsattribute of a DfttTimecode object, returned data type is determined by the data type used to set thefpsattribute.4.2.3 self.framecounta=DfttTimecode('01:00:00:00','auto',fps=24,drop_frame=False,strict=True)asserta.framecount==86400返回DfttTimecode对象从0时间起经过的总帧数，返回类型为int。Returns the total frame count from 0 of a DfttTimecode, returned data type isint.4.2.4 self.timestampa=DfttTimecode('01:00:00:01','auto',fps=24,drop_frame=False,strict=True)asserta.timestamp==3600.04167返回DfttTimecode对象从0时间起经过的总时长，返回类型为float，精度为5位小数。Returns the total time elapsed from 0 of a DfttTimecode, returned data type isfloat, the precision of the returned value is 5 decimal places.4.2.5 self.is_drop_framea=DfttTimecode('01:00:00:00','auto',fps=24,drop_frame=False,strict=True)asserta.is_drop_frame==False返回DfttTimecode对象的**drop_frame** 属性，返回类型为bool.Returns thedrop_frameattribute of a DfttTimecode object, returned data type isbool.4.2.6 self.is_stricta=DfttTimecode('01:00:00:00','auto',fps=24,drop_frame=False,strict=True)asserta.is_strict==True返回DfttTimecode对象的**strict** 属性，返回类型为bool.Returns thestrictattribute of a DfttTimecode object, returned data type isbool.4.2.7 self.set_fps()a=DfttTimecode('01:00:00:101','auto',fps=120,drop_frame=False,strict=True)a.set_fps(24,rounding=True)a.set_fps(120)asserta.timecode_output('smpte')=='01:00:00:100'该函数会更改DfttTimecode对象的帧率，并可以选择在更改帧率时是否取整。This function will change the frame rate of a DfttTimecode object, you can choose whether or not to round the timecode value while changing the frame rate.self.set_fps()函数共有两个参数，分别是**dest_fps** 和**rounding**。There are two parameters ofself.set_fps(), they aredest_fpsandrounding.dest_fps是帧率转换的目标帧率，可以是int、float、Fraction类型。dest_fpsis the target frame rate of this transform, it can be a,nint,float, or aFraction.rounding决定了帧率转换过程中是否舍入时间戳以对齐帧，具体可以参考下面的示例代码。roundingdetermines whether to round the time stamp to align to the exact frame while converting the frame rate, you can refer to the following example code to see how it works.a=DfttTimecode('01:00:00:101','auto',fps=120,drop_frame=False,strict=True)a.set_fps(24,rounding=False)a.set_fps(120)asserta.timecode_output('smpte')=='01:00:00:101'a.set_fps(24,rounding=True)a.set_fps(120)asserta.timecode_output('smpte')=='01:00:00:100'4.2.8 self.set_type()a=DfttTimecode('01:00:00,123','auto',fps=24)a.set_type('smpte',rounding=True)asserta.type=='smpte'a.set_type('srt')asserta.timecode_output('srt')=='01:00:00,125'该函数会更改DfttTimecode对象的时码类型，并可以选择在更改类型时是否取整。This function will change the timecode type of a DfttTimecode object, you can choose whether or not to round the timecode value while changing the timecode type.self.set_type()函数共有两个参数，分别是**dest_type** 和**rounding**。self.set_type()has two parameters, they aredest_typeandrounding.dest_type是时码类型转换的目标时码类型，可以是除'auto'以外的任何一个支持的时码类型。dest_typeis the target timecode type of this transform, it can be any supported timecode type except'auto'.rounding决定了时码类型转换过程中是否舍入时间戳以对齐帧，具体可以参考下面的示例代码。roundingdetermines whether to round the time stamp to align to the exact frame while converting the timecode type, you can refer to the following example code to see how it works.a=DfttTimecode('01:00:00,123','auto',fps=24)asserta.type=='srt'a.set_type('smpte',rounding=True)asserta.type=='smpte'asserta.timecode_output('srt')=='01:00:00,125'4.2.9 self.set_strict()a=DfttTimecode('25:01:02:05','auto',fps=24,strict=False)a.set_strict()asserta.is_strict==Trueasserta.timecode_output('smpte')=='01:01:02:05'a.set_strict(strict=False)asserta.is_strict==False该函数会更改DfttTimecode对象的strict模式布尔值。This function will change the strict mode bool value of a DfttTimecode object.self.set_strict()只有一个参数，即**strict** 。strict的类型是bool，默认值为True。self.set_strict()has one parameter, which isstrict. The data type ofstrictisbool, the default value ofstrictisTure.4.2.10 self.timecode_output()a=DfttTimecode('01:02:03:05','auto',fps=24)asserta.timecode_output()=='01:02:03:05'asserta.timecode_output('srt')=='01:02:03,208'asserta.timecode_output('srt',output_part=1)=='01'asserta.timecode_output('srt',output_part=2)=='02'asserta.timecode_output('srt',output_part=3)=='03'asserta.timecode_output('srt',output_part=4)=='208'该函数会以指定类型和部分返回DfttTimecode对象的时码值，返回类型为str。This function will return the timecode value of a DfttTimecode object in the given timecode type and partition number format, the returned data type isstr.self.timecode_output()有两个参数，分别是**dest_type** 和**output_part** 。self.timecode_output()has two parameters, they aredest_typeandoutput_part.dest_type是输出时码的类型，可以是任何一个支持的时码类型，它的默认值是'auto'，此时会根据DfttTimecode对象自身的时码类型决定输出类型。dest_typeis the type of the output timecode value, it can be any supported timecode type, the default value of it is'auto', which means the function will determine the output timecode type according to the timecode type of the DfttTimecode object itself.output_part是输出的部分，它应是一个int值。它的默认值是0，即完整输出。1到4依次代表输出从左至右的每个时码部分。output_partis the partition of the output timecode value, it is anint. The default value of it is 0, which means a complete output. Each of 1 to 4 represents an output timecode part from left to right.4.3 时码类运算符说明 Descriptions of DfttTimecode class operators4.3.1 print(self)该运算符会打印DfttTimecode对象相关的基本信息，如下所示。This operator will print basic information of a DfttTimecode object, as the following codes show.a=DfttTimecode('01:00:00,123','srt',fps=24,drop_frame=False,strict=True)print(a)# <DfttTimecode>(Timecode:01:00:00,123, Type:srt, FPS:24.00 NDF, Strict)4.3.2 -self该运算符会将DfttTimecode对象的时码值取负，且不改变其他属性，如下所示。This operator will yield the negation of the timecode value of a DfttTimecode object, and won't affect any of the rest attributes, as the following codes show.a=DfttTimecode('01:00:00,123','srt',fps=24,drop_frame=False,strict=True)print(-a)# <DfttTimecode>(Timecode:22:59:59,877, Type:srt, FPS:24.00 NDF, Strict)4.3.3 +该运算符可以将两个DfttTimecode对象相加，或将DfttTimecode对象与int，float或Fraction相加。This operator can add two DfttTimecode objects together, or add a DfttTimecode object with anint,float, or aFraction.当DfttTimecode对象与int相加时，int值将被当作帧计数处理。当DfttTimecode对象与float或Fraction相加时，后者的值将被当作时间戳处理。When adding a DfttTimecode object with anint, theintwill be considered as a frame number. When adding a DfttTimecode object with afloator aFraction, the latter will be considered as a time stamp.相加的DfttTimecode对象必须拥有相同的帧率。The two DfttTimecode objects to perform the addition must have the same frame rate.4.3.4 -该运算符可以将两个DfttTimecode对象相减，或将DfttTimecode对象与int，float或Fraction相减。This operator can perform a subtraction between two DfttTimecode objects, or perform a subtraction between a DfttTimecode object and anint,float, or aFraction.当DfttTimecode对象与int相减时，int值将被当作帧计数处理。当DfttTimecode对象与float或Fraction相加时，后者的值将被当作时间戳处理。When performing a subtraction between a DfttTimecode object and anint, theintwill be considered as a frame number. When performing a subtraction between a DfttTimecode object and afloator aFraction, the latter will be considered as a time stamp.相减的DfttTimecode对象必须拥有相同的帧率。The two DfttTimecode objects to perform the subtraction must have the same frame rate.4.3.5 *该运算符可以将一个DfttTimecode对象与一个int，float或Fraction相乘，后者的数学意义是倍数。This operator can perform a multiplication between a DfttTimecode object and anint,float, or aFraction, the mathematical meaning of the latter is a factor.4.3.6 /该运算符可以将一个DfttTimecode对象与一个int，float或Fraction相除，后者的数学意义是倍数。This operator can perform a division between a DfttTimecode object and anint,float, or aFraction, the mathematical meaning of the latter is a factor.需要注意的是，只有当DfttTimecode对象作为被除数时，除法运算才是有意义的，DfttTimecode对象不能作除数。Please be noted, the division operation only makes sense when the DfttTimecode object is used as the dividend, the DfttTimecode object cannot be used as a divisor.4.3.7 ==该运算符可以比较两个DfttTimecode对象是否相等，或比较DfttTimecode对象和int，float或Fraction是否相等。This operator can perform a comparison between two DfttTimecode objects, or perform a comparison between a DfttTimecode object and anint,float, or aFraction, to tell whether they are equal to each other.当两个DfttTimecode对象作比较时，将比较二者的时间戳。当DfttTimecode对象与int作比较时，int值将被当作帧计数处理。当DfttTimecode对象与float或Fraction作比较时，后者的值将被当作时间戳处理。When performing a comparison between two DfttTimecode objects, a comparison of their timestamp will be performed. When performing a comparison between a DfttTimecode object and anint, theintwill be considered as a frame number. When performing a comparison between a DfttTimecode object and afloator aFraction, the latter will be considered as a time stamp.4.3.8 !=该运算符可以比较两个DfttTimecode对象是否相等，或比较DfttTimecode对象和int，float或Fraction是否相等。This operator can perform a comparison between two DfttTimecode objects, or perform a comparison between a DfttTimecode object and anint,float, or aFraction, to tell whether they are equal to each other.当两个DfttTimecode对象作比较时，将比较二者的时间戳。当DfttTimecode对象与int作比较时，int值将被当作帧计数处理。当DfttTimecode对象与float或Fraction作比较时，后者的值将被当作时间戳处理。When performing a comparison between two DfttTimecode objects, a comparison of their timestamp will be performed. When performing a comparison between a DfttTimecode object and anint, theintwill be considered as a frame number. When performing a comparison between a DfttTimecode object and afloator aFraction, the latter will be considered as a time stamp.4.3.9 >该运算符可以比较两个DfttTimecode对象的大小，或比较DfttTimecode对象和int，float或Fraction的大小。This operator can perform a comparison between two DfttTimecode objects, or perform a comparison between a DfttTimecode object and anint,float, or aFraction, to tell which one is the greater one.当两个DfttTimecode对象作比较时，将比较二者的时间戳。当DfttTimecode对象与int作比较时，int值将被当作帧计数处理。当DfttTimecode对象与float或Fraction作比较时，后者的值将被当作时间戳处理。When performing a comparison between two DfttTimecode objects, a comparison of their timestamp will be performed. When performing a comparison between a DfttTimecode object and anint, theintwill be considered as a frame number. When performing a comparison between a DfttTimecode object and afloator aFraction, the latter will be considered as a time stamp.4.3.10 >=该运算符可以比较两个DfttTimecode对象的大小，或比较DfttTimecode对象和int，float或Fraction的大小。This operator can perform a comparison between two DfttTimecode objects, or perform a comparison between a DfttTimecode object and anint,float, or aFraction, to tell which one is the greater one.当两个DfttTimecode对象作比较时，将比较二者的时间戳。当DfttTimecode对象与int作比较时，int值将被当作帧计数处理。当DfttTimecode对象与float或Fraction作比较时，后者的值将被当作时间戳处理。When performing a comparison between two DfttTimecode objects, a comparison of their timestamp will be performed. When performing a comparison between a DfttTimecode object and anint, theintwill be considered as a frame number. When performing a comparison between a DfttTimecode object and afloator aFraction, the latter will be considered as a time stamp.4.3.11 <该运算符可以比较两个DfttTimecode对象的大小，或比较DfttTimecode对象和int，float或Fraction的大小。This operator can perform a comparison between two DfttTimecode objects, or perform a comparison between a DfttTimecode object and anint,float, or aFraction, to tell which one is the greater one.当两个DfttTimecode对象作比较时，将比较二者的时间戳。当DfttTimecode对象与int作比较时，int值将被当作帧计数处理。当DfttTimecode对象与float或Fraction作比较时，后者的值将被当作时间戳处理。When performing a comparison between two DfttTimecode objects, a comparison of their timestamp will be performed. When performing a comparison between a DfttTimecode object and anint, theintwill be considered as a frame number. When performing a comparison between a DfttTimecode object and afloator aFraction, the latter will be considered as a time stamp.4.3.12 <=该运算符可以比较两个DfttTimecode对象的大小，或比较DfttTimecode对象和int，float或Fraction的大小。This operator can perform a comparison between two DfttTimecode objects, or perform a comparison between a DfttTimecode object and anint,float, or aFraction, to tell which one is the greater one.当两个DfttTimecode对象作比较时，将比较二者的时间戳。当DfttTimecode对象与int作比较时，int值将被当作帧计数处理。当DfttTimecode对象与float或Fraction作比较时，后者的值将被当作时间戳处理。When performing a comparison between two DfttTimecode objects, a comparison of their timestamp will be performed. When performing a comparison between a DfttTimecode object and anint, theintwill be considered as a frame number. When performing a comparison between a DfttTimecode object and afloator aFraction, the latter will be considered as a time stamp.