class_docstr: An audio file decoded by the ffmpeg command-line utility.
class_docstr_tok: ["An","audio","file","decoded","by","the","ffmpeg","command-line","utility","."]
docstr: Given relevant data from the ffmpeg output, set audio
  parameter fields on this object.
docstr_tok: ["Given","relevant","data","from","the","ffmpeg","output",",","set","audio","parameter","fields","on","this","object","."]
code: def _parse_info(self, s):
      """Given relevant data from the ffmpeg output, set audio
      parameter fields on this object.
      """
      # Sample rate.
      match = re.search(r"(\d+) hz", s)
      if match:
          self.samplerate = int(match.group(1))
      else:
          self.samplerate = 0
  
      # Channel count.
      match = re.search(r"hz, ([^,]+),", s)
      if match:
          mode = match.group(1)
          if mode == "stereo":
              self.channels = 2
          else:
              cmatch = re.match(r"(\d+)\.?(\d)?", mode)
              if cmatch:
                  self.channels = sum(
                      map(int, cmatch.group().split("."))
                  )
              else:
                  self.channels = 1
      else:
          self.channels = 0
  
      # Duration.
      match = re.search(r"duration: (\d+):(\d+):(\d+).(\d)", s)
      if match:
          durparts = list(map(int, match.groups()))
          duration = (
              durparts[0] * 60 * 60
              + durparts[1] * 60
              + durparts[2]
              + float(durparts[3]) / 10
          )
          self.duration = duration
      else:
          # No duration found.
          self.duration = 0
  
imports: import queue
  import re
  import subprocess
  import sys
  import threading
  import time
  from io import DEFAULT_BUFFER_SIZE
  from .exceptions import DecodeError
  from .base import AudioFile
label_desc: Use image node_id 4 for calling the FFmpegAudioFile obj's underlying member method code with example usage: obj._parse_info(s) without return types