Reputation: 3713
Is it possible to Huffman Encode video files? Also in order to encode the video file in Java will I require any API for reading the bytes of the video file or should a simple BufferedReader
do the job?
Upvotes: 0
Views: 6716
Reputation: 29
Compressing video in java you can use IVCompressor
for more details go https://techgnious.github.io/IVCompressor/
simple code
<dependency>
<groupId>io.github.techgnious</groupId>
<artifactId>IVCompressor</artifactId>
<version>1.0.1</version>
</dependency>
public static void main(String[] args) throws VideoException, IOException {
IVCompressor compressor = new IVCompressor();
IVSize customRes = new IVSize();
customRes.setWidth(400);
customRes.setHeight(300);
File file = new File("D:/Testing/20.mp4");
compressor.reduceVideoSizeAndSaveToAPath(file,VideoFormats.MP4,ResizeResolution.R480P,"D:/Testing/Custome");
}
Upvotes: 1
Reputation: 3344
For video processing in Java you can use Java Media Framework.
Here is quick Java Media Framework basics
Upvotes: 2