package Ġcz . kot ox . core . ffmpeg . command Ċ Ċ import Ġcz . kot ox . core . ffmpeg . model . Video Composition Item Ċ Ċ /** Ċ Ġ* ĠStart Ġcounting Ġvideo ĠP TS ( presentation Ġtimestamp ) Ġfrom Ġzero . Ċ Ġ*/ Ċ internal Ġfun Ġget Video Reset Timestamp Filter () Ġ= Ġ" set pts = PT S - STAR TP TS " Ċ Ċ /** Ċ Ġ* ĠStart Ġcounting Ġaudio ĠP TS ( presentation Ġtimestamp ) Ġfrom Ġzero . Ċ Ġ*/ Ċ internal Ġfun Ġget Audio Reset Timestamp Filter () Ġ= Ġ" aset pts = PT S - STAR TP TS " Ċ Ċ internal Ġfun Ġget Video Trim Filter ( item : ĠVideo Composition Item ) Ġ= Ċ ĉ " trim =${ millis To FF M PEG Time Duration ( item . startTime In Millis )} :${ millis To FF M PEG Time Duration ( item . endTime In Millis )}" Ċ Ċ internal Ġfun Ġget Audio Trim Filter ( item : ĠVideo Composition Item ) Ġ= Ċ ĉ " at rim =${ millis To FF M PEG Time Duration ( item . startTime In Millis )} :${ millis To FF M PEG Time Duration ( item . endTime In Millis )}" Ċ Ċ /** Ċ Ġ* Ġhttps :// ffmpeg . org / ffmpeg - utils . html # Time - duration Ċ Ġ* Ġ[- ] S + [ . m ...] Ċ Ġ* ĠS Ġexp resses Ġthe Ġnumber Ġof Ġseconds , Ġwith Ġthe Ġoptional Ġdecimal Ġpart Ġm . Ċ Ġ* ĠThe Ġoptional ĠâĢĺ - âĢĻ Ġindicates Ġnegative Ġduration . Ċ Ġ*/ Ċ private Ġfun Ġmillis To FF M PEG Time Duration ( time In Millis : ĠLong ): ĠString Ġ= Ġ"${ time In Millis . div ( 1 0 0 0 )}. ${ time In Millis . rem ( 1 0 0 0 )}" Ċ