MrTelly
MrTelly

Reputation: 14865

Writing video frames with variable framerate

I'm using the AVIFile Wrapper to create video from my WPF app. I'm using CompositionTarget to grab an image for each frame but I'm having problems with framerate. As my app slows down with heavy data load, the CompositionTarget frame rate drops. With less video frames, when I play back these parts appear as fast forward.

Is there a video format/library that will allow me to work with variable framerates, or can I fix the WPF framerate so I don't drop frames?

Edit -> the frames within an AVI don't have a time codes associated with them, which other video format does? Is there a standard way of do this?

Upvotes: 1

Views: 1811

Answers (2)

David Maymudes
David Maymudes

Reputation: 5654

The standard way to do this with AVI files is to write out a zero-size video frame for each skipped sample.

Upvotes: 2

ctd
ctd

Reputation: 1793

The page you linked to has information about setting variable frame rates, under "Copy a clip from video and sound", but that doesn't give any information about associating time codes with frames.

Upvotes: 0

Related Questions