Class VideoEffectShakeDown
- Namespace
- VisioForge.Core.Types.VideoEffects
- Assembly
- VisioForge.Core.dll
Represents a vertical shake effect that randomly shifts the video image up and down, creating camera shake or earthquake-like motion.
public class VideoEffectShakeDown : VideoEffect, IVideoEffectShakeDown, IVideoEffectInheritance
Implements
Inherited Members
Remarks
The shake down effect simulates vertical camera movement by randomly displacing the video frame vertically on each frame. This creates the appearance of handheld camera shake, earthquake tremors, mechanical vibration, or unstable recording conditions. The shake magnitude is controlled by the VisioForge.Core.Types.VideoEffects.VideoEffectShakeDown.Factor property, with higher values producing more dramatic vertical displacement. Each frame receives a random vertical offset within the specified range, creating organic, unpredictable motion.
SDK Availability: VideoCaptureCore, MediaPlayerCore, VideoEditCore (Windows only)
Platform Support: Windows only
Technical characteristics:
- Random vertical frame displacement (up/down movement)
- Randomized each frame for organic shake appearance
- Preserves horizontal position (vertical motion only)
- Creates exposed borders which are typically filled with black
- Higher factor values produce more dramatic shake intensity
Common use cases include:
- Simulating handheld camera footage and documentary realism
- Earthquake, explosion, or impact shock effects
- Action scenes with camera shake for dynamic intensity
- Horror and thriller unstable camera effects
- Mechanical vibration or vehicle movement simulation
- Found footage and POV camera aesthetics
- Animated shake intensity for dynamic action sequences
The shake intensity can be animated by specifying different VisioForge.Core.Types.VideoEffects.VideoEffectShakeDown.Factor and VisioForge.Core.Types.VideoEffects.VideoEffectShakeDown.FactorStop values. The effect will automatically interpolate between these values, enabling smooth transitions from stable footage to intense shaking (or vice versa), useful for impact effects or ramping tension.
Visual impact: When the frame is displaced, black borders appear at the top or bottom where the shifted image reveals empty space. This is a natural consequence of the vertical displacement and adds to the effect's authenticity. For continuous shaking without visible borders, consider using smaller factor values.
Performance: This is a CPU-based effect with minimal computational requirements. The random offset calculation and frame shifting are very efficient operations suitable for real-time processing.
Constructors
VideoEffectShakeDown(bool, int, int, string, TimeSpan, TimeSpan)
Initializes a new instance of the VisioForge.Core.Types.VideoEffects.VideoEffectShakeDown class with specified parameters.
public VideoEffectShakeDown(bool enabled, int factor = 50, int factorStop = 0, string name = "ShakeDown", TimeSpan startTime = default, TimeSpan stopTime = default)Parameters
enabledbool-
trueto enable the effect immediately;falseto create the effect in a disabled state. The effect can be enabled/disabled later using the VisioForge.Core.Types.VideoEffects.VideoEffect.Enabled property. factorint-
The vertical shake intensity factor representing maximum displacement in pixels. Higher values create more dramatic vertical shaking. Default is 50 (moderate shake). Valid range is 1 to 255. Typical values: 5-15 for subtle camera shake, 30-60 for strong action effects.
factorStopint-
The ending shake intensity factor for animated transitions. Set to 0 to disable animation and maintain constant intensity at
factor. When non-zero, the shake intensity will interpolate betweenfactorand this value over the effect's time range. Default is 0 (no animation). Valid range is 0 to 255. namestring-
An optional name identifier for this effect instance. Default is "ShakeDown". Used to retrieve specific effect instances from a collection via the name property. Multiple effects with the same type can coexist with different names.
startTimeTimeSpan-
The time at which the effect should start being applied. Default is Zero, which applies the effect from the beginning. Use a specific time value to delay the effect start.
stopTimeTimeSpan-
The time at which the effect should stop being applied. Default is Zero, which applies the effect until the end. Set to a specific time to limit the effect duration. When using animated transitions with
factorStop, this defines the end point of the animation.
Remarks
If both startTime and stopTime are zero (default),
the effect will be applied for the entire video duration.
The vertical displacement is randomized each frame, creating organic, realistic camera shake. Black borders may appear at the top or bottom of the frame when the image is displaced.
Properties
Factor
Gets or sets the vertical shake intensity factor (starting value for animations).
public int Factor { get; set; }Property Value
Remarks
Controls the maximum vertical displacement range for the random shake effect. Higher values allow larger vertical movements, creating more dramatic and noticeable shaking. Lower values produce subtle vibration effects. The actual displacement on each frame is randomly chosen within the range of -Factor to +Factor pixels from the original position.
Typical value ranges and their effects:
- 1-5: Very subtle shake, slight vibration, handheld camera tremor
- 6-15: Light shake, unstable camera, documentary-style movement
- 16-30: Moderate shake, action scene intensity, vehicle vibration
- 31-60: Strong shake, earthquake effects, intense impacts
- 61-100: Very strong shake, extreme impacts, violent motion
- 100+: Extreme shake, chaotic motion, special dramatic effects
When VisioForge.Core.Types.VideoEffects.VideoEffectShakeDown.FactorStop is set to a different non-zero value, this property serves as the starting shake intensity for an animated transition.
FactorStop
Gets or sets the ending shake intensity factor for animated transitions (optional).
public int FactorStop { get; set; }Property Value
Remarks
When set to a non-zero value different from VisioForge.Core.Types.VideoEffects.VideoEffectShakeDown.Factor, the shake intensity will automatically interpolate between VisioForge.Core.Types.VideoEffects.VideoEffectShakeDown.Factor and VisioForge.Core.Types.VideoEffects.VideoEffectShakeDown.FactorStop over the effect's duration (from VisioForge.Core.Types.VideoEffects.VideoEffect.StartTime to VisioForge.Core.Types.VideoEffects.VideoEffect.StopTime).
Animation examples:
- Factor=5, FactorStop=80: Gradually increase shake (calm to intense earthquake)
- Factor=80, FactorStop=5: Gradually decrease shake (impact aftermath settling)
- Factor=10, FactorStop=60: Build tension with increasing instability
- FactorStop=0: No animation, constant shake intensity at Factor
Animated shake is particularly effective for simulating impacts, explosions, or earthquakes where the intensity builds up or dissipates over time.
Set to 0 to disable animation and maintain constant shake intensity at VisioForge.Core.Types.VideoEffects.VideoEffectShakeDown.Factor.
Methods
GetEffectType()
Gets the specific type of this video effect.
public VideoEffectType GetEffectType()Returns
- VideoEffectType
-
Returns VisioForge.Core.Types.VideoEffects.VideoEffectType.ShakeDown to identify this as a vertical shake/displacement effect.
Remarks
This method overrides the base class implementation to provide the concrete effect type. The effect type is used by the video processing pipeline to route the effect to the appropriate vertical shake processing module.