Programmatic video production demands an engine that is fast, reliable, and scalable. Rather than loading heavy graphical interfaces, ContentPulse compiles video overlays, subtitles, voiceovers, and transitions directly from script files. Here is how we built our high-performance hardware-accelerated video engine using FFmpeg and Python.
Programmatic Layouts with FFmpeg Filtergraphs
Our renderer structures scripts into visual layers. We generate dynamic background imagery (pan and zoom effects), overlay automated subtitles with word-by-word highlight colors, and mix text-to-speech voiceovers with low-volume background tracks. To do this, we use the FFmpeg filtergraph model.
We execute commands with filters like overlay, drawtext, and scale. For instance, to highlight subtitles in real-time, we calculate word timings from our TTS timestamps and generate synchronized SRT overlays that are burned into the video canvas.
Enabling Apple Silicon Hardware Acceleration
Because we compile these videos locally on macOS workstations, we leverage Apple Silicon hardware encoding. Standard H.264 rendering is slow when processed on the CPU. By using the h264_videotoolbox video encoder rather than standard libx264, we offload compilation to the Mac hardware media engine:
ffmpeg -i input.txt -c:v h264_videotoolbox -b:v 6000k -profile:v high output.mp4
This accelerates render time from 3x the video duration down to 0.2x—compiling a 60-second short in less than 12 seconds.
Bridging Video to the Brochure Website
Once compiled, the video metadata is exported. The final render is pushed to social channels, and the metadata, thumbnail, and transcript are uploaded to this website. The webpage is formatted with clean Schema markup, allowing Google Bot to index the post as a video rich result, generating search traffic without additional social spend.