Abd Alftah Salem
Hire me
←All case studies

Case study · Open source

Trteel

A browser-based studio for creating social-ready Quran recitation videos: pick a reciter and ayahs, style the frame, and export an MP4 encoded right in the browser.

01Problem

Recitation clips take a video editor and an afternoon

Creators who share Quran recitations on Instagram, TikTok, YouTube and WhatsApp Status need the right audio, synced ayah text, translations, the right aspect ratio and an MP4 those apps accept. Trteel turns that into a guided flow in the browser.

02My role

Creator and maintainer

I built the app — UI, playback logic, rendering and the export pipeline — and maintain it; v0.2.0 (Oct 2026) was a hardening and cleanup release.

03How it works

Frames on a canvas, encoded in the browser

The browser draws every frame on a canvas from the selected ayahs and settings, mixes the audio with optional effects, encodes H.264/AAC with WebCodecs and packs an MP4 with mp4-muxer. For the Instagram, TikTok and WhatsApp presets the file is re-encoded server-side with FFmpeg (H.264 Main 4.0, yuv420p, faststart) so those apps accept it; if that step fails, the browser keeps its own MP4.

Export pipeline

Export pipelineEditor (React 19)ayahs · style · audioCanvas rendererframe by frameAudio mixreverb · echoWebCodecs + mp4-muxerH.264 / AAC in the browser/api/instagram-fixFFmpeg re-encodeDownload MP4ready to post

04Key technical decisions

The choices that shaped it

Encode on the client

Rendering and encoding run in the user's browser with WebCodecs, so the server never renders video and export cost doesn't grow with users.

Server only for compatibility

The server step exists only to make files that social apps accept, and it is optional: on failure or timeout the browser's MP4 is still delivered.

Presets over settings

Story, Post, TikTok, YouTube and WhatsApp presets plus a Simple mode give a clean default path, with Advanced mode for full control.

05Hard parts solved

What made it more than a script

Hardening the FFmpeg routes

FFmpeg now runs through execFile with argument lists — no shell — and fps / bitrate are validated, returning 400 on bad values.

Arabic file names, safely

Download headers are built safely, so Arabic file names work and header injection is not possible.

1080p that social apps accept

Exports moved from H.264 level 3.0 to 4.0, which 1080p video needs.

Dependencies and lint, clean

An upgrade to Next.js 16.4.3 took npm audit from 7 findings to 0, and lint from 48 errors to 0.

06Outcome

A creator tool that runs in a browser tab

Trteel is deployed on Vercel. v0.2.0 passes lint, type-check and production build in CI, and the export routes were tested with the real FFmpeg, including Arabic file names.

5export presets
4aspect ratios
3translation languages

v0.2.0 hardening: before → after

npm audit findings (before)7
npm audit findings (after)0
Lint errors (before)48
Lint errors (after)0

Measured on the 0.1.0 code and on the 0.2.0 release branch.

Commits per month · 49 total

17293
Mar 26Oct 26

Source: git history of the main branch (Oct 31, 2026).

07Stack & links

Built with

© 2026 Abd Alftah Salem · Back to portfolio