mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
[PR #1744] [IMPROVEMENT]: Ensure WebVTT output includes minimal X-TIMESTAMP-MAP for HLS compatibility #2466
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/1744
Author: @AbHash-RixE
Created: 9/3/2025
Status: 🔄 Open
Base:
master← Head:issue-#1743-add-default-xtimestamp-map📝 Commits (1)
911b2b8feat: add default X-TIMESTAMP-MAP header for empty subtitle files in WebVTT for HLS compatibility📊 Changes
5 files changed (+78 additions, -1 deletions)
View changed files
📝
docs/CHANGES.TXT(+1 -0)📝
src/ccextractor.c(+29 -1)📝
src/lib_ccx/ccx_common_option.h(+11 -0)📝
src/lib_ccx/ccx_encoders_helpers.c(+35 -0)📝
src/lib_ccx/ccx_encoders_helpers.h(+2 -0)📄 Description
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
SUMMARY
This PR ensures that when
--timestamp-map&--out=webvttis used and no captions are detected, CCExtractor still writes a minimal header containing :X-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000This makes the generated .vtt file valid for HLS players, which often require this header even in empty subtitle files.
IMPLEMENTATION DETAILS
CHANGES.TXT-Added entry under Unreleased: 1.0
IMPROVEMENT: Add default X-TIMESTAMP-MAP header for empty subtitle files in WebVTT for better compatibility
of HLS streaming (#1743)
src/ccextractor.c-Call
webvtt_write_minimal_header()instart_ccx()when no captions are found and--out=webvttis set.src/lib_ccx/ccx_encoders_helpers.c-Added new helper function
webvtt_write_minimal_header()-Which:
Initializes encoder context for WebVTT.
Writes a default
X-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000line.Ensures line terminator respects user config (LF vs CRLF).
Cleans up encoder context properly.
src/lib_ccx/ccx_encoders_helpers.h-Declared the new function:
void webvtt_write_minimal_header(void);🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.