0

During capturing from some audio and video sources and encoding at AVI container for synchronizing audio & video I set audio as a master stream and this gave best result for synchronizing.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd312034(v=vs.85).aspx

But this method gives a higher FPS value as a result. About 40 or 50 instead of 30 FPS. If this media file just playback - all OK, but if try to recode at different software to another video format appears out of sync.

How can I programmatically set dwScale and dwRate values in the AVISTREAMHEADER structure at AVI muxing?

Survarium
  • 190
  • 2
  • 6

1 Answers1

0

How can I programmatically set dwScale and dwRate values in the AVISTREAMHEADER structure at AVI muxing?

MSDN:

This method works by adjusting the dwScale and dwRate values in the AVISTREAMHEADER structure.

You requested that multiplexer manages the scale/rate values, so you cannot adjust them. You should be seeing more odd things in your file, not just higher FPS. The file itself is perhaps out of sync and as soon as you process it with other applciations that don't do playback fine tuning, you start seeing issues. You might be having video media type showing one frame rate and effectively the rate is different.

Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • Can you please tell particular interface for managing the scale/rate values? – Survarium Oct 15 '12 at 10:28
  • There are no interfaces other than mentioned on MSDN. If you are unhappy with them for any reason (yet I am not confident that this is exactly the source of the problem) then you can/need implement your own renderer that uses AVI API directly via functions like [`AVIFileOpen`](http://msdn.microsoft.com/en-us/library/windows/desktop/dd756800%28v=vs.85%29.aspx) etc. – Roman R. Oct 15 '12 at 18:56