问题
I have Mp4 Capture Application in direct show. In my application i need to capture 30 min(or say some dynamic value) video continuously
for the I made one WaitableTimer Routine , after 30 minutes i want to stop the capture and then start again ... but after i stop capture on next sample in start capture the stream not get added to the file. to start next capture , i have to release all the capture variables again get devices and build graph and then i can start capture.
Cant i simply stop capture , then rename the output file and again start capture?? is anything needed to add additional to do that??
Please help me on this.
Thanks
Edit : Below is the graph i use for recording
Video Source --> x264vfw - H.264/MPEG-4 AVC Codec --------->GDCL MPEG-4 Multiplexer --> File Writer
|
Audio Source --> ACM Wrapper --> Monogram AAC Encoder --|
回答1:
We do something similar to capture DV-Avi's. Have you tried to:
- stop the graph
- remove File-Writer
- create new File-Writer (and configure)
- connect File-Writer to mux
- and start again
If this does not work then there is something wrong with the Muxer or one of the other filters. You can easily test this, just replace the Muxer with an audio and video-renderer and try to play, stop, play.
You can also just try another MP4 mux filter, like the monogram mp4 mux.
来源:https://stackoverflow.com/questions/10917258/directshow-continious-capture