mov格式视频转mp4格式亲测可用

编程

jave2  github 地址 https://github.com/a-schild/jave2    

<dependency>

    <groupId>ws.schild</groupId>

    <artifactId>jave-all-deps</artifactId>

    <version>2.6.0</version>

</dependency>

File source = new File("源视频路径");

File target = new File("转换后视频存储路径");

AudioAttributes audio = new AudioAttributes();

audio.setCodec("aac");

VideoAttributes video = new VideoAttributes();

video.setCodec("h264");

video.setBitRate(new Integer(2325 * 1024));

EncodingAttributes attrs = new EncodingAttributes();

attrs.setFormat("mp4");

attrs.setAudioAttributes(audio);

attrs.setVideoAttributes(video);

Encoder encoder = new Encoder();

encoder.encode(new MultimediaObject(source), target, attrs);

 

以上是 mov格式视频转mp4格式亲测可用 的全部内容, 来源链接: utcz.com/z/510952.html

回到顶部