Reputation: 7295
I creating an video file by encoding BufferedImages. How I can add Audio to this video from mp3 file?
IMediaWriter movie = ToolFactory.makeWriter("somefile.mp4");
movie.addVideoStream(0, 0, ICodec.ID.CODEC_ID_H264, 720, 540);
movie.encodeVideo(0,img, time, TimeUnit.MILLISECONDS);
movie.close();
When I try concatenate class I get this error:
45694 [Thread-2] WARN com.xuggle.xuggler - Got error: picture is not of the same PixelType as this Coder expected (../../../../../../../csrc/com/xuggle/xuggler/StreamCoder.cpp:1430)
Upvotes: 0
Views: 1699
Reputation: 2651
Use the example at xuggle
writer.addAudioStream(audioStreamIndex, audioStreamId, channelCount,
sampleRate);
Upvotes: 2