code: def test_ffmpeg_parse_infos_metadata(util, mono_wave):
      """Check that `ffmpeg_parse_infos` is able to retrieve metadata from files."""
      filepath = os.path.join(
          util.TMP_DIR, "ffmpeg_parse_infos_metadata.mkv"
      )
      if os.path.isfile(filepath):
          os.remove(filepath)
  
      # create video with 2 streams, video and audio
      audioclip = AudioClip(mono_wave(440), fps=22050).with_duration(1)
      videoclip = (
          BitmapClip([["RGB"]], fps=1)
          .with_duration(1)
          .with_audio(audioclip)
      )
  
      # build metadata key-value pairs which will be passed to ``ffmpeg_params``
      # argument of ``videoclip.write_videofile``
      metadata = {
          "file": {
              "title": "Fóò",
              "comment": "bar",
              "description": "BAZ",
              "synopsis": "Testing",
          },
          "video": {
              "author": "Querty",
              "title": "hello",
              "description": "asdf",
          },
          "audio": {"track": "1", "title": "wtr", "genre": "lilihop"},
      }
  
      ffmpeg_params = []
      for metadata_type, data in metadata.items():
          option = "-metadata"
          if metadata_type in ["video", "audio"]:
              option += ":s:%s:0" % (
                  "v" if metadata_type == "video" else "a"
              )
          for field, value in data.items():
              ffmpeg_params.extend([option, f"{field}={value}"])
  
      languages = {
          "audio": "eng",
          "video": "spa",
      }
      ffmpeg_params.extend(
          [
              "-metadata:s:a:0",
              "language=" + languages["audio"],
              "-metadata:s:v:0",
              "language=" + languages["video"],
          ]
      )
  
      # create file with metadata included
      videoclip.write_videofile(
          filepath, codec="libx264", ffmpeg_params=ffmpeg_params
      )
  
      # get information about created file
      d = ffmpeg_parse_infos(filepath)
  
      def get_value_from_dict_using_lower_key(field, dictionary):
          """Obtains a value from a dictionary using a key, no matter if the key
          is uppercased in the dictionary. This function is needed because
          some media containers convert to uppercase metadata field names.
          """
          value = None
          for d_field, d_value in dictionary.items():
              if str(d_field).lower() == field:
                  value = d_value
                  break
          return value
  
      # assert file metadata
      for field, value in metadata["file"].items():
          assert (
              get_value_from_dict_using_lower_key(field, d["metadata"])
              == value
          )
  
      # assert streams metadata
      streams = {"audio": None, "video": None}
      for stream in d["inputs"][0]["streams"]:
          streams[stream["stream_type"]] = stream
  
      for stream_type, stream in streams.items():
          for field, value in metadata[stream_type].items():
              assert (
                  get_value_from_dict_using_lower_key(
                      field, stream["metadata"]
                  )
                  == value
              )
  
      # assert stream languages
      for stream_type, stream in streams.items():
          assert stream["language"] == languages[stream_type]
  
      os.remove(filepath)
  
imports: import os
  import subprocess
  import time
  import numpy
  import pytest
  from moviepy.audio.AudioClip import AudioClip
  from moviepy.config import FFMPEG_BINARY
  from moviepy.video.compositing.CompositeVideoClip import clips_array
  from moviepy.video.io.ffmpeg_reader import FFMPEG_VideoReader, FFmpegInfosParser, ffmpeg_parse_infos
  from moviepy.video.io.VideoFileClip import VideoFileClip
  from moviepy.video.VideoClip import BitmapClip, ColorClip
label_desc: Use image node_id 5 for calling a global function with example usage: test_ffmpeg_parse_infos_metadata(util, mono_wave) and returns: value