Class DemoVideoGenerator

java.lang.Object
com.esprit.utils.DemoVideoGenerator

public class DemoVideoGenerator extends Object
Utility class for generating demo videos for Product Hunt presentation Uses FFmpeg through JavaCV for professional video creation
  • Field Details

  • Constructor Details

    • DemoVideoGenerator

      public DemoVideoGenerator()
  • Method Details

    • createVideosDirectory

      private static void createVideosDirectory()
      Create videos directory if it doesn't exist
    • createVideoFromScreenshots

      public static Path createVideoFromScreenshots(Path[] screenshotPaths, String outputFilename, double durationPerImage)
      Create a demo video from a series of screenshots
      Parameters:
      screenshotPaths - Array of screenshot file paths
      outputFilename - Output video filename (without extension)
      durationPerImage - Duration in seconds for each image
      Returns:
      Path to the generated video file
    • createScreenRecording

      public static Path createScreenRecording(int durationSeconds, String outputFilename)
      Create a screen recording using FFmpeg (requires external FFmpeg installation)
      Parameters:
      durationSeconds - Duration of recording in seconds
      outputFilename - Output filename (without extension)
      Returns:
      Path to the generated video file or null if failed
    • resizeImage

      private static BufferedImage resizeImage(BufferedImage original, int targetWidth, int targetHeight)
      Resize image to fit video dimensions while maintaining aspect ratio
    • generateCompleteDemo

      public static Path generateCompleteDemo()
      Generate a complete demo video workflow This combines multiple screenshots into a professional demo video
    • getVideosDirectory

      public static Path getVideosDirectory()
      Get the videos directory path