
    W|h"                     T    S SK Jr  S SKJr  S SKJr  S SKJr  \ " S S\5      5       rg)    )	dataclass)Clip)Effect)concatenate_videoclipsc                   r    \ rS rSr% SrSr\\S'   Sr\\S'   Sr	\\S'   Sr
\\S'   S	r\\S
'   S\S\4S jrSrg)Freeze   a(  Momentarily freeze the clip at time t.

Set `t='end'` to freeze the clip at the end (actually it will freeze on the
frame at time clip.duration - padding_end seconds - 1 / clip_fps).
With ``duration`` you can specify the duration of the freeze.
With ``total_duration`` you can specify the total duration of
the clip and the freeze (i.e. the duration of the freeze is
automatically computed). One of them must be provided.

With ``update_start_end`` you can define if the effect must preserve
and/or update start and end properties of the original clip
r   tNfreeze_durationtotal_durationpadding_endTupdate_start_endclipreturnc                 8   UR                   c  [        S5      eU R                  S:X  a.  UR                   U R                  -
  SUR                  -  -
  U l        U R
                  c6  U R                  c  [        S5      eU R                  UR                   -
  U l        U R                  S:w  a  USU R                   /O/ nUR                  U R                  5      R                  U R
                  5      /nU R                  UR                   :w  a  XR                  S /O/ n[        X#-   U-   5      nU R                  (       a]  UR                  b  UR                  UR                  5      nUR                  b(  UR                  UR                  U R
                  -   5      nU$ )zApply the effect to the clip.NzAttribute 'duration' not setend   z=You must provide either 'freeze_duration' or 'total_duration'r   )duration
ValueErrorr
   r   fpsr   r   to_ImageClipwith_durationr   r   start
with_startr   with_end)selfr   beforefreezeafternew_clips         Q/home/james-whalen/.local/lib/python3.13/site-packages/moviepy/video/fx/Freeze.pyapplyFreeze.apply   sT   == ;<<66U?]]T%5%55DHHDDF'""* S  $(#6#6#FD &*ffk$x.!##DFF+99$:N:NOP%)VVt}}%<ffh 2)&/E*AB  zz%#..tzz:xx##,,TXX8L8L-LM    )r   r
   )__name__
__module____qualname____firstlineno____doc__r
   float__annotations__r   r   r   r   boolr   r"   __static_attributes__ r$   r!   r   r      sN     AuL!OU! NE K!d!$ 4 r$   r   N)	dataclassesr   moviepy.Clipr   moviepy.Effectr   ,moviepy.video.compositing.CompositeVideoClipr   r   r.   r$   r!   <module>r3      s,    !  ! O .V . .r$   