class_docstr: A Clip that serves as "subtitle track" in videos.
  
  One particularity of this class is that the images of the
  subtitle texts are not generated beforehand, but only if
  needed.
  
  Parameters
  ----------
  
  subtitles
    Either the name of a file as a string or path-like object, or a list
  
  encoding
    Optional, specifies srt file encoding.
    Any standard Python encoding is allowed (listed at
    https://docs.python.org/3.8/library/codecs.html#standard-encodings)
  
  Examples
  --------
  
  >>> from moviepy.video.tools.subtitles import SubtitlesClip
  >>> from moviepy.video.io.VideoFileClip import VideoFileClip
  >>> generator = lambda text: TextClip(text, font='Georgia-Regular',
  ...                                   font_size=24, color='white')
  >>> sub = SubtitlesClip("subtitles.srt", generator)
  >>> sub = SubtitlesClip("subtitles.srt", generator, encoding='utf-8')
  >>> myvideo = VideoFileClip("myvideo.avi")
  >>> final = CompositeVideoClip([clip, subtitles])
  >>> final.write_videofile("final.mp4", fps=myvideo.fps)
class_docstr_tok: ["A","Clip","that","serves","as","``","subtitle","track","''","in","videos",".","One","particularity","of","this","class","is","that","the","images","of","the","subtitle","texts","are","not","generated","beforehand",",","but","only","if","needed",".","Parameters","--","--","--","--","--","subtitles","Either","the","name","of","a","file","as","a","string","or","path-like","object",",","or","a","list","encoding","Optional",",","specifies","srt","file","encoding",".","Any","standard","Python","encoding","is","allowed","(","listed","at","https",":","\/\/docs.python.org\/3.8\/library\/codecs.html","#","standard-encodings",")","Examples","--","--","--","--",">",">",">","from","moviepy.video.tools.subtitles","import","SubtitlesClip",">",">",">","from","moviepy.video.io.VideoFileClip","import","VideoFileClip",">",">",">","generator","=","lambda","text",":","TextClip","(","text",",","font='Georgia-Regular","'",",","...","font_size=24",",","color='white","'",")",">",">",">","sub","=","SubtitlesClip","(","``","subtitles.srt","''",",","generator",")",">",">",">","sub","=","SubtitlesClip","(","``","subtitles.srt","''",",","generator",",","encoding='utf-8","'",")",">",">",">","myvideo","=","VideoFileClip","(","``","myvideo.avi","''",")",">",">",">","final","=","CompositeVideoClip","(","[","clip",",","subtitles","]",")",">",">",">","final.write_videofile","(","``","final.mp4","''",",","fps=myvideo.fps",")"]
code: def __getitem__(self, k):
      return self.subtitles[k]
  
file_path: moviepy/moviepy/video/tools/subtitles.py
imports: import re
  import numpy
  from moviepy.decorators import convert_path_to_string
  from moviepy.tools import convert_to_seconds
  from moviepy.video.VideoClip import TextClip, VideoClip
label_desc: Use image node_id 4 for calling the SubtitlesClip obj's underlying member method code with example usage: obj.__getitem__(k) and returns: self