views:

86

answers:

3

Hi guys I want to make a program which takes video and audio and merges them. Video Type or audio type is not important for me. I just want to make so- called program. How can i make this ? does any library exist for this ? (I know there are many program about this topic but i want to learn how to implement such a program.) Help me please about this topic.

A: 

Look at some sort of FFMPEG wrapper in C#.

jini
with this library .can i merge video and audio files? for example: i have 2 file( cartoon video and speech audio).i want to merge them.
ibrahimyilmaz
Yes you can. It is great!
jini
+1  A: 

The technical term for what you are trying to do is 'multiplexing', and commonly referred to as 'muxing'.

FFmpeg is a multiplatform command line tool that does this, and arguable the industry standard. Many projects wrap FFmpeg into libraries and GUIs.

FFmpeg is also open source, so you can download the code and see how they have done it. That siad, it is very big and complex.

If you are interested in the actual mechanics of muxing separate audio and video files together into a destination file, then you will need to learn much about container formats and Codecs.

Stu Thompson
A: 

An easy way to multiplex audio and video on linux is to use gstreamer. Here's a A/V pipeline that you can create using gst-launch on a shell prompt.

filesrc location=file1.vid ! queue ! mux. filesrc location=file2.aud ! queue ! mux. avimux name=mux ! filesink location=output.avi

Replace file1.vid with the name of your encoded video file and file2.aud with the name of your encoded audio file. output.avi is the container file that you need.

Sid H