Class VideoEncoder

java.lang.Object
backend.speech.util.VideoEncoder

public class VideoEncoder extends Object
VideoEncoder utility for encoding a video file into a Base64 string.
Author:
Kai
  • Constructor Details

    • VideoEncoder

      public VideoEncoder()
  • Method Details

    • encodeVideoToBase64

      public static String encodeVideoToBase64(File videoFile) throws IOException
      Encodes a video file into a Base64-encoded string.
      Parameters:
      videoFile - The video file to encode.
      Returns:
      A Base64-encoded string representation of the video.
      Throws:
      IOException - If the file cannot be read.
      IllegalArgumentException - If the file is invalid.
    • main

      public static void main(String[] args)
      Main method for testing the functionality.
      Parameters:
      args - Command-line arguments.