Android.Media.MediaRecorder.SetOutputFormat Method
Sets the format of the output file produced during recording.

Syntax

[Android.Runtime.Register("setOutputFormat", "(I)V", "GetSetOutputFormat_IHandler")]
public virtual void SetOutputFormat ([Android.Runtime.GeneratedEnum] OutputFormat output_format)

Parameters

output_format
the output format to use. The output format needs to be specified before setting recording-parameters or encoders.

Exceptions

TypeReason
Java.Lang.IllegalStateExceptionif it is called after prepare() or before setAudioSource()/setVideoSource().

Remarks

Sets the format of the output file produced during recording. Call this after setAudioSource()/setVideoSource() but before prepare().

It is recommended to always use 3GP format when using the H.263 video encoder and AMR audio encoder. Using an MPEG-4 container format may confuse some desktop players.

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1