# Examples: Performing skew correction

Skew correction allows the insertion or removal of audio frames to/from an audio stream. The following examples show how to perform skew correction when building a 3GP file:

- Performing skew correction by inserting audio frames into a 3GP file

- Performing skew correction by removing audio frames from a 3GP file

## Performing skew correction by inserting audio frames into a 3GP file

The following example performs skew correction by creating the newsample.3gp file. The skew correction value is 100 ms. The first audio frame is inserted five times into the start of an audio stream.

Computation of frames inserted:

Number of frames inserted = 100 ms/20 ms = 5

where the skew correction = 100 ms and the audio frame duration (AMR) = 20 ms.

#### Command

3gpapp –z100 –c newsample.3gp sample.namr sample.n263

#### Returned data

3gpapp - NMS Communications 2007 - v1.0.725
Skew correction is set as 100
CREATING newsample.3gp FROM sample.namr AND sample.n263
Reading data from file: sample.namr
BufferSize=91117, total read 91117 bytes
91117 bytes read in file: sample.namr
67968 bytes written in from file sample.namr to file: newsample.3gp
67968 bytes written in from file sample.namr to file: newsample.3gp
Reading data from file: sample.n263
BufferSize=234549, total read 234549 bytes
234549 bytes read in file: sample.n263
231429 bytes written in from file sample.n263 to file: newsample.3gp
231429 bytes written in from file sample.n263 to file: newsample.3gp

## Performing skew correction by removing audio frames from a 3GP file

The following example performs skew correction by creating the newsample.3gp file. The skew correction value is -100 ms. The first five audio frames are removed from the audio stream. For example, the first five audio frames are not inserted into the audio frames, they are skipped.

#### Command

3gpapp –z-100 –c newsample.3gp sample.namr sample.n263

#### Returned data

3gpapp - NMS Communications 2007 - v1.0.725
Skew correction is set as -100
CREATING newsample.3gp FROM sample.namr AND sample.n263
Reading data from file: sample.namr
BufferSize=91117, total read 91117 bytes
91117 bytes read in file: sample.namr
67648 bytes written in from file sample.namr to file: newsample.3gp
67648 bytes written in from file sample.namr to file: newsample.3gp
Reading data from file: sample.n263
BufferSize=234549, total read 234549 bytes
234549 bytes read in file: sample.n263
231429 bytes written in from file sample.n263 to file: newsample.3gp
231429 bytes written in from file sample.n263 to file: newsample.3gp