Home > Software engineering >  DirectShow when recording AVI, how to deal with time
DirectShow when recording AVI, how to deal with time

Time:10-06

Colleagues recently took over a project, collecting the usb camera, generated AVI files, use DirectShow realize colleagues, found a problem, when there is audio input device, I get the total time is consistent with the program interface display, WMV, when there is no audio input device for the total time of AVI with the program interface display, recording the longer, the more time difference,
AVI Graph is as follows:

WMV Graph is as follows:

Have the following questions:
1. Generate WMV, reference clock is effective? And when generated AVI, no effective clock?
2. If you need to manually add a clock to AVI, how should do? Also look at MSDN recently, not too see
3. If I only collect video, and save into WMV, how should do? Use the Filter? DMO?
4. USB Camera2.0 video format is yuv2, how to do?

CodePudding user response:

His top!

CodePudding user response:

Reference AMCP source inside have

CodePudding user response:

AMCAP

CodePudding user response:

1: your time just to receive the system time? Is not the time to video file, it is assumed that at the start of the video of the moment, the system time, but this time the ds may still be initialized something, didn't set out to write to the file operations, so the system time length and video would not be the same length of time
2: add the clock is to point to? Suggest to record video with ffmpeg
3: this is suggested to use ffmpeg to do it, not in the lab, can use the ready-made it
4: the use of the format to send and receive consistent as long as guaranteed, can first use the ffmpeg + ds, and see if I can normal streaming video, if you can, then save should also will be a problem
  • Related