Video & Audio Media Converter
Pricing
Pay per usage
Video & Audio Media Converter
Transform your audio and video files effortlessly! With the power of FFmpeg and yt-dlp, you can seamlessly convert between various formats to suit your needs. Whether you're fine-tuning your media collection or sharing your favourite content, this tool makes it simple and efficient!
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Jamshaid Arif
Actor stats
0
Bookmarked
1
Total users
0
Monthly active users
3 days ago
Last modified
Categories
Share
🎥 Video & Audio Media Converter
All-in-one serverless media converter running on Apify. Converts video and audio files between formats using FFmpeg and yt-dlp.
🛠️ Tools
| # | Tool | Description |
|---|---|---|
| 1 | MP4 → MP3 | Extract audio track from MP4 video |
| 2 | MKV → MP4 | Remux (fast copy) or re-encode MKV to MP4 |
| 3 | Video → GIF | Create animated GIF with palette optimization |
| 4 | Audio Bitrate | Re-encode audio at different bitrate / format |
| 5 | YouTube → MP3 | Download YouTube audio via yt-dlp |
⚡ Quick Start
Via Apify Console
- Go to the Actor page on Apify
- Select a Tool from the dropdown
- Paste the Input File URL (direct link to your media file)
- Tweak options (bitrate, FPS, format, etc.)
- Click Start — the output file URL appears in the dataset
Via API
curl -X POST "https://api.apify.com/v2/acts/<YOUR_ACTOR_ID>/runs?token=<YOUR_TOKEN>" \-H "Content-Type: application/json" \-d '{"tool": "mp4_to_mp3","input_file_url": "https://example.com/video.mp4","audio_bitrate": "256k"}'
YouTube Download Example
{"tool": "youtube_to_mp3","youtube_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ","audio_bitrate": "320k","audio_output_format": "mp3"}
📥 Input Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
tool | enum | mp4_to_mp3 | Which converter to use |
input_file_url | string | — | Direct URL to the media file |
youtube_url | string | — | YouTube URL (tool 5 only) |
audio_bitrate | enum | 192k | Target bitrate: 64k–320k |
audio_output_format | enum | mp3 | Output format: mp3, aac, ogg, flac |
mkv_codec_mode | enum | copy | Copy (fast) or re-encode (H.264) |
encoding_preset | enum | medium | FFmpeg preset for re-encoding |
gif_fps | int | 15 | GIF frame rate |
gif_width | int | 480 | GIF width in pixels |
gif_start_time | float | 0 | Start time in seconds |
gif_duration | float | 5 | GIF duration in seconds |
📤 Output
Results are pushed to the default dataset with this schema:
{"tool": "mp4_to_mp3","status": "success","input_file": "video.mp4","output_file": "video.mp3","output_url": "https://api.apify.com/v2/key-value-stores/.../records/video.mp3","file_size_mb": 3.42,"duration_seconds": 1.87,"message": "Audio extracted at 192k."}
The converted file is stored in the Actor's Key-Value Store and accessible via output_url.
🏗️ Project Structure
apify-media-converter/├── .actor/│ ├── actor.json # Actor metadata & config│ └── input_schema.json # Input UI schema├── src/│ ├── __init__.py│ └── main.py # Actor logic (all 5 tools)├── Dockerfile # FFmpeg + yt-dlp + Python├── requirements.txt└── README.md
⚠️ Stream Validation
The Actor checks for missing streams before attempting conversion:
- MP4→MP3: verifies audio stream exists
- MKV→MP4: verifies video stream exists
- Video→GIF: verifies video stream exists
- Audio Bitrate: verifies audio stream exists
If a stream is missing, the Actor returns a clear error instead of a cryptic FFmpeg crash.