Overview

Migrating from local FFprobe, MediaInfo, or other media analysis tools to Probe.dev is straightforward. Our API maintains compatibility with existing tool parameters while providing cloud-scale reliability and enhanced features.

Why Migrate?

Scalability

No Infrastructure Management
Process thousands of files without server provisioning

Auto-scaling
Handles traffic spikes automatically

Reliability

99.9% Uptime
Redundant infrastructure across multiple regions

Error Handling
Robust retry mechanisms and failure recovery

Enhanced Features

ML-Enhanced Analysis
Probe Report with trained heuristics

Multiple Tool Support
FFprobe, MediaInfo, and custom analysis in one call

Cost Efficiency

Pay Per Use
No idle server costs

Reduced Maintenance
No software updates or security patches

Migration Examples

FFprobe Migration

Before (Local FFprobe):

// Local execution
exec(
    'ffprobe -i ' . escapeshellarg($url) .
    " -print_format json -probesize $probesize" .
    " -analyzeduration $analyzeduration -max_probe_packets $max_probe_packets" .
    ' -show_format -show_streams',
    $output
);

After (Probe.dev API):

// Equivalent call through the Probe API
$token = getenv('PROBE_API_TOKEN');

$query = http_build_query([
    'token'                      => $token,
    'url'                        => $url,
    'only'                       => 'ffprobe',
    'ffprobe[output_format]'     => 'json',
    'ffprobe[probesize]'         => $probesize,
    'ffprobe[analyzeduration]'   => $analyzeduration,
    'ffprobe[max_probe_packets]' => $max_probe_packets,
    'ffprobe[show_format]'       => 'true',
    'ffprobe[show_streams]'      => 'true',
]);

$response = file_get_contents("https://api.probe.dev/v1/probe/file?$query");
$output   = json_decode($response, true);

That’s it—you’ve migrated the command to a secure HTTPS call while preserving every original ffprobe flag.

MediaInfo Migration

Before (Local MediaInfo):

mediainfo --Output=JSON /path/to/video.mp4

After (Probe.dev API):

curl -G https://api.probe.dev/v1/probe/file \
  --data-urlencode "token=${PROBE_API_TOKEN}" \
  --data-urlencode "only=mediainfo" \
  --data-urlencode "url=https://example.com/video.mp4"

Python Migration

Before (Local subprocess):

import subprocess
import json

def analyze_media(file_path):
    cmd = [
        'ffprobe', '-v', 'quiet', '-print_format', 'json',
        '-show_format', '-show_streams', file_path
    ]
    result = subprocess.run(cmd, capture_output=True, text=True)
    return json.loads(result.stdout)

After (Probe.dev API):

import requests
import os

def analyze_media(file_url):
    params = {
        'token': os.getenv('PROBE_API_TOKEN'),
        'url': file_url,
        'only': 'ffprobe',
        'ffprobe[output_format]': 'json',
        'ffprobe[show_format]': 'true',
        'ffprobe[show_streams]': 'true'
    }
    
    response = requests.get('https://api.probe.dev/v1/probe/file', params=params)
    return response.json()

Node.js Migration

Before (Local execution):

const { exec } = require('child_process');

function analyzeMedia(filePath) {
    return new Promise((resolve, reject) => {
        exec(`ffprobe -v quiet -print_format json -show_format -show_streams "${filePath}"`, 
             (error, stdout, stderr) => {
            if (error) reject(error);
            else resolve(JSON.parse(stdout));
        });
    });
}

After (Probe.dev API):

const axios = require('axios');

async function analyzeMedia(fileUrl) {
    const params = new URLSearchParams({
        'token': process.env.PROBE_API_TOKEN,
        'url': fileUrl,
        'only': 'ffprobe',
        'ffprobe[output_format]': 'json',
        'ffprobe[show_format]': 'true',
        'ffprobe[show_streams]': 'true'
    });
    
    const response = await axios.get(`https://api.probe.dev/v1/probe/file?${params}`);
    return response.data;
}

Parameter Mapping

FFprobe Parameters

Most FFprobe parameters are supported with the same names in snake_case:

Local FFprobeProbe.dev APIDescription
-print_format jsonffprobe[output_format]=jsonOutput format
-show_formatffprobe[show_format]=trueShow container info
-show_streamsffprobe[show_streams]=trueShow stream info
-probesize 1000000ffprobe[probesize]=1000000Probe buffer size
-analyzeduration 5000000ffprobe[analyzeduration]=5000000Analysis duration

MediaInfo Parameters

Local MediaInfoProbe.dev APIDescription
--Output=JSONmediainfo[output]=JSONOutput format
--Fullmediainfo[full]=trueComplete information
--Language=rawmediainfo[language]=rawLanguage setting

Migration Checklist

Common Migration Patterns

Batch Processing

Before:

for file in /media/*.mp4; do
    ffprobe -v quiet -print_format json -show_format "$file" > "$(basename "$file").json"
done

After:

for url in "${media_urls[@]}"; do
    curl -G https://api.probe.dev/v1/probe/file \
        --data-urlencode "token=${PROBE_API_TOKEN}" \
        --data-urlencode "only=ffprobe" \
        --data-urlencode "url=$url" \
        > "$(basename "$url").json"
done

Webhook Integration

Replace local processing with webhook callbacks:

# Send analysis request
response = requests.post('https://api.probe.dev/v1/probe/file', json={
    'url': file_url,
    'webhook_url': 'https://myapp.com/webhook',
    'ffprobe': {'enabled': True},
    'mediainfo': {'enabled': True}
})

# Handle results in webhook endpoint
@app.route('/webhook', methods=['POST'])
def handle_analysis_complete():
    data = request.json
    # Process analysis results
    return 'OK'

Performance Considerations

Optimization Tips

  1. Use only parameter for single-tool analysis
  2. Enable inject_json to combine multiple tool outputs
  3. Batch similar requests to reduce overhead
  4. Cache results for frequently analyzed files
  5. Use webhooks for long-running analysis

Expected Performance

Analysis TypeTypical Response TimeNotes
FFprobe only2-5 secondsFast technical analysis
MediaInfo only2-4 secondsQuick format detection
Probe Report5-10 secondsML-enhanced processing
All tools8-15 secondsComprehensive analysis

Support & Resources

Need help with your migration? Contact our support team at support@probe.dev for personalized assistance.