إضافة موسيقى إلى الفيديو
ضع أغنيتك تحت المقطع، مقصوصة على طوله ومتلاشية في النهاية. لا شيء يُرفع.
أدوات مجانية من Life2Film، تطبيق iPhone الذي يحوّل يومك إلى فيلم بنفسه.
متصفحك هو الذي يقرأ الملف ويعيد ترميزه. لا يُرسَل في أي طلب إلى أي مكان — فهذه الصفحة لا تملك خادمًا يُرفع إليه.
أسئلة
هل يبقى صوت الفيديو الأصلي؟
لا: تحل الموسيقى محله.
ماذا لو كانت الأغنية أقصر من الفيديو؟
تُعزف الموسيقى مرة واحدة ويبقى باقي الفيديو صامتًا، وتخبرك الأداة أين انتهت.
هل يمكن قص الفيديو على إيقاع الأغنية؟
ليس في هذه الصفحة: فهي تضع الأغنية تحت مقطع واحد كما هو. قص عدة مقاطع على الإيقاع يقوم به تطبيق Life2Film للآيفون.
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
الأدوات الأخرى
أضف هذا إلى مشروعك
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.