Why ffmpeg?
The paid tools are built on the same building blocks. Our own pipeline cuts, crops to 9:16 and burns in subtitles with ffmpeg without a browser, and on a Mac it uses VideoToolbox so the graphics chip does the work. That is what you do here, on a smaller scale. If you want buttons, see the tools. If you can run a command in a terminal, you save the subscription.
We tested with ffmpeg 9.0, which must be built with libass (check ffmpeg -buildconf), and whisper.cpp v1.9.6.
1. Danish subtitles with whisper.cpp
whisper.cpp is a local version of OpenAI’s Whisper under the MIT licence. We use the large-v3-turbo model in its compressed form because in our test it made 5.2 % word errors in Danish against 13.8 % for the small model.
# Build whisper.cpp and download the large compressed model (about 575 MB)
git clone https://github.com/ggml-org/whisper.cpp.git
cd whisper.cpp
cmake -B build
cmake --build build -j --config Release
sh ./models/download-ggml-model.sh large-v3-turbo-q5_0
cd ..
# Extract the audio as 16 kHz mono WAV, which whisper.cpp expects
ffmpeg -i recording.mp4 -vn -ac 1 -ar 16000 -c:a pcm_s16le audio.wav
# Danish subtitles as subs.srt, at most 42 characters per line
whisper.cpp/build/bin/whisper-cli \
-m whisper.cpp/models/ggml-large-v3-turbo-q5_0.bin \
-l da --max-len 42 --split-on-word \
--prompt "Tømrer i Rødovre. Køkkenvindue, fuger." \
-osrt -of subs -f audio.wav
Put your own names and trade words in --prompt. It halved the errors in our test. But read subs.srt: in one run the model wrote a place name from the prompt where a different one was said.
2. From 16:9 to 9:16 with burned-in captions and proper loudness
One command crops the centre of a horizontal video to vertical, scales to 1080 × 1920, burns in the subtitles and normalises audio to -14 LUFS, a common target for social media.
ffmpeg -i recording.mp4 \
-vf "crop=trunc(ih*9/16/2)*2:ih,scale=1080:1920,setsar=1,subtitles=subs.srt:force_style='FontName=Arial,FontSize=13,Bold=1,Outline=2,Alignment=2,MarginV=110'" \
-af "loudnorm=I=-14:TP=-1.5:LRA=11" -ar 48000 \
-c:v libx264 -preset medium -crf 20 -pix_fmt yuv420p \
-c:a aac -b:a 160k -movflags +faststart \
reel_da.mp4
Our test result: 1080 × 1920, loudness -13.9 LUFS, true peak -1.5 dBFS, and æ, ø and å rendered correctly. 20 seconds took about 4 seconds to render.
Two mistakes we hit ourselves:
- Non-square pixels. The widely copied
crop=ih*9/16:ihgives a width of 607.5 pixels, and the video got a non-square pixel ratio. The fix istrunc(...)to an even number plussetsar=1. - Text under the buttons. With
MarginV=60the captions sat in the band where Reels and TikTok show buttons and the post text.MarginV=110put them about 60 % down the frame.
On a Mac you can swap -c:v libx264 -preset medium -crf 20 for -c:v h264_videotoolbox -b:v 6M to save time. That worked in the test too.
3. Cut short clips from a list
Write the clips you want in a text file with start, end and name, for example 00:00:00.0;00:00:06.5;hook-window. The script makes one clip per line. We re-encode instead of stream-copying, because a copy can only cut on keyframes, and the clip then starts in the wrong place.
#!/usr/bin/env bash
# Usage: ./clips.sh reel_da.mp4 clips.txt (lines: start;end;name)
set -euo pipefail
src="$1"; list="$2"
mkdir -p clips
while IFS=';' read -r start end name; do
[ -z "$start" ] && continue
ffmpeg -nostdin -hide_banner -loglevel error -y -ss "$start" -to "$end" -i "$src" \
-c:v libx264 -crf 20 -preset medium -c:a aac -b:a 160k -movflags +faststart \
"clips/${name}.mp4"
echo "clips/${name}.mp4"
done < "$list"
-nostdin matters: without it ffmpeg reads the rest of the list as keystrokes, and the loop stops after the first clip.
4. Check loudness before you publish
ffmpeg -hide_banner -nostats -i reel_da.mp4 -af ebur128=peak=true:framelog=quiet -f null - 2>&1 | grep -E "^ +(I|Peak):"
Look at the I: (integrated loudness) and Peak: lines. In our own ad QA we measure loudness, true peak, silence, audio/video sync and speech recognition on two models. For a small business the first two lines are enough.
Going further
Several languages in one video – as selectable tracks or burned in per language – are covered on the translated subtitles page.
To make clips automatically, the next step is what we built: word-level timestamps from Whisper, a language model that picks the best moments, and captions where the current word lights up. For pauses there is the open-source tool auto-editor, which we also looked at. Download tools only from the project’s own page: we have seen fake GitHub projects with malware posing as video tools.
Sources
- whisper.cpp on GitHub — MIT, build guide and models, checked 19.11.2026
- FFmpeg – filters documentation — crop, scale, setsar, subtitles, loudnorm, ebur128, checked 19.11.2026
Questions about the ffmpeg recipes
Does this work on Windows?
Yes. ffmpeg and whisper.cpp exist for Windows. The clip script is bash, so run it in WSL or Git Bash.
Why -14 LUFS?
It is a common target for music and video online. Platforms adjust volume themselves, but staying close means your video won’t sound quieter than the rest of the feed.
Can we keep subtitles as a separate file instead?
Yes. YouTube takes an .srt file directly. For Reels and TikTok, burned-in captions are the safe choice.
How long does it take on an ordinary computer?
In our test, 20 seconds of video took about 4 seconds to render and about 1.5 seconds to subtitle on a Mac mini.
Fixed price, no commitment
Get a fixed price for your video task
Tell us briefly what you use today and what you want to achieve. A person answers by e-mail with a proposal and a fixed price before any work starts.
- A fixed price before we start
- An answer by e-mail, no calls
- Your details are used only to answer you