code: def _ffmpeg_fmt(dtype):
      """
      Convert numpy dtypes to format strings understood by ffmpeg.
  
      Parameters
      ----------
      dtype : numpy dtype
          Data type to be converted.
  
      Returns
      -------
      str
          ffmpeg format string.
  
      """
      # convert dtype to sample type
      dtype = np.dtype(dtype)
      # Note: list with all ffmpeg PCM sample types: ffmpeg -formats | grep PCM
      # - unsigned int, signed int, floating point:
      fmt = {"u": "u", "i": "s", "f": "f"}.get(dtype.kind)
      # - sample size in bits:
      fmt += str(8 * dtype.itemsize)
      # - little endian or big endian:
      if dtype.byteorder == "=":
          fmt += sys.byteorder[0] + "e"
      else:
          fmt += {"|": "", "<": "le", ">": "be"}.get(dtype.byteorder)
      return str(fmt)
  
imports: from __future__ import absolute_import, division, print_function
  import errno
  import os
  import subprocess
  import sys
  import tempfile
  import numpy
  from ..audio.signal import Signal
  from ..utils import string_types, file_types
label_desc: Use image node_id 1 for calling a global function with example usage: _ffmpeg_fmt(dtype) and returns: str