mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PR #1772] [FIX] Fix missing X-TIMESTAMP-MAP header in WebVTT when no subtitles found #2499
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/1772
Author: @dRaniwal
Created: 11/26/2025
Status: 🔄 Open
Base:
master← Head:fix-webvtt-timestamp-map-empty-subs📝 Commits (1)
4faa320Fix missing X-TIMESTAMP-MAP header in WebVTT when no subtitles found📊 Changes
4 files changed (+49 additions, -19 deletions)
View changed files
📝
src/lib_ccx/ccx_encoders_common.c(+4 -0)📝
src/lib_ccx/ccx_encoders_common.h(+1 -0)📝
src/lib_ccx/ccx_encoders_webvtt.c(+32 -19)📝
src/lib_ccx/lib_ccx.c(+12 -0)📄 Description
Problem
I noticed that when running CCExtractor with the
--timestamp-mapflag on a video file that has no subtitles, the resulting WebVTT file was just empty with only "WEBVTT" at the top. TheX-TIMESTAMP-MAPheader was completely missing, which breaks HLS streaming compatibility.What I changed
write_webvtt_header()so it can write to a specific output fileX-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000) when there's no timing info availablewrite_subtitle_file_footer()Fixes #1743
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Testing
Ran CCExtractor on a
.tsfile with no subtitles using the--timestamp-mapflag. Before this fix, the output was just "WEBVTT". Now it correctly outputs:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.