WEBVTT header lacks empty newline #196

Closed
opened 2026-01-29 16:37:35 +00:00 by claunia · 1 comment
Owner

Originally created by @atrottmann on GitHub (Nov 4, 2016).

Using the WEBVTT files generated by ccextractor in a HTML5 video context, I have noticed that the first entry is skipped by the browser. Apparently this is the case because it expects an empty line between the WEBVTT header and the first subtitle entry.

Changing line 60 of src/lib_ccx/ccx_encoders_common.c to include a second pair of \r\n appears to fix the problem:

static const char *webvtt_header = "WEBVTT\r\n\r\n";

Kind regards,
Andreas Trottmann

Originally created by @atrottmann on GitHub (Nov 4, 2016). Using the WEBVTT files generated by ccextractor in a HTML5 video context, I have noticed that the first entry is skipped by the browser. Apparently this is the case because it expects an empty line between the WEBVTT header and the first subtitle entry. Changing line 60 of src/lib_ccx/ccx_encoders_common.c to include a second pair of \r\n appears to fix the problem: static const char *webvtt_header = "WEBVTT\r\n\r\n"; Kind regards, Andreas Trottmann
Author
Owner

@cfsmp3 commented on GitHub (Nov 4, 2016):

Adding that \r\n is the correct fix but not there - otherwise we cannot add more data to the header before the body starts. We're not doing it for now, but definitely we don't want to make it impossible by adding the header terminator in the same place the file signature is.

Anyway, fixed now in master.

@cfsmp3 commented on GitHub (Nov 4, 2016): Adding that \r\n is the correct fix but not there - otherwise we cannot add more data to the header before the body starts. We're not doing it for now, but definitely we don't want to make it impossible by adding the header terminator in the same place the file signature is. Anyway, fixed now in master.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#196