
    -i"                     b    d dl mZ d dlmZ d dlmZ d dlmZ e G d de                      ZdS )    )	dataclass)Clip)Effect)concatenate_videoclipsc                   j    e Zd ZU dZdZeed<   dZeed<   dZeed<   dZ	eed<   dZ
eed	<   d
edefdZdS )FreezeaL  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                    |j         t          d          | j        dk    r|j         | j        z
  d|j        z  z
  | _        | j        *| j        t          d          | j        |j         z
  | _        | j        dk    r|d| j                 gng }|                    | j                                      | j                  g}| j        |j         k    r|| j        d         gng }t          ||z   |z             }| j
        rJ|j        |                    |j                  }|j        "|                    |j        | j        z             }|S )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         U/var/www/html/speakWrite/venv/lib/python3.11/site-packages/moviepy/video/fx/Freeze.pyapplyzFreeze.apply   sS   = ;<<<6U??]T%55DHDDF'"* S   $(#6#FD &*fkk$xx.!!##DF++99$:NOOP%)Vt}%<%<dfhh  2)&6/E*ABB  	Nz%#..tz::x##,,TX8L-LMM    )__name__
__module____qualname____doc__r	   float__annotations__r
   r   r   r   boolr   r!    r"   r    r   r      s           AuLLL!OU!!! NE   K!d!!!$ 4      r"   r   N)	dataclassesr   moviepy.Clipr   moviepy.Effectr   ,moviepy.video.compositing.CompositeVideoClipr   r   r*   r"   r    <module>r/      s    ! ! ! ! ! !       ! ! ! ! ! ! O O O O O O . . . . .V . . . . .r"   