如何Concat的或Android的合并两个或多个视频文件? [英] How to concat or merge two or more video files in Android?

查看:240
本文介绍了如何Concat的或Android的合并两个或多个视频文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想合并两个或多个视频文件(可能是两个MP4或两个3GP,或任何其他扩展名),请帮助我。

I want merge two or more video file (may be two mp4 or two 3gp , or any other extension) , please help me.

推荐答案

您可以使用的最通用的工具的ffmpeg(所指出的@Jeremy以上),但使用它的手机将需要一些工作;同时它是LGPL许可和它的一些连接codeRS(特别是X264)采用的是GPL。

The most generic tool you can use is ffmpeg (as noted by @Jeremy above), but using it on the mobile handset will require some work; also it is LGPL licensed and some of its encoders (notably x264) are GPL.

有一个简单的解决方案,如果你想使用类似的编码来连接这两个文件,​​并载于从MP4衍生的文件格式(3GP是这样的),是使用纯Java MP4分析器并连接所有的视频​​,而无需接触媒体流本身。看一看 mp4parser ,一个开源的解析器是纯Java,根据Apache许可证授权,甚至有一个例子串联视频在维基。

A simpler solution, if both files you want to concatenate are using similar encoding, and are contained in file formats derived from MP4 (3GP is such), is to use a pure-java MP4 parser and concatenate the videos without touching the media stream itself. Have a look at mp4parser, an open-source parser that is pure-java, licensed under Apache license and even has an example for concatenating videos in its wiki.

这篇关于如何Concat的或Android的合并两个或多个视频文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆