且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Java的新视频文件中串联/合并两个视频?

更新时间:2022-11-17 16:46:57

大多数编解码器也不支持串联-它将无法帮助您将比特流串联在一起.

Most codecs also do not support concatenation - it will not help you to concatenate the bitstreams together.

但是,如果您确定编解码器具有相同的属性,则某些容器格式支持串联.MPEG-TS就是其中之一.您可以将视频复制到传输流中,而无需重新编码,然后使用常规文件操作将传输流连接起来.

However, if you're sure that the codecs have the same properties, then some container formats support concatenation. MPEG-TS is one of these. You could copy the video into a Transport Stream without re-encoding, and then concatenate the transport streams using normal file operations.