# Universal Cloud Video Converter (`codingfrontend/video-converter`) Actor

Download and extract rich video metadata from Video Converter, supporting resolutions up to 4K. Scrapes titles, duration, channel information, view counts, likes, user comments, and subtitles. Built with complete proxy rotation and anti-bot bypass support.

- **URL**: https://apify.com/codingfrontend/video-converter.md
- **Developed by:** [Coding Frontned](https://apify.com/codingfrontend) (community)
- **Categories:** Videos, Developer tools, Automation
- **Stats:** 21 total users, 3 monthly users, 83.3% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Video Converter - Apify Actor

Converts one supplied video with FFmpeg, optionally extracts tracks or creates HLS/GIF/thumbnail derivatives, uploads the result to the selected destination, and writes a source-backed summary to the default dataset. Actual conversion requires FFmpeg and any credentials required by the selected source or destination.

### What this actor does

The actor fetches one input video, probes it with ffprobe, performs a standard conversion, track extraction, HLS generation, or GIF generation, uploads the produced artifacts, and saves the final result to the dataset. It also writes the full success or error object to the fixed `OUTPUT` key in the default Apify Key-Value Store.

### Code structure

The entrypoint in `src/main.js` only starts the Actor lifecycle. The workflow is split into focused modules: `src/workflow.js` orchestrates conversion, `src/inputSource.js` resolves input media, `src/outputUploader.js` handles destination uploads and HLS/track artifacts, and `src/mediaSummary.js` normalizes ffprobe facts and dataset records. Existing converter, handler, schema, and utility modules remain independently reusable.

### Features

#### Input Sources

- **URL**: Direct video URLs with authentication support (Bearer, Basic, Custom Header)
- **Google Drive**: Download videos from Google Drive using file ID and service account
- **Dropbox**: Download videos from Dropbox shared links
- **Cloud Storage**: AWS S3, Google Cloud Storage
- **Apify Storage**: Load videos from Apify Key-Value Store

#### Output Formats

- **Video**: MP4, MOV, WEBM, MKV, AVI
- **Animation**: GIF
- **Streaming**: HLS (HTTP Live Streaming), opt-in

#### Video Codecs

- **H.264/AVC** - Most compatible
- **H.265/HEVC** - Better compression
- **VP8/VP9** - WebM/Open format
- **AV1** - Newest, best compression

#### Audio Codecs

- **AAC** - Most compatible
- **MP3** - Universal support
- **Opus** - Best quality/compression
- **Vorbis** - Open format

#### Output Destinations

- **Apify Key-Value Store** - Default, provides public URL
- **AWS S3** - Amazon Simple Storage Service
- **Google Cloud Storage (GCS)** - Google's object storage
- **Dropbox** - Upload to Dropbox account

#### Advanced Features

- **Track Extractor** - Split video into separate video, audio, and subtitle files
- Video trimming/cutting
- Watermarks (text and image)
- Audio controls (volume, mute, replace audio)
- Thumbnail generation
- GIF preview generation
- Webhooks (URL only or with file attachment)

### Input Examples

#### Basic URL Input

```json
{
    "inputType": "url",
    "videoUrl": "https://example.com/video.mp4",
    "outputFormat": "mp4",
    "videoCodec": "h264",
    "audioCodec": "aac",
    "quality": "medium",
    "outputDestination": "apify"
}
```

#### URL with Bearer Token Authentication

```json
{
    "inputType": "url",
    "videoUrl": "https://api.example.com/protected/video.mp4",
    "urlAuthType": "bearer",
    "urlAuthBearerToken": "your-api-token",
    "outputFormat": "mp4"
}
```

#### URL with Basic Auth

```json
{
    "inputType": "url",
    "videoUrl": "https://secure.example.com/video.mp4",
    "urlAuthType": "basic",
    "urlAuthUsername": "user",
    "urlAuthPassword": "pass",
    "outputFormat": "webm"
}
```

#### URL with Custom Header Auth

```json
{
    "inputType": "url",
    "videoUrl": "https://api.example.com/video.mp4",
    "urlAuthType": "header",
    "urlAuthHeaderName": "X-API-Key",
    "urlAuthHeaderValue": "your-api-key",
    "outputFormat": "mp4"
}
```

#### Google Drive Input

```json
{
    "inputType": "googleDrive",
    "googleDriveFileId": "1abc123def456",
    "googleDriveCredentials": {
        "private_key": "-----BEGIN PRIVATE KEY-----...",
        "client_email": "service@project.iam.gserviceaccount.com"
    },
    "outputFormat": "mp4"
}
```

#### Dropbox Input

```json
{
    "inputType": "dropbox",
    "dropboxFileUrl": "https://www.dropbox.com/s/abc123/video.mp4?dl=0",
    "dropboxAccessToken": "your-dropbox-token",
    "outputFormat": "webm"
}
```

#### HLS Output

```json
{
    "inputType": "url",
    "videoUrl": "https://example.com/video.mp4",
    "outputFormat": "hls",
    "videoCodec": "h264",
    "audioCodec": "aac"
}
```

### Output Destination Examples

#### AWS S3 Upload

```json
{
    "outputDestination": "s3",
    "s3Bucket": "my-video-bucket",
    "s3Region": "us-east-1",
    "s3AccessKeyId": "AKIA...",
    "s3SecretAccessKey": "...",
    "s3Path": "converted/video.mp4"
}
```

#### Google Cloud Storage Upload

```json
{
    "outputDestination": "gcs",
    "gcsBucket": "my-gcs-bucket",
    "gcsCredentials": {
        "type": "service_account",
        "project_id": "your-project",
        "private_key": "-----BEGIN PRIVATE KEY-----...",
        "client_email": "service@project.iam.gserviceaccount.com"
    },
    "gcsPath": "videos/output.mp4"
}
```

#### Dropbox Upload

```json
{
    "outputDestination": "dropbox",
    "dropboxAccessToken": "your-dropbox-token",
    "dropboxPath": "/Videos/converted.mp4"
}
```

### Webhook Configuration

#### URL Only Webhook (Default)

Sends JSON payload with video URL and metadata:

```json
{
    "webhookUrl": "https://api.example.com/webhook",
    "webhookAuthHeader": "Bearer webhook-secret"
}
```

#### Webhook with Video File

Sends multipart form data with actual video file attached:

```json
{
    "webhookUrl": "https://api.example.com/upload",
    "webhookSendFile": true,
    "webhookFileFieldName": "video",
    "webhookAuthHeader": "Bearer webhook-secret"
}
```

#### Webhook Payload Structure (URL Only)

```json
{
    "status": "success",
    "downloadUrl": "https://api.apify.com/v2/key-value-stores/.../records/video.mp4",
    "outputProvider": "apify",
    "inputFormat": "mp4",
    "outputFormat": "webm",
    "duration": 120.5,
    "fileSize": 15234567,
    "executionTime": 45.2,
    "thumbnails": [],
    "timestamp": "2024-01-15T10:30:00.000Z",
    "metadata": {
        "videoCodec": "vp9",
        "audioCodec": "opus",
        "resolution": "1920x1080"
    }
}
```

### Advanced Processing

#### Video Trimming

```json
{
    "trimStart": "00:00:30",
    "trimEnd": "00:02:00"
}
```

#### Add Text Watermark

```json
{
    "watermarkEnabled": true,
    "watermarkType": "text",
    "watermarkText": "© My Company",
    "watermarkPosition": "bottom-right",
    "watermarkOpacity": "0.8",
    "watermarkFontSize": 24,
    "watermarkFontColor": "white"
}
```

#### Add Image Watermark

```json
{
    "watermarkEnabled": true,
    "watermarkType": "image",
    "watermarkImageUrl": "https://example.com/logo.png",
    "watermarkPosition": "top-left",
    "watermarkOpacity": "0.5"
}
```

#### Generate Thumbnails

```json
{
    "thumbnailsEnabled": true,
    "thumbnailsCount": 5,
    "thumbnailsFormat": "jpg",
    "thumbnailsWidth": 640
}
```

#### Generate GIF Preview

```json
{
    "gifPreviewEnabled": true,
    "gifPreviewStartTime": "00:00:05",
    "gifPreviewDuration": 3,
    "gifPreviewWidth": 480,
    "gifPreviewFps": 10
}
```

#### Audio Controls

```json
{
    "audioVolume": "1.5",
    "audioNormalize": true,
    "audioReplaceUrl": "https://example.com/music.mp3"
}
```

### HLS Streaming Output

HLS is opt-in. Set `outputFormat` to `hls` to create a playlist and segments:

```json
{
    "inputType": "url",
    "videoUrl": "https://example.com/video.mp4",
    "outputFormat": "hls",
    "videoCodec": "h264",
    "audioCodec": "aac"
}
```

### Track Extractor

The extractor feature allows you to split a video file into separate video, audio, and subtitle tracks. This is useful for:

- Extracting audio from videos (e.g., for podcasts or music)
- Getting video without audio (for adding custom audio later)
- Extracting embedded subtitles/captions

#### Basic Extraction - All Tracks

```json
{
    "inputType": "url",
    "videoUrl": "https://example.com/movie.mkv",
    "extractorEnabled": true,
    "extractorExtractVideo": true,
    "extractorExtractAudio": true,
    "extractorExtractSubtitles": true
}
```

#### Extract Audio Only (MP3)

```json
{
    "inputType": "url",
    "videoUrl": "https://example.com/video.mp4",
    "extractorEnabled": true,
    "extractorExtractVideo": false,
    "extractorExtractAudio": true,
    "extractorExtractSubtitles": false,
    "extractorAudioFormat": "mp3",
    "extractorAudioBitrate": "320k"
}
```

#### Extract Audio as High-Quality FLAC

```json
{
    "inputType": "url",
    "videoUrl": "https://example.com/concert.mp4",
    "extractorEnabled": true,
    "extractorExtractVideo": false,
    "extractorExtractAudio": true,
    "extractorAudioFormat": "flac"
}
```

#### Extract Video Without Audio

```json
{
    "inputType": "url",
    "videoUrl": "https://example.com/video.mp4",
    "extractorEnabled": true,
    "extractorExtractVideo": true,
    "extractorExtractAudio": false,
    "extractorVideoCodec": "copy"
}
```

#### Extractor Output Example

When extraction is complete, the output includes URLs for each extracted track:

```json
{
    "status": "success",
    "extractedTracks": {
        "videoUrl": "https://api.apify.com/v2/key-value-stores/.../records/video_video.mp4",
        "audioUrl": "https://api.apify.com/v2/key-value-stores/.../records/video_audio.mp3",
        "subtitleUrls": [
            {
                "url": "https://api.apify.com/v2/key-value-stores/.../records/video_subtitle_eng.srt",
                "language": "eng",
                "title": "English",
                "index": 0
            }
        ]
    },
    "streamInfo": {
        "hasVideo": true,
        "hasAudio": true,
        "hasSubtitles": true,
        "streams": {
            "video": [{ "codec": "h264", "width": 1920, "height": 1080 }],
            "audio": [{ "codec": "aac", "channels": 2, "sampleRate": "48000" }],
            "subtitle": [{ "codec": "subrip", "language": "eng" }]
        }
    }
}
```

#### Extractor Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `extractorEnabled` | Boolean | `false` | Enable extractor mode |
| `extractorExtractVideo` | Boolean | `true` | Extract video track (without audio) |
| `extractorExtractAudio` | Boolean | `true` | Extract audio track |
| `extractorExtractSubtitles` | Boolean | `true` | Extract subtitle/caption tracks |
| `extractorVideoCodec` | String | `copy` | Video codec (`h264`, `h265`, `vp9`, `copy`) |
| `extractorAudioFormat` | String | `mp3` | Audio format (`mp3`, `aac`, `wav`, `flac`, `ogg`, `opus`) |
| `extractorAudioBitrate` | String | - | Audio bitrate (e.g., `128k`, `320k`) |
| `extractorSubtitleFormat` | String | `srt` | Subtitle format (`srt`, `ass`, `vtt`) |

### Input Parameters Reference

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `inputType` | String | Yes | `url` | `url`, `dropbox`, `googleDrive`, `cloudStorage`, `apifyStorage` |
| `videoUrl` | String | Conditional | - | Video URL (required for `url` input) |
| `urlAuthType` | String | No | `none` | `none`, `bearer`, `basic`, `header` |
| `outputFormat` | String | Yes | `hls` | `mp4`, `mov`, `webm`, `mkv`, `avi`, `gif`, `hls` |
| `videoCodec` | String | No | `h264` | `h264`, `h265`, `vp8`, `vp9`, `av1`, `copy` |
| `audioCodec` | String | No | `aac` | `aac`, `mp3`, `opus`, `vorbis`, `copy`, `none` |
| `quality` | String | No | `medium` | `low`, `medium`, `high`, `veryhigh` |
| `preset` | String | No | `medium` | FFmpeg preset (affects speed/quality) |
| `outputDestination` | String | No | `apify` | `apify`, `s3`, `gcs`, `dropbox` |
| `webhookUrl` | String | No | - | Webhook URL for notifications |
| `webhookSendFile` | Boolean | No | `false` | Send video file in webhook |

### Output

The Actor saves results to:

1. **Apify Dataset** - Conversion results and metadata
2. **Apify Key-Value Store** - Converted video file (if `outputDestination` is `apify`)
3. **OUTPUT Key** - Full result object

#### Output Structure

```json
{
    "status": "success",
    "inputSource": "url",
    "inputFormat": "mp4",
    "outputFormat": "webm",
    "outputUrl": "https://api.apify.com/v2/key-value-stores/.../records/video.webm",
    "outputDestination": "apify",
    "outputFileSizeBytes": 12345678,
    "outputDurationSeconds": 120.5,
    "executionTimeSeconds": 45.2,
    "thumbnails": [],
    "timestamp": "2024-01-15T10:30:00.000Z"
}
```

### Supported Input Formats

- MP4, MOV, AVI, MKV, WEBM, FLV, WMV, 3GP, OGV

### Resource Requirements

- **Memory**: 4096 MB recommended for HD video
- **CPU**: 1-4 cores depending on video length

### Output schema and storage

The default dataset contains one successful result record with source media facts, output facts, the primary URL, optional thumbnail/GIF/HLS links, and optional extracted-track or stream information. The `OUTPUT` key contains the same result object on success or an error summary on failure. Uploaded binaries use generated or configured keys in the same key-value store and are not dataset rows.

### Cost and limits

Runtime depends on input duration, resolution, codec, processing mode, and upload destination. Large conversions need more memory and may create multiple stored artifacts. External storage, webhook, proxy, and API charges are controlled by the services you configure.

### FAQ

#### Is HLS the default?

No. Standard MP4 conversion is the default. Set `outputFormat` to `hls` to create a playlist and segments.

#### What happens when conversion fails?

The actor writes an error object to `OUTPUT`, cleans temporary files, and rethrows the error so the run is marked failed. A failed conversion does not create a successful dataset result.

#### Does the actor keep temporary source files?

Temporary working files are cleaned up after the run. Persisted files depend on the selected output destination and options such as thumbnails, GIF previews, HLS, or track extraction.

### Disclaimer

Use only media you are authorized to download, transform, and redistribute. Follow copyright, privacy, licensing, and third-party storage requirements. Never place long-lived credentials in public input or logs.

### License

MIT

# Actor input Schema

## `maxInputSizeMbytes` (type: `integer`):

Hard limit applied before media processing. URL downloads are stopped while streaming when this limit is exceeded.

## `maxInputDurationSeconds` (type: `integer`):

Hard duration limit checked with ffprobe before conversion begins.

## `inputType` (type: `string`):

Select where to get the input video from. Use a direct URL, an uploaded/base64 file, Dropbox, Google Drive, cloud storage, or an Apify Key-Value Store.

## `videoUrl` (type: `string`):

Direct URL to the video file. Required when Input Type is 'url'. Supports HTTP/HTTPS URLs to MP4, MOV, AVI, MKV, WebM and other video formats.

## `uploadedVideo` (type: `string`):

Base64 data URL or a key in the default Apify Key-Value Store. Required when Input Type is 'upload'.

## `dropboxFileUrl` (type: `string`):

Dropbox shared link for the source video. Required when Input Type is 'dropbox'.

## `cloudProvider` (type: `string`):

Cloud provider containing the input object. Required when Input Type is 'cloudStorage'.

## `inputBucket` (type: `string`):

Bucket containing the input object. Required when Input Type is 'cloudStorage'.

## `inputObjectKey` (type: `string`):

Path/key of the input object. Required when Input Type is 'cloudStorage'.

## `inputCloudCredentials` (type: `object`):

Provider credentials for the input bucket. Required when Input Type is 'cloudStorage'.

## `apifyStoreId` (type: `string`):

Key-Value Store ID containing the source file. Required when Input Type is 'apifyStorage'.

## `apifyStoreKey` (type: `string`):

Record key of the source file. Required when Input Type is 'apifyStorage'.

## `urlAuthType` (type: `string`):

Authentication method for downloading video from protected URLs. Required only if the video URL needs authentication. Use 'bearer' for API tokens, 'basic' for username/password, or 'header' for custom headers.

## `urlAuthBearerToken` (type: `string`):

Bearer token for URL authentication. Required when URL Auth Type is 'bearer'. The token will be sent as 'Authorization: Bearer {token}' header.

## `urlAuthUsername` (type: `string`):

Username for HTTP Basic authentication. Required when URL Auth Type is 'basic'.

## `urlAuthPassword` (type: `string`):

Password for HTTP Basic authentication. Required when URL Auth Type is 'basic'.

## `urlAuthHeaderName` (type: `string`):

Custom header name for authentication. Required when URL Auth Type is 'header'. Example: 'X-API-Key' or 'Authorization'.

## `urlAuthHeaderValue` (type: `string`):

Custom header value for authentication. Required when URL Auth Type is 'header'. This is the actual token/key value.

## `googleDriveFileId` (type: `string`):

Google Drive file ID. Required when Input Type is 'googleDrive'. Find it in the file URL: drive.google.com/file/d/{FILE\_ID}/view

## `googleDriveCredentials` (type: `object`):

Google Drive API service account credentials. Required when Input Type is 'googleDrive'. Paste the entire JSON key file content from Google Cloud Console.

## `outputFormat` (type: `string`):

Select the desired output video format. 'mp4' is most compatible, 'webm' for web use, 'hls' for adaptive streaming, 'gif' for animated images.

## `videoCodec` (type: `string`):

Video codec for encoding. 'h264' is most compatible, 'h265' for better compression, 'vp9' for WebM, 'copy' to keep original (fastest).

## `audioCodec` (type: `string`):

Audio codec for encoding. 'aac' is most compatible, 'mp3' for universal support, 'opus' for WebM, 'copy' to keep original, 'none' to remove audio.

## `quality` (type: `string`):

Output video quality preset. Higher quality = larger file size. 'low' (~500kbps), 'medium' (~1Mbps), 'high' (~2Mbps), 'veryhigh' (~4Mbps).

## `preset` (type: `string`):

Encoding speed vs compression tradeoff. 'ultrafast' is quickest but larger files, 'veryslow' is smallest files but takes longer. 'medium' is balanced.

## `resolution` (type: `string`):

Output video resolution. Leave empty to keep original. Format: WIDTHxHEIGHT. Common values: '1920x1080' (Full HD), '1280x720' (HD), '854x480' (SD).

## `fps` (type: `integer`):

Output video frame rate. Leave empty to keep original. Common values: 24 (cinema), 30 (web), 60 (gaming/smooth).

## `bitrate` (type: `string`):

Video bitrate override. Leave empty for automatic based on quality. Examples: '2M' (2 Mbps), '5000k' (5000 kbps).

## `audioBitrate` (type: `string`):

Audio bitrate. Leave empty for automatic. Common values: '128k' (standard), '192k' (good), '320k' (high quality).

## `extractorEnabled` (type: `boolean`):

Enable to extract video, audio, and subtitle tracks into separate files instead of converting. When enabled, output format settings are ignored.

## `extractorExtractVideo` (type: `boolean`):

Extract video track without audio. Requires 'Enable Track Extractor' to be ON.

## `extractorExtractAudio` (type: `boolean`):

Extract audio track as separate file. Requires 'Enable Track Extractor' to be ON. Output format controlled by 'Extractor Audio Format'.

## `extractorExtractSubtitles` (type: `boolean`):

Extract subtitle/caption tracks if present. Requires 'Enable Track Extractor' to be ON. Not all videos have embedded subtitles.

## `extractorVideoCodec` (type: `string`):

Video codec for extracted video track. Use 'copy' for fastest extraction without re-encoding.

## `extractorAudioFormat` (type: `string`):

Output format for extracted audio. 'mp3' for universal compatibility, 'flac' for lossless, 'aac' for Apple devices.

## `extractorAudioBitrate` (type: `string`):

Bitrate for extracted audio. Leave empty for automatic. Examples: '128k', '192k', '320k' for MP3.

## `extractorSubtitleFormat` (type: `string`):

Output format for extracted subtitles. 'srt' is most compatible, 'vtt' for web, 'ass' for styled subtitles.

## `trimStart` (type: `string`):

Start time for trimming. Leave empty to start from beginning. Format: 'HH:MM:SS' or seconds. Examples: '00:01:30', '90'.

## `trimEnd` (type: `string`):

End time for trimming. Leave empty to go until end. Format: 'HH:MM:SS' or seconds. Examples: '00:05:00', '300'.

## `watermarkEnabled` (type: `boolean`):

Enable to add a text or image watermark to the video. Configure type, text/image, and position below.

## `watermarkType` (type: `string`):

Type of watermark. Required when 'Enable Watermark' is ON. 'text' for text overlay, 'image' for logo/image overlay.

## `watermarkText` (type: `string`):

Text to display as watermark. Required when Watermark Type is 'text'. Example: '© My Company 2024'.

## `watermarkImageUrl` (type: `string`):

URL of watermark image (PNG with transparency recommended). Required when Watermark Type is 'image'.

## `watermarkPosition` (type: `string`):

Position of the watermark on the video. Choose corner or center placement.

## `watermarkFontSize` (type: `integer`):

Font size for text watermark. Only applies when Watermark Type is 'text'. Range: 8-200.

## `watermarkFontColor` (type: `string`):

Font color for text watermark. Use color names ('white', 'red') or hex codes ('#FF0000'). Only applies when Watermark Type is 'text'.

## `watermarkOpacity` (type: `string`):

Watermark transparency. '1.0' is fully opaque, '0.5' is semi-transparent, '0.0' is invisible. Recommended: 0.5-0.8.

## `audioVolume` (type: `string`):

Adjust audio volume. '1.0' is original, '0.5' is half volume, '2.0' is double volume. Leave empty for no change.

## `audioNormalize` (type: `boolean`):

Automatically adjust audio levels for consistent volume throughout the video.

## `audioRemove` (type: `boolean`):

Remove audio track completely from output. Creates a silent video.

## `audioReplaceUrl` (type: `string`):

URL of audio file to replace original audio. Supports MP3, AAC, WAV. Original audio will be removed.

## `thumbnailsEnabled` (type: `boolean`):

Generate thumbnail images from the video at evenly spaced intervals.

## `thumbnailsCount` (type: `integer`):

Number of thumbnails to generate. Requires 'Generate Thumbnails' to be ON. Range: 1-20.

## `thumbnailsFormat` (type: `string`):

Image format for thumbnails. 'jpg' is smallest, 'png' for transparency, 'webp' for modern browsers.

## `thumbnailsWidth` (type: `integer`):

Width of thumbnails in pixels. Height is calculated automatically to maintain aspect ratio.

## `gifPreviewEnabled` (type: `boolean`):

Generate an animated GIF preview from a section of the video.

## `gifPreviewStartTime` (type: `string`):

Start time for GIF preview. Requires 'Generate GIF Preview' to be ON. Format: 'HH:MM:SS' or seconds.

## `gifPreviewDuration` (type: `integer`):

Duration of GIF in seconds. Longer = larger file. Recommended: 3-10 seconds.

## `gifPreviewWidth` (type: `integer`):

Width of GIF in pixels. Smaller = smaller file size. Recommended: 200-400.

## `gifPreviewFps` (type: `integer`):

Frames per second for GIF. Higher = smoother but larger file. Recommended: 10-15.

## `outputDestination` (type: `string`):

Where to upload the converted video. 'apify' stores in Apify Key-Value Store (default), others require credentials configured below.

## `outputStoreKey` (type: `string`):

Key name for storing in Apify Key-Value Store. Only used when Output Destination is 'apify'. Include file extension.

## `s3Bucket` (type: `string`):

AWS S3 bucket name. Required when Output Destination is 's3'. Example: 'my-video-bucket'.

## `s3Region` (type: `string`):

AWS region where bucket is located. Required when Output Destination is 's3'. Example: 'us-east-1', 'eu-west-1'.

## `s3AccessKeyId` (type: `string`):

AWS IAM access key ID. Required when Output Destination is 's3'. Get from AWS IAM Console.

## `s3SecretAccessKey` (type: `string`):

AWS IAM secret access key. Required when Output Destination is 's3'. Keep this secret!

## `s3Path` (type: `string`):

Path/key in S3 bucket where file will be stored. Include filename. Example: 'videos/output.mp4'.

## `s3Acl` (type: `string`):

S3 access control. 'private' for restricted access, 'public-read' for public URL access.

## `gcsBucket` (type: `string`):

Google Cloud Storage bucket name. Required when Output Destination is 'gcs'.

## `gcsCredentials` (type: `object`):

Google Cloud service account JSON credentials. Required when Output Destination is 'gcs'. Paste entire JSON key file.

## `gcsPath` (type: `string`):

Path in GCS bucket where file will be stored. Required when Output Destination is 'gcs'. Example: 'videos/output.mp4'.

## `gcsMakePublic` (type: `boolean`):

Make uploaded file publicly accessible via URL. Only applies when Output Destination is 'gcs'.

## `dropboxAccessToken` (type: `string`):

Dropbox API access token. Required when Output Destination is 'dropbox'. Get from Dropbox App Console.

## `dropboxPath` (type: `string`):

Dropbox path where file will be saved. Required when Output Destination is 'dropbox'. Example: '/Videos/output.mp4'.

## `dropboxCreateSharedLink` (type: `boolean`):

Create a shareable link for the uploaded file. Only applies when Output Destination is 'dropbox'.

## `webhookUrl` (type: `string`):

URL to receive notification when conversion completes. Optional. Will POST JSON with result data.

## `webhookSendFile` (type: `boolean`):

Send converted video file in webhook (multipart/form-data) instead of just URL. Requires webhook URL. May timeout for large files.

## `webhookFileFieldName` (type: `string`):

Form field name for the video file in webhook request. Only used when 'Send Video File in Webhook' is ON.

## `webhookAuthHeader` (type: `string`):

Authorization header value for webhook request. Optional. Example: 'Bearer your-secret-token' or 'Basic base64encoded'.

## `hls` (type: `object`):

Optional HLS settings used when outputFormat is hls. The actor generates a VOD playlist by default.

## Actor input object example

```json
{
  "maxInputSizeMbytes": 512,
  "maxInputDurationSeconds": 7200,
  "inputType": "url",
  "videoUrl": "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4",
  "urlAuthType": "none",
  "outputFormat": "mp4",
  "videoCodec": "h264",
  "audioCodec": "aac",
  "quality": "medium",
  "preset": "medium",
  "extractorEnabled": false,
  "extractorExtractVideo": true,
  "extractorExtractAudio": true,
  "extractorExtractSubtitles": true,
  "extractorVideoCodec": "copy",
  "extractorAudioFormat": "mp3",
  "extractorSubtitleFormat": "srt",
  "watermarkEnabled": false,
  "watermarkType": "text",
  "watermarkPosition": "bottom-right",
  "watermarkFontSize": 24,
  "watermarkFontColor": "white",
  "watermarkOpacity": "0.8",
  "audioNormalize": false,
  "audioRemove": false,
  "thumbnailsEnabled": false,
  "thumbnailsCount": 1,
  "thumbnailsFormat": "jpg",
  "thumbnailsWidth": 320,
  "gifPreviewEnabled": false,
  "gifPreviewStartTime": "0",
  "gifPreviewDuration": 5,
  "gifPreviewWidth": 320,
  "gifPreviewFps": 10,
  "outputDestination": "apify",
  "outputStoreKey": "converted_video.mp4",
  "s3Acl": "private",
  "gcsMakePublic": false,
  "dropboxCreateSharedLink": false,
  "webhookSendFile": false,
  "webhookFileFieldName": "video"
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `keyValueStore` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "videoUrl": "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4",
    "outputFormat": "mp4"
};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/video-converter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "videoUrl": "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4",
    "outputFormat": "mp4",
}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/video-converter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videoUrl": "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4",
  "outputFormat": "mp4"
}' |
apify call codingfrontend/video-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codingfrontend/video-converter"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/TiYmc3WE2nWgxlgtU/builds/6kp7uZahZmdiZSEuB/openapi.json
