Crop
You can crop unnecessary part of a video with "crop" property. Its value is set in pixels and the format is: "cropFromLeft, cropFromTop, cropFromRight, cropFromBottom".
You can use it to emulate a feature of zooming.
For example, to crop 10 pixels from the left, 20 pixels from the top, 30 pixels from the right and 40 pixels from the bottom you should call
MFormats SDK
(myReader as IMProps).PropsSet("crop", "10,20,30,40");
MPlatform SDK
(myFile as IMProps).PropsSet("object::crop", "10,20,30,40");
Reflect
You can reflect your video with "mirror" property.
Possible values are:
- "vert" for vertical reflection,
- "horz" for horizontal reflection,
- "both" for vertical and horizontal reflection at the same time.
MFormats SDK
(myReader as IMProps).PropsSet("mirror", "vert");
MPlatform SDK
(myFile as IMProps).PropsSet("object::mirror", "vert");
Here is a result of different values of "mirror" property:
Rotate
You can rotate your video to left or to right on 90 degrees with "rotate" property. Possible values are "left" and "right".
MFormats SDK
(myReader as IMProps).PropsSet("rotate", "left");
MPlatform SDK
(myFile as IMProps).PropsSet("object::rotate", "left");
Here is an example of results for this property:
Rotate in encode
If you need to add a rotation parameter to the recording file, then you need to specify it in the MFWriter/MWriter configuration. Note that display_rotation is a value in degrees by which the video should be rotated counter-clockwise:
format='mp4' display_rotation='67' video::codec='n264' audio::codec='aac'
And MediaInfo shows the value by which the video should be rotated clockwise: