Add music to video
Put your song under your clip, cut to fit and faded out at the end. Nothing is uploaded.
Free tools from Life2Film, the iPhone app that edits your day into a film by itself.
Your file is read and re-encoded by your own browser. No request carries it anywhere — this page has no upload endpoint to send it to.
Questions
Does it keep the original sound of the video?
No: the music replaces it. To keep only the video's own sound, there is nothing to do; to remove it without adding music, use the remove-audio tool on this site.
What if the song is shorter than the video?
The music plays once and the rest of the video is silent; the tool tells you where it ran out. Start the song earlier, or pick a longer one.
Can it cut the video to the beat of the song?
Not this page: it lays the song under one clip as it is. Cutting several clips to the beat is what the Life2Film iPhone app does: it picks the best moments from your clips and places the cuts on the beats.
Is anything uploaded?
No. Your browser reads both files and writes the result itself; nothing leaves your device.
Let your agent add music to video: connect Life2Film's MCP (52 video tools, guides and skills)
claude mcp add --transport http life2film https://life2film.com/mcpPrompt, skill
Paste to your agent:
Use Life2Film's add-music-to-video on my file: call get_tool("add-music-to-video") on the life2film MCP, then do it.Claude.ai / ChatGPT connector: https://life2film.com/mcp · Cursor: {"mcpServers":{"life2film":{"url":"https://life2film.com/mcp"}}}
get_tool("add-music-to-video") · Skill file: /tools/add-music-to-video/skill.md · all skills
The other tools
Build this into your own project
Laying music under a video, locally — the same way this page does it, on the user's machine, with no server. Take the code, or hand the prompt to a coding agent.
import { Input, Output, BlobSource, BufferTarget, Mp4OutputFormat, ALL_FORMATS,
EncodedPacketSink, EncodedVideoPacketSource, AudioBufferSink, AudioBufferSource } from 'mediabunny';
const v = await new Input({ source: new BlobSource(video), formats: ALL_FORMATS }).getPrimaryVideoTrack();
const a = await new Input({ source: new BlobSource(music), formats: ALL_FORMATS }).getPrimaryAudioTrack();
const out = new Output({ format: new Mp4OutputFormat(), target: new BufferTarget() });
const vs = new EncodedVideoPacketSource(v.codec); out.addVideoTrack(vs);
const as = new AudioBufferSource({ codec: 'aac', bitrate: 192e3 }); out.addAudioTrack(as);
await out.start();
let first = true;
for await (const p of new EncodedPacketSink(v).packets()) { await vs.add(p, first ? { decoderConfig: await v.getDecoderConfig() } : undefined); first = false; }
for await (const { buffer } of new AudioBufferSink(a).buffers(0, await v.computeDuration())) await as.add(buffer);
vs.close(); as.close(); await out.finalize(); Add "add music to a video" to my project, running entirely in the browser.
Requirements:
- Use "mediabunny". Copy the video packets as they are (EncodedPacketSink -> EncodedVideoPacketSource,
decoderConfig on the first packet); never re-encode the picture.
- Decode the music with AudioBufferSink from a chosen offset, cut it at the video's length, apply a
linear fade-out over the last seconds, and encode with AudioBufferSource (AAC in MP4).
- Pick the audio codec with getFirstEncodableAudioCodec for the container; say so when none exists.
- When the music is shorter than the video, say where it ran out.
Reference implementation: https://life2film.com/tools/add-music-to-video/
The engine is documented for agents, and every tool page is available as
markdown by adding .md to its address.