
    -i	                        d Z ddlZddlZddlmZ ddlmZ 	 ddlm	Z	m
Z
  e	            Z e
e           n# e$ r dZY nw xY w ej        dd          Z ej        dd	          Zej        d
k    Zd Zedk    rddlmZ  e            ZnTed	k    r/ edg          d         rdZn9es edg          d         rdZn"dZn eeg          \  ZZes ee d          ed	k    r/ edg          d         rdZn9es edg          d         rdZn"dZn eeg          \  ZZes ee d          d Zedk    r e             dS dS )z/Third party programs configuration for MoviePy.    N)Path)cross_platform_popen_params)find_dotenvload_dotenvFFMPEG_BINARYzffmpeg-imageioFFPLAY_BINARYzauto-detectposixc                     	 t          t          j        t          j        t          j        d          }t          j        | fi |}|                                 dS # t          $ r}d|fcY d}~S d}~ww xY w)zBVerify if the OS support command invocation as expected by moviepy)stdoutstderrstdin)TNFN)r   spPIPEDEVNULLPopencommunicate	Exception)cmdpopen_paramsprocerrs       L/var/www/html/speakWrite/venv/lib/python3.11/site-packages/moviepy/config.pytry_cmdr      s    	2w"'BJGG
 
 x,,|,, z    czs   AA 
A3%A.(A3.A3)get_exeffmpegz
ffmpeg.exeunsetz: - The path specified for the ffmpeg binary might be wrongffplayz
ffplay.exec                     t          t          g          d         rt          dt           d           nt          dt           d           t          t          g          d         rt          dt           d           nt          dt           d           t          rMt          dt           d           t          t          t                                                               d	S d	S )
z3Check if moviepy has found the binaries for FFmpeg.r   z'MoviePy: ffmpeg successfully found in 'z'.z)MoviePy: can't find or access ffmpeg in 'z'MoviePy: ffplay successfully found in 'z)MoviePy: can't find or access ffplay in 'z
.env file content at z:
N)r   r   printr   DOTENVr   	read_text     r   checkr$   I   s    " MIIIIJJJJK-KKKLLL" MIIIIJJJJK-KKKLLL (3333444d6ll$$&&'''''( (r#   __main__)__doc__os
subprocessr   pathlibr   moviepy.toolsr   dotenvr   r   r    ImportErrorgetenvr   r   nameIS_POSIX_OSr   imageio.plugins.ffmpegr   successr   IOErrorr$   __name__r"   r#   r   <module>r4      su   5 5 				           5 5 5 5 5 5////////[]]FK   FFF 	/+;<<	/=99g    $$$......GIIMMm##wz1     WWl^44Q7  $7M?++LGS 
gNNN
 
 	

 M!!wz1     WWl^44Q7  $7M?++LGS 
gNNN
 
 	

( ( (" z	EGGGGG s   6 A A 