# Cut a clip from a video without re-encoding

**Use case:** 

Copies the part between Start and End into a new file without re-encoding, so without quality loss; MP4, MOV, WebM, MKV, MP3 and M4A keep their container, AVI, MPEG-TS and FLV become MKV; the start snaps to the nearest earlier keyframe. $0.01 per started minute of the clip on every plan. This example cuts 0:15–0:45 from a 70-second 1080p NASA video: a 30.1-second MP4 of 18,383,719 bytes, $0.01.

## Input

```json
{
  "files": [
    "https://images-assets.nasa.gov/video/BalloonAscension_TL_VOTY/BalloonAscension_TL_VOTY~large.mp4"
  ],
  "fileFields": [
    "url"
  ],
  "operation": "cut",
  "start": "15",
  "end": "45",
  "videoFormat": "mp4",
  "resolution": "480p",
  "quality": "balanced",
  "targetSizeMb": 0,
  "maxFps": 0,
  "mute": false,
  "audioFormat": "mp3",
  "audioKbps": 0,
  "channels": "keep",
  "sampleRate": "keep",
  "normalizeLoudness": false,
  "gifWidth": 480,
  "gifFps": 10,
  "frameCount": 5,
  "frameEverySeconds": 0,
  "frameFormat": "jpg",
  "frameWidth": 0,
  "maxFiles": 100,
  "maxMinutesPerFile": 60,
  "maxFileSizeMb": 1024,
  "maxConcurrency": 2
}
```

## Output

```json
{
  "fileIndex": {
    "label": "#",
    "format": "number"
  },
  "url": {
    "label": "Source",
    "format": "link"
  },
  "operation": {
    "label": "Operation",
    "format": "text"
  },
  "status": {
    "label": "Status",
    "format": "text"
  },
  "fileUrl": {
    "label": "Output file",
    "format": "link"
  },
  "format": {
    "label": "Format",
    "format": "text"
  },
  "durationSec": {
    "label": "Seconds",
    "format": "number"
  },
  "width": {
    "label": "Width",
    "format": "number"
  },
  "height": {
    "label": "Height",
    "format": "number"
  },
  "bytes": {
    "label": "Bytes",
    "format": "number"
  },
  "frameTimeSec": {
    "label": "Frame at (s)",
    "format": "number"
  },
  "sourceDurationSec": {
    "label": "Source seconds",
    "format": "number"
  },
  "sourceBytes": {
    "label": "Source bytes",
    "format": "number"
  },
  "note": {
    "label": "Note",
    "format": "text"
  },
  "billable": {
    "label": "Billable",
    "format": "boolean"
  },
  "error": {
    "label": "Error",
    "format": "text"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Video & Audio Converter (FFmpeg): Compress, MP3, GIF, Frames Actor is ready to run with the inputs already set for "Cut a clip from a video without re-encoding". [Sign up or log in](https://console.apify.com/create-task-from-example/sU9vJwkieu2yS2e3B) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Cut a clip from a video without re-encoding" task

The Video & Audio Converter (FFmpeg): Compress, MP3, GIF, Frames Actor will start running based on the input automatically. You can also change all the input fields, like files, file link fields, and more, to match your specific use case.

### 3. Receive the "Cut a clip from a video without re-encoding" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as #, source, operation, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Cut a clip from a video without re-encoding" task via API](https://apify.com/kadben/video-audio-converter.md).

## FAQ

### Why can the clip start a little early?

This task copies the streams, so the start snaps to the nearest earlier keyframe. For an exact start, set Operation to 'Convert or compress video' (not for HEVC): it re-encodes at the source size, $0.08 per started 1080p minute (Free plan).

### Which files can the cut task handle?

The task keeps the container of MP4, MOV, M4A, MKV, WebM and of audio-only MP3, OGG, FLAC and WAV, with the source's codecs; 3GP becomes MP4, AVI, MPEG-TS, FLV and other formats FFmpeg reads become MKV. Raw .h264 and .hevc streams cannot be cut.

### What does the cut task cost?

The task charges $0.01 per started minute of the clip on every plan (no Store discount), plus $0.015 per started 100 MB beyond a source's first 100 MB and the start event, $0.0002 per run at the default 4 GB. Failed files are free.

## About this Actor

This example demonstrates how to use [Video & Audio Converter (FFmpeg): Compress, MP3, GIF, Frames](https://apify.com/kadben/video-audio-converter.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/kadben/video-audio-converter.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/kadben/video-audio-converter.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
