
    ~Zi                         S SK Jr  S SKJr  SSKJr  SSKJrJrJrJ	r	J
r
Jr  S r\" 5       S 5       r\" 5       S 5       r\" 5       S 5       r\" 5       S	 5       r/ S
Qrg)    )unicode_literals)
basestring   )filter_operator
GlobalNode	InputNodeMergeOutputsNode
OutputNodeoutput_operatorc                     XS'   UR                  SS5      nU(       a  SU;   a  [        S5      eX!S'   [        [        R                  US9R                  5       $ )a*  Input file URL (ffmpeg ``-i`` option)

Any supplied kwargs are passed to ffmpeg verbatim (e.g. ``t=20``,
``f='mp4'``, ``acodec='pcm'``, etc.).

To tell ffmpeg to read from stdin, use ``pipe:`` as the filename.

Official documentation: `Main options <https://ffmpeg.org/ffmpeg.html#Main-options>`__
filenamefNformat*Can't specify both `format` and `f` kwargskwargs)pop
ValueErrorr   input__name__stream)r   r   fmts      h/var/www/eduai.edurigo.com/question_generate/ques_gen_env/lib/python3.13/site-packages/ffmpeg/_ffmpeg.pyr   r      sU     ":
**S$
C
vIJJxU^^F3::<<    c                 T    [        U [        R                  U5      R                  5       $ )zCAdd extra global command-line argument(s), e.g. ``-progress``.
    )r   global_argsr   r   )r   argss     r   r   r   #   s"     fk22D9@@BBr   c                 V    [        U [        R                  S/5      R                  5       $ )zOverwrite output files without asking (ffmpeg ``-y`` option)

Official documentation: `Main options <https://ffmpeg.org/ffmpeg.html#Main-options>`__
z-y)r   overwrite_outputr   r   )r   s    r   r   r   *   s%     f.77$@GGIIr   c                  R    [        U [        R                  5      R                  5       $ )z9Include all given outputs in one ffmpeg command line
    )r	   merge_outputsr   r   )streamss    r   r!   r!   3   s      G]%;%;<CCEEr   c                  @   [        U 5      n SU;  a7  [        U S   [        5      (       d  [        S5      eU R	                  S5      US'   U nUR	                  SS5      nU(       a  SU;   a  [        S5      eX1S'   [        U[        R                  US9R                  5       $ )	a  Output file URL

Syntax:
    `ffmpeg.output(stream1[, stream2, stream3...], filename, **ffmpeg_args)`

Any supplied keyword arguments are passed to ffmpeg verbatim (e.g.
``t=20``, ``f='mp4'``, ``acodec='pcm'``, ``vcodec='rawvideo'``,
etc.).  Some keyword-arguments are handled specially, as shown below.

Args:
    video_bitrate: parameter for ``-b:v``, e.g. ``video_bitrate=1000``.
    audio_bitrate: parameter for ``-b:a``, e.g. ``audio_bitrate=200``.
    format: alias for ``-f`` parameter, e.g. ``format='mp4'``
        (equivalent to ``f='mp4'``).

If multiple streams are provided, they are mapped to the same
output.

To tell ffmpeg to write to stdout, use ``pipe:`` as the filename.

Official documentation: `Synopsis <https://ffmpeg.org/ffmpeg.html#Synopsis>`__
r   zA filename must be providedr   Nr   r   r   )	list
isinstancer   r   r   r
   outputr   r   )streams_and_filenamer   r"   r   s       r   r'   r'   :   s    0   45.r2J??:;;155b9z"G
**S$
C
vIJJxgvv>EEGGr   )r   r!   r'   r   N)
__future__r   past.builtinsr   _utilsnodesr   r   r   r	   r
   r   r   r   r   r!   r'   __all__ r   r   <module>r/      s    ' $  =& C C J J F F #H #HL Cr   