Return
VidToCode: LLM-Based Source Code Reconstruction From Programming Video Tutorial Transcripts
DOI:10.1109/access.2026.3741380.png)
Abstract
En 中文
Programming tutorials show evolving code, yet recovering the final project remains manual. Existing automated methods apply optical character recognition (OCR) to video frames and recover only momentarily visible code rather than the final source-file set. To our knowledge, prior work has not studied reconstructing a tutorial’s final source-file set. We investigate this task using transcript-only input and present VidToCode, a large language model (LLM)-based framework, together with a benchmark of 36 YouTube tutorials balanced across four languages, three duration strata, and three topic types, with manually reconstructed reference code. We evaluate four pipeline variants and six LLMs in 756 runs using Token-NLS, a 0-to-1 measure of token-level lexical similarity, expected-language identification, syntax or compilation checks, execution-based behavioral tests, and token use. In the matched comparison of all variants on 36 tutorials and three higher-tier models, single-pass B1 achieves the highest mean Token-NLS of 0.565 (standard deviation 0.225) and the highest rate of passing all tutorial-specific scenarios (79.6%) while using approximately 74% fewer tokens than note-taking B4. We also assess run-to-run stability in a separate 1,620-run study that repeats each applicable model–variant configuration three times across all 36 tutorials. B1 ranks first in all three repetitions, averaging 0.555 versus 0.532 for stateful B3, with sample standard deviations of 0.005 and 0.003, respectively. For tutorials resembling the benchmark, narration can support reconstructions that satisfy the specified tests, and B1 offers the strongest observed combination of lexical similarity, behavioral success, and token use.
Keywords:
Code generation
large language models
programming video tutorials
transcript-based code reconstruction
software engineering education
empirical software engineering
Journal
IF:
3.6
Papers:
9.8W
Citations:
29.4W
Organization
Cited Papers
No cited papers available

