[英]Compressing video file with Java
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?另外,为了用 Java 对视频文件进行编码,我是否需要任何 API 来读取视频文件的字节,还是应该使用简单的
BufferedReader
完成这项工作?
For video processing in Java you can use Java Media Framework .对于 Java 中的视频处理,您可以使用Java Media Framework 。
Here is quick Java Media Framework basics这是快速的Java 媒体框架基础知识
Compressing video in java you can use IVCompressor在java中压缩视频你可以使用IVCompressor
for more details go https://techgnious.github.io/IVCompressor/有关更多详细信息,请访问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");
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.