Skip to content

lachlanchen/Video2Book

Repository files navigation

English · العربية · Español · Français · 日本語 · 한국어 · Tiếng Việt · 中文 (简体) · 中文(繁體) · Deutsch · Русский

LazyingArt banner

Video2Book by LazyingArt LLC

Video2Book by LazyingArt LLC. Websites: lazying.art and learn.lazying.art.

LazyingArt Learn

Toolkit Downloader Transcription Notes tmux

Video2Book is a practical pipeline for turning long-form video collections into durable study material: downloaded media, timestamped transcripts, and transcript-derived lecture notes with compiled PDFs.

📚 Flagship Books

These previews use the extracted first page of each published PDF from LazyEarn and LazyLearn.

Wealth from First Principles cover How You Got Rich cover How You Got Successful cover How You Got Happiness cover
Wealth from First Principles
money, ownership, claims, and compounding
How You Got Rich?
a nonlinear wealth book built from interview evidence
How You Got Successful?
Jim Rohn success lectures reordered into a smoother book arc
How You Got Happiness?
Krishnamurti talks shaped into a book on attention, fear, meditation, and freedom

LazyLearn also publishes a multilingual writing book plus a finished justice course book:

How to Speak and Write English cover How to Speak and Write Traditional Chinese cover How to Speak and Write Japanese cover Justice with Michael Sandel cover
How to Speak and Write
reordered English edition
如何說話與寫作
繁體中文版
話し方と書き方
日本語版
Justice with Michael Sandel
Michael Sandel political philosophy course book

leonardsusskind also publishes core Theoretical Minimum physics books:

Quantum Mechanics Theoretical Minimum cover General Relativity Theoretical Minimum cover Statistical Mechanics Theoretical Minimum cover Cosmology Theoretical Minimum cover
Quantum Mechanics
Theoretical Minimum core book
General Relativity
Theoretical Minimum core book
Statistical Mechanics
Theoretical Minimum core book
Cosmology
Theoretical Minimum core book

✨ What It Covers

  • Download a playlist into a stable external media archive.
  • Transcribe videos into .srt subtitles and timestamped Markdown.
  • Convert completed transcript sets into structured TeX notes and merged course PDFs.
  • Convert ordered Markdown material folders into pocket-size TeX/PDF books.
  • Run long jobs in tmux with queue scripts and monitor/guard scripts.
  • Export compact pocket-format companion PDFs from finished course LaTeX.
  • Reuse the same wrapped-header and figure-refresh workflow for both normal full-size PDFs and pocket PDFs across host repos.

🧪 Working Host Repos

Video2Book is already being used in multiple host repos with different archive shapes.

Host repo Focus Wrapper example Current tracked outputs
LazyEarn Yale Financial Markets course with Robert J. Shiller examples/lazyearn/yale-financial-markets/ course PDF, lecture PDFs, markdown transcripts, subtitles
LazyLearn Writing-course adaptation for How You Speak and Write examples/lazylearn/how-you-speak-and-write/, examples/lazylearn/justice-with-michael-sandel/ How You Speak and Write course PDF, Justice with Michael Sandel course PDF, local speaker course PDFs, local justice PDF, lecture PDFs, markdown transcripts, subtitles
leonardsusskind Full Leonard Susskind lecture archive, transcript pipeline, and published note books examples/leonardsusskind/susskind-physics-archive/ published books folder, advanced quantum PDF, topics in string theory PDF, particle physics 3 PDF, markdown transcripts, subtitles

📘 Books And PDFs

The third stage is already producing real book-like outputs in host repos:

  • merged course books such as course.pdf or a host-published canonical name
  • per-lecture PDFs under generated_course_notes/.../chapters/
  • transcript trees in markdown/ and subtitle trees in subtitles/

Other published books and course outputs:

Host repo Title Main PDF Notes
LazyEarn Yale Financial Markets PDF Robert J. Shiller lecture book with full-size and pocket variants
LazyEarn Hard Knocks Interviews PDF direct lecture-by-lecture compilation
LazyEarn High-Growth Dossier PDF legacy research book with pocket exports
LazyEarn Quod Tango Muto PDF Latin-motto research book with pocket exports
LazyLearn How You Speak and Write PDF writing-course adaptation
LazyLearn Justice with Michael Sandel PDF political philosophy course book
leonardsusskind Classical Mechanics (Theoretical Minimum) PDF consolidated book in all_notes/
leonardsusskind Quantum Mechanics (Theoretical Minimum) PDF core TTM book in all_notes/
leonardsusskind Special Relativity (Theoretical Minimum) PDF core TTM book in all_notes/
leonardsusskind General Relativity (Theoretical Minimum) PDF core TTM book in all_notes/
leonardsusskind Statistical Mechanics (Theoretical Minimum) PDF core TTM book in all_notes/
leonardsusskind Cosmology (Theoretical Minimum) PDF core TTM book in all_notes/
leonardsusskind Advanced Quantum Mechanics PDF supplemental physics title
leonardsusskind Topics in String Theory PDF supplemental cosmology / string title

Other Susskind consolidated titles are available in all_notes.

Local Sibling Repo Pointers

If you are running these repos from a shared parent directory (for example /home/lachlan/ProjectsLFS), the same books are also addressable via local paths:

  • ../LazyLearn/justice-with-michael-sandel/justice-with-michael-sandel.pdf
  • ../LazyLearn/how-to-speak-and-write/how-to-speak-and-write.pdf
  • ../LazyEarn/generated_course_notes/lazyearn/yale-financial-markets/course.pdf
  • ../leonardsusskind/<sibling-folder>/... (course and published-book PDFs in that repo)

🧩 Pipeline

Stage Module Purpose
1 playlist2videos/ Download or refresh a playlist with yt-dlp, keep logs, and skip already archived items.
2 videos2subtitles/ Transcribe the archived media into subtitles/ and markdown/.
3 subtitles2notes/ Turn completed transcripts into chapter TeX, lecture PDFs, and merged course PDFs.
4 scripts/process_markdown_material_book.py Turn ordered source Markdown folders into generated pocket-size TeX/PDF books while passing related images to Codex.
5 scripts/start_markdown_material_book_tmux.sh Run the Markdown-material book writer in tmux, with resume-safe one-source-at-a-time processing.
6 scripts/export_course_pocket_pdfs.sh Rebuild finished course.tex outputs into pocket/A5 variants for publishing packages and emit mapped overfull reports.
7 scripts/export_tex_book_pocket_pdf.sh Rebuild one standalone TeX book/article into a pocket-size companion PDF and sync it into the host repo docs tree.
8 subtitles2notes/templates/lecture_notes_common_preamble.tex Shared normal-size course-PDF header/layout source used by generated books.
9 scripts/fix_course_pocket_overfulls.sh Iterate on one course variant: export, report, Codex patch, and re-export until actionable overfulls drop.
10 scripts/fix_latex_project_overfulls.sh Generic LaTeX overflow fixer for any repo/project that can build with pdflatex or a custom compile command.
11 scripts/recheck_course_figures.py Re-audit screenshot-like lecture figures against transcript context and replacement video frames.
12 scripts/export_course_epubs.sh Rebuild finished course.tex outputs directly into EPUB3.

🚀 Quick Start

Clone it directly:

git clone git@github.com:lachlanchen/Video2Book.git
cd Video2Book

Or add it to another repo as a submodule:

git submodule add git@github.com:lachlanchen/Video2Book.git Video2Book
git submodule update --init --recursive

🏗️ Host Repo Layout

Video2Book expects to run from a host repo that stores the working outputs:

  • subtitles/
  • markdown/
  • generated_course_notes/
  • .lecture-notes-work/

The video files themselves are usually kept outside the host repo in a media workspace such as:

  • /home/lachlan/ProjectsLFS/YoutubeDownloader

🛠️ Typical Usage

From the host repo root:

./Video2Book/scripts/download_susskind_playlist.sh
./Video2Book/scripts/start_transcription_tmux.sh
./Video2Book/scripts/start_transcription_monitor_tmux.sh
./Video2Book/scripts/start_course_notes_tmux.sh
./Video2Book/scripts/start_course_notes_monitor_tmux.sh

Dry-run the downloader:

./Video2Book/scripts/download_susskind_playlist.sh --dry-run

Start a note-writing queue for one course:

./Video2Book/scripts/start_course_notes_tmux.sh --course supplementary/advanced_quantum_mechanics/2013_fall

Export compact PDFs for all completed courses (for example in leonardsusskind):

./Video2Book/scripts/export_course_pocket_pdfs.sh --host-root /home/lachlan/ProjectsLFS/leonardsusskind

Export one standalone book in investment_pdfs/ into pocket-size variants:

./Video2Book/scripts/export_tex_book_pocket_pdf.sh \
  --repo-root /home/lachlan/ProjectsLFS/LazyEarn \
  --project-root /home/lachlan/ProjectsLFS/LazyEarn/investment_pdfs/wealth-from-first-principles \
  --main-tex wealth-from-first-principles.tex \
  --font-mode onepointtwo \
  --suffix pocket_1_2x

Run the Codex-driven overflow fixer for one narrow-layout course variant:

./Video2Book/scripts/start_pocket_overflow_fix_tmux.sh \
  --course core/statistical_mechanics/2013_spring_theoretical_minimum \
  --font-mode onepointtwo \
  --model gpt-5.4 \
  --reasoning medium

Run the queue in tmux across all completed Susskind courses, one course at a time:

./Video2Book/scripts/start_pocket_overflow_fix_tmux.sh \
  --font-mode onepointtwo \
  --model gpt-5.4 \
  --reasoning medium

Run the generic LaTeX fixer on any project:

./Video2Book/scripts/fix_latex_project_overfulls.sh \
  --repo-root /path/to/repo \
  --project-root /path/to/repo/book \
  --main-tex main.tex \
  --model gpt-5.4 \
  --reasoning medium

Export EPUB3 directly from TeX for all completed courses:

./Video2Book/scripts/export_course_epubs.sh --host-root /home/lachlan/ProjectsLFS/leonardsusskind

Host-specific wrappers can live under examples/. Current bundled patterns:

  • examples/lazyearn/yale-financial-markets/
  • examples/lazylearn/how-you-speak-and-write/
  • examples/leonardsusskind/susskind-physics-archive/

🎬 Current Default Example

The bundled downloader defaults to the Leonard Susskind physics playlist:

That default is just a working example. The code is structured so other host repos can adapt the same pipeline to different lecture archives.

📦 Module Map

📚 Host Adaptation Notes

🎨 Book Cover Utility

Video2Book also includes a local Nano Banana 2 helper for editorial book-cover generation:

It reuses the GRS AI submit-and-poll mechanics from the sibling Nano Banana work, but swaps the segmentation prompts for a book-cover prompt and saves a clean output trace per run.

🌐 Book Translation Utility

Video2Book can also translate a finished lecture-note book into sibling language folders such as zh/ and jp/, while keeping the TeX structure, equations, and images intact.

The translation loop:

  • initializes a XeLaTeX-ready translated edition
  • translates the main book file first, then each chapter
  • supports both split-chapter books and single-file main.tex books with inline \chapter{...} blocks
  • names translated entry files with a language suffix such as book_zh.tex or book_jp.tex
  • recompiles after every unit
  • can commit and push the translated folder after each completed unit

⚙️ Requirements

  • tmux
  • ffmpeg
  • pdflatex
  • pdfunite
  • pdftotext
  • yt-dlp
  • pandoc (for scripts/export_course_epubs.sh)
  • codex CLI for the notes pipeline
  • a working whisper conda env for transcription
  • whisper_with_lang_detect if you want the primary subtitle path instead of fallback-only Whisper
  • rsync (for optional local publishing sync of pocket PDFs)

🤝 Good Fit

Video2Book is a good fit when you want:

  • a repo-local pipeline instead of a monolithic app
  • transcript-first lecture note generation
  • tmux-based long-running automation
  • reproducible archive structure for study material

🙏 Support

Donate PayPal Stripe
Donate PayPal Stripe

License

This repository is licensed under the GNU General Public License v3.0.

About

Video2Book focuses on practical workflows and tooling. Video2Book by LazyingArt LLC > Video2Book by LazyingArt LLC. Websites: lazying.art and learn.lazying.art. Video2Book is a practical pipeline for turning long-form video collections into durable study material: downloaded media, timestamped transcripts, and trans...

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors