My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * 3 UDF * 3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * 3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * com #EndRegion **** Directives created by AutoIt3Wrapper_GUI **** #FUNCTION# Name.: _tcAdd Description.: Returns addition of two timecodes Syntax.: _tcAdd($fTc1, fTc2 ) Parameters.: $fTc1 - First timecode in hh:mm:ss.ff format $fTc2 - Second timecode in hh:mm:ss.ff format $fFormat - Time base - "P" (default): PAL (25 fps) "M" : millisecond Return value.: Sum of the two timecode in the selected format Func _tcAdd ( $fTc1, $fTc2, $fFormat = "P", $fHourFormat = 1 ) Local $fMs1 = _tcToMs ( $fTc1 ) Local $fMs2 = _tcToMs ( $fTc2 ) Local $fSumMs = $fMs1 + $fMs2 Return _msToTc ( $fSumMs, $fFormat, $fHourFormat ) EndFunc #FUNCTION# Name.: _tcsSub Description.: Returns addition of two timecodes Syntax.: _tcSub($fTc1, fTc2 ) Parameters.: $fTc1 - First timecode in hh:mm:ss.ff format $fTc2 - Second timecode in hh:mm:ss.ff format $fFormat - Time base - "P" (default): PAL (25 fps) "M" : millisecond Return value.: Subtract $fTc2 from $fTc1 in the source format Func _tcSub ( $fTc1, $fTc2, $fFormat = "P" ) Local $fMs1 = _tcToMs ( $fTc1 ) Local $fMs2 = _tcToMs ( $fTc2 ) Local $fSumMs = $fMs1 - $fMs2 If $fSumMs $palTC1 = "00:01:12.20" $palTC2 = "23:59:50.02" $msTC1 = "00:01:12.800" $msTC2 = "23:59:50.120" MsgBox ( 0, "1", _tcAdd ( $palTC1, $palTC2 ) ) Adds $palTC1 to $palTC2, turns hour back to 0 after 23, returns PAL TC format MsgBox ( 0, "2", _tcAdd ( $palTC1, $palTC2, "M" ) ) Adds $palTC1 to $palTC2, turns hour back to 0 after 23, returns time with milliseconds format MsgBox ( 0, "3", _tcAdd ( $palTC1, $palTC2, "M", 0 ) ) Adds $palTC1 to $palTC2, hours can be infinite, returns time with milliseconds format MsgBox ( 0, "4", _tcAdd ( $msTC1, $msTC2 ) ) Adds $palTC1 to $palTC2, turns hour back to 0 after 23, returns PAL TC format MsgBox ( 0, "5", _tcAdd ( $msTC1, $msTC2, "M" ) ) Adds $palTC1 to $palTC2, turns hour back to 0 after 23, returns time with milliseconds format MsgBox ( 0, "6", _tcAdd ( $msTC1, $msTC2, "M", 0 ) ) Adds $palTC1 to $palTC2, hours can be infinite, returns time with milliseconds format MsgBox ( 0, "7", _tcSub ( $palTC2, $palTC1 ) ) Subtract $palTC1 from $palTC2, returns PAL TC format MsgBox ( 0, "8", _tcSub ( $palTC2, $palTC1, "M" ) ) Subtract $palTC1 from $palTC2, time with milliseconds format MsgBox ( 0, "9", _tcSub ( $msTC1, $msTC2 ) ) Subtract $palTC1 from $palTC2, returns PAL TC format - when hits zero, counts back from 24:00:00.00 MsgBox ( 0, "10", _tcSub ( $msTC1, $msTC2, "M" ) ) Subtract $palTC1 from $palTC2, time with milliseconds format - when hits zero, counts back from 24:00:00.000 MsgBox ( 0, "11", _tcFormatChange ( $palTC2 ) ) Convert PAL TC to time with milliseconds and back MsgBox ( 0, "12", _tcFormatChange ( $msTC2 ) ) Convert PAL TC to time with milliseconds and backĪny of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. BUT, they make up for that by having a format that doesn’t exist, except for timing…23.98 DF.Expand collapse popup #Region **** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Description=PAL Timecode Calculator UDF #AutoIt3Wrapper_Res_LegalCopyright=horvath. Because the calculator does a frame-for-frame conversion. If you make the mistake, like I did, of going from 23.98 NDF to 29.97 DF, then the timing will be WAY off. I have done lots of tests and every time it came up right. Now, while that format doesn’t really exist (no tapes can record 23.98 DF), what that setting does is convert the NDF timing to a proper DF timing. The calculator includes a conversion for 23.98 DF. And while I have had this little application for a while, but it never did a proper conversion.until now. Before this, I had to rely on the method I laid out in this blog post. Mainly because finally it will properly convert a 23.98 NDF timeline timing into drop frame. So much that I now can recommend it to many people. The TIMECODE CALCULATOR by Netmedia Software has GREATLY improved.
0 Comments
Leave a Reply. |