Batch transcription collides for videos with the same stem
Summary
transcript_path() names transcripts from video.stem only. Two supported inputs in the same directory that differ only by extension therefore map to the same cache/output file.
For example:
takes/intro.mp4
takes/intro.movBoth map to:
takes/edit/transcripts/intro.jsonReproduction
- Put
intro.mp4andintro.movin one source directory. - Run
python helpers/transcribe_batch.py <directory>. find_videos()includes both files, whiletranscript_path(edit_dir, video, 0)returns the same path for each.
If the transcript does not exist, both jobs are submitted to the thread pool and concurrently write the same file; whichever finishes last wins. If it already exists, both inputs are considered cached, so one video is never transcribed.
The same collision applies to nonzero audio tracks because both inputs receive the same .trackN.json name.
Expected behavior
Each supported source file has a distinct transcript/cache path.
Suggested direction
Include the source extension (or another stable per-source discriminator) in transcript filenames, while preserving or migrating the legacy stem-only cache where it is unambiguous. A regression test with same-stem .mp4 and .mov inputs would cover both the cache and parallel-write cases.
Source: browser-use/video-use