API Documentation

Endpoint

GET https://placeholdervideo.dev/{width}x{height}

Sample MP4 URL

Use this stable MP4 fixture when you need a quick test URL for an HTML video tag, Playwright, Cypress, ffprobe, or an FFmpeg smoke test. For the focused landing page, see the sample MP4 URL guide.

https://placeholdervideo.dev/1920x1080

Parameters

NameTypeRangeDescription
widthinteger10–3840 custom; larger known presets allowedVideo width in pixels
heightinteger10–2160 custom; larger known presets allowedVideo height in pixels

Response

Status200 OK
Content-Typevideo/mp4
BodyMP4 video file (H.264 + AAC-LC silent audio)

Headers

HTTP/1.1 200 OK
Content-Type: video/mp4
Cache-Control: public, max-age=86400, immutable
Accept-Ranges: bytes
Access-Control-Allow-Origin: *
X-RateLimit-Limit: 60 standard / 10 heavy per minute
Content-Length: {size}

Errors

StatusCause
400Invalid dimensions (non-integer, negative, below 10px, or out of range)
429Rate limit exceeded
500Generation failed

Examples

cURL

# Download video
curl -o placeholder.mp4 https://placeholdervideo.dev/1920x1080

# Stream to ffprobe
curl -s https://placeholdervideo.dev/1920x1080 | ffprobe -

# HEAD request (check without download)
curl -I https://placeholdervideo.dev/1920x1080

JavaScript Fetch

const response = await fetch('https://placeholdervideo.dev/1920x1080')
const blob = await response.blob()
const url = URL.createObjectURL(blob)

const video = document.createElement('video')
video.src = url
video.controls = true
document.body.appendChild(video)

Python Requests

import requests

response = requests.get('https://placeholdervideo.dev/1920x1080')
with open('placeholder.mp4', 'wb') as f:
    f.write(response.content)

Video Specifications

ContainerMP4
Video CodecH.264 / AVC, Baseline profile, yuv420p
Audio CodecAAC-LC silent stereo, 48 kHz
Frame Rate30 fps
Duration10 seconds
Fast StartFast-start MP4 with moov atom at the front
Approx. 1920×1080 Size250 KB-450 KB
Approx. 1920×1080 Generationabout 1-3 seconds uncached; repeat requests should hit cache

Video Script & Transcript

Use this short script for a product demo video titled “Free sample MP4 URL for HTML video testing.” The transcript is included here so search and AI systems can parse the same explanation as the video.

Suggested Video Script

Title: Free sample MP4 URL for HTML video testing

0:00 - Need a real MP4 URL for a video tag, a browser test, or an FFmpeg smoke test?
0:06 - Open placeholdervideo.dev and use this pattern: /{width}x{height}.
0:12 - For a standard Full HD fixture, copy https://placeholdervideo.dev/1920x1080.
0:18 - Paste it into a normal HTML5 video element with controls and preload="metadata".
0:25 - Add the matching poster URL at /poster/1920x1080 to avoid a blank player before metadata loads.
0:33 - The response is video/mp4, H.264 video, silent AAC-LC audio, byte-range capable, CORS-enabled, and cacheable.
0:44 - For automated tests, use the same URL in Playwright or Cypress and assert videoWidth, videoHeight, and duration.
0:54 - For media pipelines, download it with curl and inspect it with ffprobe before running your FFmpeg transform.
1:03 - Change the dimensions in the URL to test vertical, square, 720p, 1080p, or 4K layouts.
1:11 - Replace the placeholder with real production media before shipping final user-facing content.

Transcript

Need a real MP4 URL for a video tag, a browser test, or an FFmpeg smoke test? Open placeholdervideo.dev and use the simple pattern /width x height. For a standard Full HD fixture, copy https://placeholdervideo.dev/1920x1080. Paste it into a normal HTML5 video element with controls and preload metadata. Add the matching poster URL at /poster/1920x1080 to avoid a blank player before metadata loads. The response is video/mp4 with H.264 video, silent AAC-LC audio, byte-range support, CORS headers, and cache headers. For automated tests, use the same URL in Playwright or Cypress and assert videoWidth, videoHeight, and duration. For media pipelines, download it with curl and inspect it with ffprobe before running your FFmpeg transform. Change the dimensions in the URL to test vertical, square, 720p, 1080p, or 4K layouts. Replace the placeholder with real production media before shipping final user-facing content.

Related Guides