Sometimes it is desirable to reduce the framerate of a video. In the FrameSkippingFilter the user can select the value n, where a frame will be dropped every n frames. This makes it simple to halve the framerate.
This filter could easily be extended to perform more complex dropping schemes, but does not currently support that.
An example media pipeline shows the results:
A FramerateDisplayFilter has been inserted before the FrameSkippingFilter, and one after, to illustrate the effect.
As can be seen in the screen capture, the framerate has been halved.
Showing posts with label framerate. Show all posts
Showing posts with label framerate. Show all posts
Sunday, June 24, 2012
Using the FramerateDisplayFilter
The FramerateDisplayFilter is a filter that is useful for check what framerate you are achieving in a live multimedia pipeline. In a live multimedia pipeline, it could be that an encoder is not compressing the media fast enough. It is sometimes desirable to know what frame rate is achievable using different resolutions, encoder modes, etc. It could also be useful in a system where one performs dynamic bitrate adaption.
The FramerateDisplayFilter uses a moving average over the last 50 samples to calculate the average and renders the estimate on top of the video using GDI+.
The FramerateDisplayFilter inherits CTransInPlaceFilter and currently has the following configuration options:
The FramerateDisplayFilter uses a moving average over the last 50 samples to calculate the average and renders the estimate on top of the video using GDI+.
The FramerateDisplayFilter inherits CTransInPlaceFilter and currently has the following configuration options:
- mode: time-stamp or system-time
- X: x- position of the estimate (This can be off the screen)
- Y: y- position of the estimate (This can be off the screen)
In time-stamp mode, the timestamps of the actual media samples is used in the average calculation.
In system-time mode, the time as the sample passes through the filter, is used in the average calculation.
Depending on the pipeline, there may be a minor or larger difference between the two.
As per usual, all settings are programmatically configurable using the COM ISettingsInterface interface.
On a side note, if anyone is interested in contributing to the development of this filter, capabilties to set the font, font-color, etc via the property page are still required.
Subscribe to:
Posts (Atom)