Please bookmark this page to avoid losing your image tool!

Video Platform Audio Track And Text Language Translator Tool

(Free & Supports Bulk Upload)

Drag & drop your images here or

The result will appear here...
You can edit the below JavaScript code to customize the image tool.
function processImage(originalImg, subtitles = "[es] Hola, bienvenidos al vídeo", audioTrack = "Dub: EN -> ES (HIFI)", style = "VHSRip") {
    const canvas = document.createElement('canvas');
    const width = originalImg.width;
    const height = originalImg.height;
    canvas.width = width;
    canvas.height = height;
    const ctx = canvas.getContext('2d');

    // Draw original image
    ctx.drawImage(originalImg, 0, 0, width, height);

    // Apply visual effects based on the style (e.g. VHS / DVD Rip simulation)
    if (style.toLowerCase() === 'vhsrip') {
        const scanlineHeight = Math.max(3, height * 0.005);
        ctx.fillStyle = 'rgba(0, 0, 0, 0.15)';
        for (let y = 0; y < height; y += scanlineHeight) {
            ctx.fillRect(0, y, width, Math.max(1, height * 0.002));
        }
        // Minimal VHS Color bleeding (simulated via transparency and a slight pixel shift)
        ctx.globalAlpha = 0.25;
        ctx.globalCompositeOperation = 'screen';
        ctx.drawImage(canvas, Math.max(2, width * 0.005), 0);
        ctx.globalCompositeOperation = 'source-over';
        ctx.globalAlpha = 1.0;
    }

    // Set up global text shadow
    ctx.shadowColor = 'rgba(0,0,0,0.9)';
    ctx.shadowBlur = Math.max(3, width * 0.005);
    ctx.shadowOffsetX = Math.max(2, width * 0.002);
    ctx.shadowOffsetY = Math.max(2, width * 0.002);

    // 1. Draw Top-Left Video Player UI elements (Play Button & Timecode)
    const uiFontSize = Math.max(14, height * 0.035);
    ctx.font = `bold ${uiFontSize}px "Courier New", Courier, monospace`;
    ctx.fillStyle = '#00FF00';
    ctx.textAlign = 'left';
    ctx.textBaseline = 'top';
    ctx.fillText("PLAY \u25BA 01:23:45", width * 0.04, height * 0.04);

    // 2. Draw Top-Right Audio Track/Dub Translator Info
    ctx.textAlign = 'right';
    ctx.fillStyle = '#FFFFFF';
    ctx.fillText(`AUDIO: ${audioTrack}`, width * 0.96, height * 0.04);

    // 3. Draw Translated Subtitles at the bottom center
    const subFontSize = Math.max(16, height * 0.06);
    ctx.font = `bold ${subFontSize}px Arial, sans-serif`;
    ctx.textAlign = 'center';
    ctx.textBaseline = 'bottom';
    
    ctx.strokeStyle = '#000000';
    ctx.lineWidth = Math.max(2, subFontSize * 0.15);
    ctx.fillStyle = '#FFFF00'; // Yellow color often used in DVDRip subs
    
    // Auto-wrap subtitle text
    const maxTextWidth = width * 0.85;
    const words = subtitles.split(' ');
    let line = '';
    const lines = [];

    for (let i = 0; i < words.length; i++) {
        const testLine = line + words[i] + ' ';
        const metrics = ctx.measureText(testLine);
        if (metrics.width > maxTextWidth && i > 0) {
            lines.push(line.trim());
            line = words[i] + ' ';
        } else {
            line = testLine;
        }
    }
    lines.push(line.trim());

    // Calculate vertical positioning for multiple lines
    const lineHeight = subFontSize * 1.2;
    let startY = height * 0.92 - (lines.length - 1) * lineHeight;

    // Draw each line of subtitle text
    for (let i = 0; i < lines.length; i++) {
        const currentY = startY + i * lineHeight;
        ctx.strokeText(lines[i], width / 2, currentY);
        ctx.fillText(lines[i], width / 2, currentY);
    }

    return canvas;
}

Free Image Tool Creator

Can't find the image tool you're looking for?
Create one based on your own needs now!

Description

This tool allows users to overlay video-style interface elements onto an image, simulating a video player interface. It can add custom subtitles with text wrapping, display audio track information, and include a playback timecode. Additionally, the tool features a style setting to apply visual filters, such as a VHS scanline effect, to give images a retro aesthetic. It is useful for content creators looking to create realistic video thumbnails, social media mockups, or stylized retro-themed graphics.

Leave a Reply

Your email address will not be published. Required fields are marked *