moviepy.audio.io.ffplay_audiopreviewer.FFPLAY_AudioPreviewer#

class moviepy.audio.io.ffplay_audiopreviewer.FFPLAY_AudioPreviewer(fps_input, nbytes=2, nchannels=2)[source]#

A class to preview an AudioClip.

Parameters:
  • fps_input -- Frames per second of the input audio (given by the AudioClip being written down).

  • nbytes -- Number of bytes to encode the sound: 1 for 8bit sound, 2 for 16bit, 4 for 32bit sound. Default is 2 bytes, it's fine.

  • nchannels -- Number of audio channels in the clip. Default to 2 channels.

close()[source]#

Closes the writer, terminating the subprocess if is still alive.

write_frames(frames_array)[source]#

Send a raw audio frame (a chunck of audio) to ffplay to be played