Please bookmark this page to avoid losing your image tool!

Video And Audio Metadata Text Extractor 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.
async function processImage(originalImg, language = 'eng') {
    const container = document.createElement('div');
    container.style.width = '100%';
    container.style.minHeight = '120px';
    container.style.padding = '20px';
    container.style.fontFamily = '"Courier New", Courier, monospace';
    container.style.fontSize = '14px';
    container.style.backgroundColor = '#f9f9f9';
    container.style.border = '1px solid #ccc';
    container.style.borderRadius = '5px';
    container.style.whiteSpace = 'pre-wrap';
    container.style.wordBreak = 'break-word';
    container.style.color = '#333';
    container.style.boxSizing = 'border-box';
    container.innerText = 'Loading OCR Engine...\nPlease wait.';

    const canvas = document.createElement('canvas');
    canvas.width = originalImg.width;
    canvas.height = originalImg.height;
    const ctx = canvas.getContext('2d');
    ctx.drawImage(originalImg, 0, 0);

    const startOCR = async () => {
        try {
            if (typeof Tesseract === 'undefined') {
                await new Promise((resolve, reject) => {
                    const script = document.createElement('script');
                    script.src = 'https://cdn.jsdelivr.net/npm/tesseract.js@4.1.1/dist/tesseract.min.js';
                    script.onload = resolve;
                    script.onerror = () => reject(new Error('Failed to load Tesseract.js script.'));
                    document.head.appendChild(script);
                });
            }

            const result = await Tesseract.recognize(canvas, language, {
                logger: m => {
                    if (m.status === 'recognizing text') {
                        container.innerText = `Recognizing text... ${Math.round(m.progress * 100)}%`;
                    } else {
                        // Capitalize first letter of status for prettier logging
                        const statusText = m.status.charAt(0).toUpperCase() + m.status.slice(1);
                        container.innerText = `${statusText}...`;
                    }
                }
            });

            const text = result.data.text.trim();
            if (text) {
                // Sanitize and display extracted text
                const escapedText = text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
                container.innerHTML = `<strong style="color: #0056b3;">Extracted Metadata Text:</strong><br><br>${escapedText}`;
            } else {
                container.innerHTML = '<strong>Result:</strong><br>No readable text could be extracted from this image.';
            }
        } catch (error) {
            container.innerHTML = `<strong style="color: red;">Error during text extraction:</strong><br>${error.message}`;
        }
    };

    // Initialize extraction process asynchronously
    startOCR();

    return container;
}

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 extract text from images of video or audio metadata displays using Optical Character Recognition (OCR) technology. It is useful for capturing technical details, file properties, or descriptive text from screenshots of media players, editing software, or file information windows, making it easy to copy and paste information for documentation or troubleshooting.

Leave a Reply

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