code: def images_to_video(
      input_dir, output_path, sequences, input_pattern, framerate=5
  ):
      """Convert images to vide."""
      for sequence_id in range(len(sequences)):
          start = str(sequences[sequence_id][0])
          end = str(
              sequences[sequence_id][1] - sequences[sequence_id][0]
          )
          try:
              path = os.path.join(
                  output_path, "video_" + str(sequence_id) + ".gif"
              )
              subprocess.run(
                  [
                      "ffmpeg",
                      "-y",
                      "-framerate",
                      str(framerate),
                      "-start_number",
                      start,
                      "-i",
                      '"' + input_dir + "/" + input_pattern + '"',
                      "-frames:v",
                      end,
                      path,
                  ],
                  check=True,
              )
          except ValueError:
              logging.info("Could not process video.")
  
file_path: graphics/tensorflow_graphics/projects/points_to_3Dobjects/tools/make_video.py
imports: import os
  import subprocess
  from absl import app
  from absl import flags
  from absl import logging
label_desc: Use image node_id 1 for calling a global function with example usage: images_to_video(input_dir, output_path, sequences, input_pattern, framerate) without return types