Package yearreview.app.render
Class VideoWorker
java.lang.Object
yearreview.app.render.VideoWorker
A class that pipes the generated images from the
Renderer into an ffmpeg-subprocess to render the video.- Author:
- ColdStone37
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Processffmpeg-subprocess used for creating the video-file.private final OutputStreamStream used to input raw frames into ffmpeg.private static final Logger -
Constructor Summary
ConstructorsConstructorDescriptionDefault Constructor for a VideoWorker that starts the ffmpeg-subprocess. -
Method Summary
Modifier and TypeMethodDescriptionvoidend()Ends the ffmpeg-process.voidwriteFrame(BufferedImage image) Writes aBufferedImageto theOutputStreamconnected to ffmpeg.
-
Field Details
-
ffmpeg
ffmpeg-subprocess used for creating the video-file. -
ffmpegInput
Stream used to input raw frames into ffmpeg. -
logger
-
-
Constructor Details
-
VideoWorker
public VideoWorker()Default Constructor for a VideoWorker that starts the ffmpeg-subprocess.
-
-
Method Details
-
writeFrame
Writes aBufferedImageto theOutputStreamconnected to ffmpeg.- Parameters:
image- image that should be encoded by ffmpeg. Must useBufferedImage.TYPE_3BYTE_BGR.
-
end
public void end()Ends the ffmpeg-process.
-