class_docstr: MP3 encoder based on Gstreamer
class_docstr_tok: ["MP3","encoder","based","on","Gstreamer"]
docstr: Write all ID3v2.4 tags to file from self.metadata
docstr_tok: ["Write","all","ID3v2.4","tags","to","file","from","self.metadata"]
code: def write_metadata(self):
      """Write all ID3v2.4 tags to file from self.metadata"""
      import mutagen
      from mutagen import id3
  
      id3 = id3.ID3(self.filename)
      for tag in self.metadata.keys():
          value = self.metadata[tag]
          frame = mutagen.id3.Frames[tag](3, value)
          try:
              id3.add(frame)
          except:
              raise IOError('EncoderError: cannot tag "' + tag + '"')
      try:
          id3.save()
      except:
          raise IOError("EncoderError: cannot write tags")
  
file_path: TimeSide/timeside/plugins/encoder/mp3.py
imports: from timeside.core import implements, interfacedoc
  from timeside.core.encoder import GstEncoder
  from timeside.core.api import IEncoder
label_desc: Use image node_id 8 for calling the Mp3Encoder obj's underlying member method code with example usage: obj.write_metadata() without return types