Package com.esprit.utils
Class DemoVideoGenerator
java.lang.Object
com.esprit.utils.DemoVideoGenerator
Utility class for generating demo videos for Product Hunt presentation Uses
FFmpeg through JavaCV for professional video creation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final double
private static final org.slf4j.Logger
private static final DateTimeFormatter
private static final String
private static final int
private static final int
private static final int
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Path
createScreenRecording
(int durationSeconds, String outputFilename) Create a screen recording using FFmpeg (requires external FFmpeg installation)static Path
createVideoFromScreenshots
(Path[] screenshotPaths, String outputFilename, double durationPerImage) Create a demo video from a series of screenshotsprivate static void
Create videos directory if it doesn't existstatic Path
Generate a complete demo video workflow This combines multiple screenshots into a professional demo videostatic Path
Get the videos directory pathprivate static BufferedImage
resizeImage
(BufferedImage original, int targetWidth, int targetHeight) Resize image to fit video dimensions while maintaining aspect ratio
-
Field Details
-
log
private static final org.slf4j.Logger log -
VIDEOS_DIR
- See Also:
-
TIMESTAMP_PATTERN
- See Also:
-
TIMESTAMP_FORMATTER
-
VIDEO_WIDTH
private static final int VIDEO_WIDTH- See Also:
-
VIDEO_HEIGHT
private static final int VIDEO_HEIGHT- See Also:
-
FRAME_RATE
private static final double FRAME_RATE- See Also:
-
VIDEO_BITRATE
private static final int VIDEO_BITRATE- See Also:
-
-
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 pathsoutputFilename
- Output video filename (without extension)durationPerImage
- Duration in seconds for each image- Returns:
- Path to the generated video file
-
createScreenRecording
Create a screen recording using FFmpeg (requires external FFmpeg installation)- Parameters:
durationSeconds
- Duration of recording in secondsoutputFilename
- Output filename (without extension)- Returns:
- Path to the generated video file or null if failed
-
resizeImage
Resize image to fit video dimensions while maintaining aspect ratio -
generateCompleteDemo
Generate a complete demo video workflow This combines multiple screenshots into a professional demo video -
getVideosDirectory
Get the videos directory path
-