Skip to content

Mptestsrc

Video Single output Source

Generate various test pattern.

FFmpeg filter: mptestsrc — the official reference.

Generate a stream. Mptestsrc is a source — it has no input, so you create a stream from it rather than applying it to one:

$video = \FFmpeg\VideoStream::generate(new Mptestsrc());

apply() and addFilter() do not apply to source filters (there is nothing to attach them to).

TODO — when this filter shines: what it’s the right tool for, what to reach for instead when it isn’t, and how it composes with neighbouring filters.

TODO — prose: how the filter actually works and what its key parameters mean (the explanation FFmpeg’s terse option help omits).

TODO — runnable PHP, with the equivalent ffmpeg CLI alongside.

TODO

TODO

ParameterTypeDefaultRange / valuesDescription
ratestring25set video rate
durationint-1-1set video duration
testMptestsrcTestalldc_luma, dc_chroma, freq_luma, freq_chroma, amp_luma, amp_chroma, cbp, mv, …set test to perform
max_framesint301Set the maximum number of frames generated for each test

FFmpeg also names these options (use the parameter shown above): rrate, dduration, ttest, mmax_frames.


Maps to FFmpeg’s mptestsrc filter. Verified against ffmpeg n7.1.1.

An Artisan Build project.

Built on FFmpeg — an independent binding, not affiliated with or endorsed by the FFmpeg project. Support FFmpeg.