An 11-minute 1080p explainer with English narration. It covers the Prophet's (ص) advice to Imam Ali (ع) in Tuḥaf al-ʿUqūl by Ibn Shuʿba al-Ḥarrānī, printed pages 13–16. The section starts with "ما روي عن النبي (ص) في طوال هذه المعاني — وصيته لأمير المؤمنين (ع)" and ends just before "وصية أخرى … مختصرة".
The video teaches the passage in Justin Sung's layered style. It does not read the sayings as a list:
- Big picture: the first saying is the thesis. Ease and joy come from certainty and contentment.
- Concepts: the sayings are arranged as a tree: - Root: certainty and intellect. - Trunk: awareness of God, "كأنك تراه" (as if you see Him). - Branches: the self, the tongue, and people. - Fruit: contentment.
- Details: each saying is placed on one part of the tree, and the links between parts are pointed out. The video ends with a self-test.
Files
output/wasiyya-ali-explainer.mp4: the final video (1920×1080, H.264/AAC, 11:14).output/wasiyya-ali-explainer.srt: English subtitles at sentence level.output/concept-map.png: the final concept-map slide.src/scenes.py: narration script, slide content, and English translations.src/build.py: renders the slides, generates the voice, and assembles the video.src/style.css: slide styling.../../transcripts/tuhaf-al-uqul-p13-16-wasiyya-ali.txt: the corrected Arabic transcription.
How the text was produced
The source PDF is an image-only scan from alfeker.net, with no text layer. Tesseract's Arabic OCR got about 95% of the words right, but it dropped whole lines and garbled the honorific symbols. The transcription was therefore checked line by line against 300-dpi page renders and corrected by hand.
Rebuild
You need ffmpeg, uv, a Chromium binary, and network access (the voice comes from Microsoft Edge TTS). You also need these fonts installed: Amiri, Noto Naskh Arabic, Inter, and Caveat (all from Google Fonts).
cd videos/wasiyya-ali/src
CHROME=/path/to/chrome OUT_DIR=/tmp/wasiyya-build \
uv run --with playwright --with edge-tts python build.py all # final.mp4 + final.srt in OUT_DIR
uv run --with playwright python build.py frames # slides only, for checking layout
Caveats
- The English translations are the author's own. Have someone qualified review them before publishing, especially the saying about the three cases where lying is permitted.
- The AI voice (
en-US-AndrewNeural) anglicizes Arabic names. For example, "Tuhaf al-Uqool" sounds close to "al-a-cool". - The audio has no Arabic recitation. The Arabic appears only on screen.