I want to record video and audio files using C#. After recording of audio + video i want to merge them. There can be only one video file and 10 audio file. I want this ten files to overlay on one video file.
I am assure that i want video file in .wmv format. Can you tell me i should record audios in which format so later i can overlay those audio files on .wmv format video file?
Also please let me know how to overlay audio file on .wmv video file?
Hope i will get prompt reply for this
You can use DirectShow Editing Services (DES) to do it. DirectShowLib should provide DES support in C#. Using it, create a timeline with video group (1 track) and audio group (several tracks if you need to overlay/mix some audios, i.e. hear more than one at a time). Place your video and audio files on the timeline in desired positions. Then tell DES to create a DirectShow graph and you'll get one video and one audio output pin. Connect them to ASF writer to save result to WMV.
Related
I am using direct show to capture video and save it to file. I have tried in vain to find ways to decrease the resultant video size but cannot manage. I would like to know if anyone can tell me how I can:
Decrease the frame rate of the video
Decrease the quality of the video (even down to 320 x 240)
Apply a compression on the video (mpeg? etc).
Raw video is huge in size, and to size-efficient storage assumes you compress the video. You are to use one of the video encoders, such as MPEG-4 AVC (H.264) or Windows Media. You typically insert an additional filter into your pipeline between capture filter and multiplexer/file writer. Read up on this in multiple past topics:
Using video codecs like XVid in c#
Real-time video encoding in DirectShow
How to properly build a directshow graph to compress video...
I am using Tao framework and I have a simple opengl control.
How can I record a video from this control and save it to a file?
See here for a link that mentions both Bitmap screen capture in C# and starts to describe the AVI conversion.
For further information about the library used to in the first link to make an avi file from a collection of bitmap images see here.
See here for an example that uses the Media Player Encoder in order record the screen.
The more complicated and direct way would be to either use a video capture card or write a software device that emulates one and feed that source to DirectShow filter using DirectShow.Net or Pinvoking other DirectShow libaries directly.
How can I record a video from this control and save it to a file?
Use glReadPixels to get the pixel data. Feed the pixel data into a video encoder (e.g. a DirectShow filter graph, or through ffmpeg/libavcodec or sump the images into files and encode them to video later).
Is it possible to capture video and audio in Silverlight5 and save it as movie in any video format?
Silverlight 5 can automatically detect video and audio capture devices, which you can open operations on using the System.Windows.Media.CaptureDeviceConfiguration class and associated classes.
http://chris.59north.com/post/Audio-recording-and-encoding-in-Silverlight.aspx has info on how to use those classes to save the audio to a Stream (as well as compressing it), which you can then save to disk.
http://www.dotnetfunda.com/articles/article1751-how-to-access-a-video-and-snap-a-picture-from-webcam-in-silverlight.aspx has similar info on how to access video and save images from webcams on to disk using Silverlight.
Pro Silverlight 5 in C# (excerpt on Google Books) has more information on how to do this.
I have been doing quite a lot of searching and I have yet to find any samples of anyone actually saving video. The best I have been able to come up with is saving a sequence of images. That doesn't really sound like a good solution
I need two things to be done:
Create a video from the images (jpeg) which are placed in a folder and
Encode this video to h.264 format and stream to the network.
Right now I am sending each image files to the network and receiving it on the server and then displaying it there. This gives an illusion of video playback but in actual it is only images which are displayed one after another.
I just need to convert this images group to the video of h.264 format and stream it to the network.
Have a look here: Working way to make video from images in C#
i wrote a program in c# using directshow , that captures all devices' audios , and video from single device (webcam or external camera) , now that my requirement is to merge selected audio files with one video file and i can not get it done in c#.
so i need a program or libraries that merges one(or several) audio file(s) and one video file and save it as an avi VIDEO file ,, both audio file and video files are in avi format.
You should check this out A Simple C# Wrapper for the AviFile Library