text filter

The FFmpeg drawtext filter

Burns text into video, with control over font, size, colour and position.

3 of 3 variants measured Measured 2026-08-20

The part that catches people

drawtext argument parsing is the single most escaped thing in FFmpeg. A colon inside your text ends the option, a comma ends the filter, and an apostrophe ends the quoted string. Timestamps and file paths all contain at least one of those, which is why real drawtext commands look like line noise.

Measured, not described

Every row below is a real job. The same 1280x720 five-second H.264 source went through each variant, so the numbers are comparable to each other and to every other filter page on this site. Encode time is the FFmpeg step on its own, separated from the download and the upload.

VariantEncodeOutputCost
Plain caption1550 ms527.5 KB · 1280x720$0.0029
Centred with a box5292 ms534.5 KB · 1280x720$0.0068
Bottom third1258 ms545.4 KB · 1280x720$0.0029

The fastest variant here is not the smallest. Bottom third finished the encode in 1258 ms, while Plain caption produced the smallest file at 527.5 KB. Which one matters depends on whether you are paying for compute or for storage.

The exact commands

Plain caption

job_502e247f81334a5b

The minimum that works.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "drawtext=text='Rendobar':fontsize=48:fontcolor=white:x=40:y=40" -t 5 out.mp4

Centred with a box

job_52e9451816c740cd

text_w and text_h are why centring text needs expressions, not numbers.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "drawtext=text='Rendobar':fontsize=48:fontcolor=white:box=1:[email protected]:boxborderw=12:x=(w-text_w)/2:y=(h-text_h)/2" -t 5 out.mp4

Bottom third

job_f4d0720c3f9b43a1

th is shorthand for text_h. Both spellings work.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "drawtext=text='Rendobar':fontsize=36:fontcolor=white:x=(w-text_w)/2:y=h-th-60" -t 5 out.mp4

How these numbers were produced

Each variant was submitted to the Rendobar API as an ffmpeg job against the same public source file, and the response was recorded verbatim. Encode time is the API's own per-step timing for the FFmpeg step. Output size is the byte count of the file the job produced. Cost is what the job was actually billed.

Nothing here was estimated, and the whole set is re-runnable, so if a figure looks wrong it can be checked rather than argued about. The 72 variants behind this filter reference cost $0.193082 in total to measure.

Frequently asked questions

What does the FFmpeg drawtext filter do?

Burns text into video, with control over font, size, colour and position.

What is the most common mistake with drawtext?

drawtext argument parsing is the single most escaped thing in FFmpeg. A colon inside your text ends the option, a comma ends the filter, and an apostrophe ends the quoted string. Timestamps and file paths all contain at least one of those, which is why real drawtext commands look like line noise.

How long does drawtext take to run?

On a 1280x720 five-second H.264 source, the fastest variant on this page (Bottom third) spent 1258 ms inside FFmpeg. That figure is the encode step alone, measured separately from the download and the upload, so it is the filter's own cost rather than the round trip.

Do I need FFmpeg installed to use drawtext?

Not with Rendobar. Every command on this page ran through the Rendobar API against a URL, with no local FFmpeg install and no server. The job id next to each row is the real job that produced the numbers.

Run drawtext without installing FFmpeg

Every command on this page ran through the API against a URL. No binary, no server.