Audio Visualizer API

POST /visualize

About this tool

Podcast promos, music drops, and social teasers need motion even when the hero asset is audio-first. `/visualize` pairs `video_url` (often a branded template) with `audio_url` and a `style` selector among `bars`, `wave`, `spectrum`, or `ring`, letting FFmpeg drive filter graphs that react to amplitude data. JSON-only requests with subscription-authenticated keys keep operations uniform: public URLs in, async task metadata out, zero multipart shortcuts.

Template videos should loop cleanly; mismatch between duration and audio length triggers behaviors documented near this anchor: some styles loop, others fade. Loudness normalization before visualization reduces flicker; consider offline limiting if clients send extremely dynamic EDM masters. GPU demand sits between simple cuts and full VC jobs, so plan concurrency carefully before Black Friday campaigns. Treat every render as a billboard test: log template resolution, frame rate, and audio loudness integrated from the API response so creative reviews never argue about which copy shipped.

Unlike browser-based visualizers that drop frames on low-power laptops, cloud FFmpeg renders consistent MP4 outputs ideal for paid ads. Chain `/cut` afterward to shave leader frames or `/merge_urls` to append sponsor bumpers automatically. Designers iterate by tweaking palette JSON hinted in docs while engineers keep automation immutable via version-controlled payloads.

Observability surfaces FFT stage timings when rings or spectra saturate CPU. Tie logs to creative brief IDs so studios know which permutation caused failures. Abuse controls throttle excessive resolutions; another reason tiers matter.

Always HTTPS-fetch both assets; cross-origin intermittent 403 errors waste queue slots and frustrate testers who forget to unblock bots. Advertising ops sometimes steer `/visualize` from spreadsheets with creative IDs, BPM metadata, and template URLs exported from design tools; link task IDs back to spreadsheet rows so traffickers rerun only failures after tweaking stems. Mention subscription burst limits in runbooks so producers know whether to drip batches overnight or spread jobs across tenants.

Try it now

How it works

  1. Host template video and mastered audio

    Upload both files to CDN endpoints reachable anonymously, recording precise URLs for JSON.

  2. Choose `style` enum

    Map creative direction to `bars`, `wave`, `spectrum`, or `ring` exactly as enumerated; typos fail validation immediately.

  3. POST `/visualize` with API key

    Send JSON referencing both URLs. Receive `status_url` pointing to FFmpeg progress monitors.

  4. Poll and publish rendered promo

    Download the energized MP4, validate beat sync by eye, and ship through your ads manager.

Frequently asked questions

What kind of template video should I use?

A short looping MP4 with your branding works well. Match duration to the audio or pick a template that loops cleanly; see docs for how each style handles length mismatches.

Which visualizer style should I pick?

Bars and wave suit podcasts and voice content. Spectrum and ring look better for music with wide frequency range. Preview a few styles before batching promos.

Does stereo audio change the animation?

Filters combine or channelize stereo per the style definition. Check QA on both ears if your master is heavily panned.

Can I visualize audio without a video template?

You need both URLs in the request. Use a simple solid or looping background video if you only care about the motion graphic overlay.

Why does my render flicker on loud sections?

Very dynamic masters can spike the visualizer. Normalize or limit audio before submitting for smoother motion in ads and social clips.

How do I use the Audio Visualizer API?

POST to /visualize with a JSON body containing video_url, audio_url, style and your X-API-Key header. The API returns a task_id; poll GET /task/{task_id} until status is "completed" to retrieve the download_url.

Via the REST API

curl -X POST https://droidapps.one/visualize \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_KEY" \
  -d '{
         "video_url": "https://cdn.example.com/loop.mp4",
         "audio_url": "https://cdn.example.com/track.wav",
         "style": "YOUR_STYLE"
       }'

Via the MCP server (droidapps-ffmpeg)

const job = await mcp.callTool("submit_job", {
  path: "/visualize",
  body: {
    video_url: "https://cdn.example.com/loop.mp4",
    audio_url: "https://cdn.example.com/track.wav",
    style: "YOUR_STYLE"
  }
})
// Returns: { task_id: "abc123", status: "queued" }

const result = await mcp.callTool("wait_for_task", {
  task_id: job.task_id
})
// Returns: { status: "completed", download_url: "https://..." }