class_docstr: Finite state ffmpeg `-i` command option file information parser.
  Is designed to parse the output fast, in one loop. Iterates line by
  line of the `ffmpeg -i <filename> [-f null -]` command output changing
  the internal state of the parser.
  
  Parameters
  ----------
  
  filename
    Name of the file parsed, only used to raise accurate error messages.
  
  infos
    Information returned by FFmpeg.
  
  fps_source
    Indicates what source data will be preferably used to retrieve fps data.
  
  check_duration
    Enable or disable the parsing of the duration of the file. Useful to
    skip the duration check, for example, for images.
  
  decode_file
    Indicates if the whole file has been decoded. The duration parsing strategy
    will differ depending on this argument.
class_docstr_tok: ["Finite","state","ffmpeg","`","-i","`","command","option","file","information","parser",".","Is","designed","to","parse","the","output","fast",",","in","one","loop",".","Iterates","line","by","line","of","the","`","ffmpeg","-i","<","filename",">","[","-f","null","-","]","`","command","output","changing","the","internal","state","of","the","parser",".","Parameters","--","--","--","--","--","filename","Name","of","the","file","parsed",",","only","used","to","raise","accurate","error","messages",".","infos","Information","returned","by","FFmpeg",".","fps_source","Indicates","what","source","data","will","be","preferably","used","to","retrieve","fps","data",".","check_duration","Enable","or","disable","the","parsing","of","the","duration","of","the","file",".","Useful","to","skip","the","duration","check",",","for","example",",","for","images",".","decode_file","Indicates","if","the","whole","file","has","been","decoded",".","The","duration","parsing","strategy","will","differ","depending","on","this","argument","."]
docstr: Parse the duration from the line that outputs the duration of
  the container.
docstr_tok: ["Parse","the","duration","from","the","line","that","outputs","the","duration","of","the","container","."]
code: def parse_duration(self, line):
      """Parse the duration from the line that outputs the duration of
      the container.
      """
      try:
          time_raw_string = line.split(self.duration_tag_separator)[-1]
          match_duration = re.search(
              r"([0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9])",
              time_raw_string,
          )
          return convert_to_seconds(match_duration.group(1))
      except Exception:
          raise IOError(
              (
                  "MoviePy error: failed to read the duration of file '%s'.\n"
                  "Here are the file infos returned by ffmpeg:\n\n%s"
              )
              % (self.filename, self.infos)
          )
  
imports: import os
  import re
  import subprocess
  import warnings
  import numpy
  from moviepy.config import FFMPEG_BINARY
  from moviepy.tools import convert_to_seconds, cross_platform_popen_params
label_desc: Use image node_id 9 for calling the FFmpegInfosParser obj's underlying member method code with example usage: obj.parse_duration(line) and returns: convert_to_seconds