This page explains how to programmatically remove unwanted outer areas from an
input video. For information on how to trim the timeline of input videos, see
[Stream mappings](https://docs.cloud.google.com/transcoder/docs/concepts/stream-mappings.md.txt).

Use the
[`crop`](https://docs.cloud.google.com/transcoder/docs/reference/rest/v1/JobConfig.md.txt#preprocessingconfig)
configuration field to specify the number of pixels to remove from each side of
the input video. You can add this configuration to a
[job template](https://docs.cloud.google.com/transcoder/docs/how-to/job-templates.md.txt) or include it in an
[ad-hoc job configuration](https://docs.cloud.google.com/transcoder/docs/how-to/jobs.md.txt#create_jobs_ad_hoc).

The following REST/JSON configuration removes 10 pixels from the top of an input
video. The input video is then scaled to meet the dimensions specified by the
`widthPixels` and `heightPixels` fields in the specified codec for the
[`videoStream`](https://docs.cloud.google.com/transcoder/docs/reference/rest/v1/JobConfig.md.txt#videostream)
object. The output video is then generated from this scaled intermediate video.

```json
"inputs": [
  {
    "key": "input0",
    "uri": "gs://STORAGE_BUCKET_NAME/STORAGE_INPUT_VIDEO",
    "preprocessingConfig": {
      "crop": {
        "topPixels": 10
      }
    }
  }
],
```