Skip to main content
VESDK/Android/Guides/Save / Export Video

Save Video

VideoEditor SDK for Android supports exporting to different locations and file formats.

By default, VideoEditor SDK exports edited video in the same resolution, as it was originally loaded into the editor, as long as no cropping operation was carried out. The frame rate of the exported video is the same as the input video and cannot be modified. VideoEditorSaveSettings holds all the settings related to exporting and saving the video. Upon export, the Uri of the exported video can be obtained from EditorSDKResult.resultUri.

Output mode#

VideoEditor SDK supports three OutputModes:

The output mode can be set in VideoEditorSaveSettings.outputMode.

Export format#

VideoEditor SDK supports exporting videos in MP4 (H.264) or WEBM (VP8) format. To ensure maximum cross-platform compatibility, we recommend using MP4, which is set by default.

The export format can be set using VideoEditorSaveSettings.setVideoExportFormat().

Quality#

  • Bit rate - By default, the exported video has the same bit rate as the input video. It can be set in VideoEditorSaveSettings.bitRate.

  • Bits per pixel (BPP) - Setting VideoEditorSaveSettings.bitsPerPixel is a better option than setting the bit rate as it takes into account the size of the video. When this is set to a non-null value, VideoEditorSaveSettings.bitRate is ignored. The resultant bitrate is calculated by multiplying the BPP with the width, height, and frame rate of the video. A common value for good quality/size balance with H.264 is 0.08f and sensible values are from 0.04f to 0.25f while VP8 looks good on lower values as well.

  • I-frame interval - By default, the i-frame interval is set to 2 seconds. It can be set in VideoEditorSaveSettings.iFrameIntervalInSeconds.