View Full Version : How to write a file to a specified file container such as mp4?
fluke.l
1st February 2008, 03:43
My sdk is MS DirectShow.
I use capture filter to capture video from usb webcam.
How can I save it to a .mp4 file? I want to do H.264 encoding with the video data.
Adub
1st February 2008, 05:19
What is it saved as now? An avi?
There are numerous guides on how to convert an avi to mp4, both on this forum and else where. Just choose your favorite GUI and go!
For simplicity, you may want to try Avidemux.
If I interpreted your question wrong, the answer may be that there are no free capture programs readily available (that I know of) that capture straight to MP4 using DirectShow.
Your best be is to capture to AVI and then encode to MP4.
fluke.l
1st February 2008, 06:43
yes, save as a avi now.
I just use the sample code "amcap" from microsoft's SDK.
Now I want to capture a video from the usbcam, and do some customizations, such as reduce its frame rate, filesize and quality. So that my mp4 can play it.
I don't want to use a software to do it. because im learning directshow programming.
Actually, I found that windows programming is a bit hard for me.
fluke.l
1st February 2008, 06:47
my filtergraph is now: capture filter -> inftee filter -> avi mux -> file writer.
Because my usb cam seems not support adjusting frame rate. I want to do it in inftee filter. Are there any good advises?
Now i do this framerate control in the Receive() method in the inftee's inputpin.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.