java.io.IOException异常:无法追加Mp4TrackImpl {处理程序=“韦迪'}到Mp4TrackImpl {处理程序=”韦迪'},因为他们的样品描述盒不同:他们的

2023-09-07 02:21:33 作者:cute

在使用的ffmpeg我有这个异常合并多个视频。

  java.io.IOException异常:无法追加Mp4TrackImpl {处理程序=韦迪'}到Mp4TrackImpl {处理程序=韦迪'},因为他们的样品描述盒不同: 

解决方案

这可能是你正在使用,转换视频的MPEG4。使用H264格式设置视频codeC

更改此

recorder.setVideo codeC(AV codec.AV_ codeC_ID_MPEG4);

这个

recorder.setVideo codeC(AV codec.AV_ codeC_ID_H264);

While Merging the multiple videos using ffmpeg I have got this Exception.

java.io.IOException: Cannot append Mp4TrackImpl{handler='vide'} to Mp4TrackImpl{handler='vide'} since their Sample Description Boxes differ:
只要学会它,再多Bug也不怕 安徽青耕

解决方案

It might be you are using, convert your video in MPEG4. Use H264 format for set the video codec

Change this

recorder.setVideoCodec(avcodec.AV_CODEC_ID_MPEG4);

to this

recorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);