🎬 Pro Mobile Video Editor

Optimized for YouTube Shorts • 9:16 • Mobile Friendly
Engine not loaded yet.

📱 Mobile Format

✂️ Trim Clip

🛡️ Branding & Export

isProcessing = false; } } /* ----------------------------- 9:16 SHORTS ----------------------------- */ async function formatShorts(){ await runFFmpeg( [ "-i", "input.mp4", "-vf", "scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920", "-c:v", "libx264", "-preset", "veryfast", "-crf", "23", "-c:a", "aac", "-b:a", "128k", "-movflags", "+faststart", "shorts.mp4" ], "shorts.mp4", "9:16 Shorts video तैयार है!" ); } /* ----------------------------- TRIM ----------------------------- */ async function trimVideo(){ const start = parseFloat( document.getElementById( "startTime" ).value ); const end = parseFloat( document.getElementById( "endTime" ).value ); if( isNaN(start) || isNaN(end) || start < 0 || end <= start ){ alert( "Start और End time सही डालें." ); return; } await runFFmpeg( [ "-ss", String(start), "-i", "input.mp4", "-t", String(end - start), "-c:v", "libx264", "-preset", "veryfast", "-crf", "23", "-c:a", "aac", "-b:a", "128k", "-movflags", "+faststart", "trimmed.mp4" ], "trimmed.mp4", "Trim complete!" ); } /* ----------------------------- REVERSE ----------------------------- */ async function reverseVideo(){ await runFFmpeg( [ "-i", "input.mp4", "-vf", "reverse", "-af", "areverse", "-c:v", "libx264", "-preset", "veryfast", "-crf", "25", "-c:a", "aac", "-b:a", "128k", "reversed.mp4" ], "reversed.mp4", "Reverse video तैयार है!" ); } /* ----------------------------- COMPRESS ----------------------------- */ async function compressVideo(){ await runFFmpeg( [ "-i", "input.mp4", "-c:v", "libx264", "-preset", "veryfast", "-crf", "28", "-c:a", "aac", "-b:a", "96k", "-movflags", "+faststart", "compressed.mp4" ], "compressed.mp4", "Compression complete!" ); } /* ----------------------------- WATERMARK ----------------------------- */ async function addLogo(){ if(!ffmpeg){ alert( "पहले Processing Engine load करें." ); return; } const logoFile = document.getElementById( "logoUploader" ).files[0]; if(!logoFile){ alert( "पहले logo upload करें." ); return; } if(!currentVideoURL){ alert( "पहले video upload करें." ); return; } if(isProcessing){ alert( "Processing चल रही है." ); return; } isProcessing = true; try{ updateStatus( "Uploading watermark..." ); const logoBuffer = new Uint8Array( await logoFile.arrayBuffer() ); await ffmpeg.writeFile( "logo.png", logoBuffer ); const videoData = await getCurrentVideoData(); await ffmpeg.writeFile( "input.mp4", videoData ); updateStatus( "Adding watermark..." ); await ffmpeg.exec([ "-i", "input.mp4", "-i", "logo.png", "-filter_complex", "[1:v]scale=160:-1[logo];[0:v][logo]overlay=20:20", "-c:v", "libx264", "-preset", "veryfast", "-crf", "23", "-c:a", "aac", "-b:a", "128k", "-movflags", "+faststart", "watermarked.mp4" ]); const output = await ffmpeg.readFile( "watermarked.mp4" ); const blob = new Blob( [output.buffer], {type:"video/mp4"} ); if(currentVideoURL){ URL.revokeObjectURL( currentVideoURL ); } currentVideoURL = URL.createObjectURL(blob); document.getElementById( "videoPreview" ).src = currentVideoURL; updateStatus( "✅ Watermark added!" ); }catch(error){ console.error(error); updateStatus( "❌ Watermark failed: " + error.message ); alert( "Watermark add नहीं हो पाया.\n\n" + error.message ); }finally{ isProcessing = false; } } /* ----------------------------- DOWNLOAD ----------------------------- */ function downloadVideo(){ if(!currentVideoURL){ alert( "Download करने के लिए पहले video upload/process करें." ); return; } const link = document.createElement("a"); link.href = currentVideoURL; link.download = "Edited_Video.mp4"; document.body.appendChild( link ); link.click(); document.body.removeChild( link ); updateStatus( "✅ Download started." ); }

📱 Mobile Format

✂️ Trim Clip

🛡️ Branding & Export