Video & Audio Media Converter avatar

Video & Audio Media Converter

Pricing

Pay per usage

Go to Apify Store
Video & Audio Media Converter

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

Jamshaid Arif

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

3 days ago

Last modified

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

#ToolDescription
1MP4 → MP3Extract audio track from MP4 video
2MKV → MP4Remux (fast copy) or re-encode MKV to MP4
3Video → GIFCreate animated GIF with palette optimization
4Audio BitrateRe-encode audio at different bitrate / format
5YouTube → MP3Download YouTube audio via yt-dlp

⚡ Quick Start

Via Apify Console

  1. Go to the Actor page on Apify
  2. Select a Tool from the dropdown
  3. Paste the Input File URL (direct link to your media file)
  4. Tweak options (bitrate, FPS, format, etc.)
  5. 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

ParameterTypeDefaultDescription
toolenummp4_to_mp3Which converter to use
input_file_urlstringDirect URL to the media file
youtube_urlstringYouTube URL (tool 5 only)
audio_bitrateenum192kTarget bitrate: 64k–320k
audio_output_formatenummp3Output format: mp3, aac, ogg, flac
mkv_codec_modeenumcopyCopy (fast) or re-encode (H.264)
encoding_presetenummediumFFmpeg preset for re-encoding
gif_fpsint15GIF frame rate
gif_widthint480GIF width in pixels
gif_start_timefloat0Start time in seconds
gif_durationfloat5GIF 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.