How to encode multiple video and audio streams (we want streams not to be any how encoded) fro开发者_如何转开发m cameras into one mkv so, that sound from camera A is encoded with respect to video from camera A, using JAVA or C or C++ ? (The algorithm should be working on different platforms like Window, Linux or Mac)
I assume you are looking for video compositing such that multiple videos are laid out in a mosaic synced in time with audio. Check this post out. Several solutions are presented. The poster solved the problem using gstreamer which supposedly works for Windows, Mac and Linux.
I would suggest using something like GStreamer or Avisynth since they will abstract away a lot of the ugly details (decoding, video scaling and translation, video syncing, audio mixing, audio syncing, video output encoding) that would be required if you just used ffmpeg's libavformat and libavcodec directly.
精彩评论