Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@ The core functionality is written in C. Other languages used include C++ and Pyt

Downloads for precompiled binaries and source code can be found [on our website](https://ccextractor.org/public/general/downloads/).

### WebVTT Output Options

CCExtractor supports optional WebVTT-specific headers for advanced use cases
such as HTTP Live Streaming (HLS).

#### `--timestamp-map`

Enable writing the `X-TIMESTAMP-MAP` header in WebVTT output.

This header is required for HLS workflows but is **disabled by default**
to preserve compatibility with standard WebVTT players.

Example:
```bash
ccextractor input.ts --timestamp-map -o output.vtt


### Windows Package Managers

Expand Down
3 changes: 3 additions & 0 deletions src/lib_ccx/ccx_common_option.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "ccx_decoders_708.h"
#include "utility.h"



extern ccx_encoders_transcript_format ccx_encoders_default_transcript_settings;
/* Parameters */
void init_options(struct ccx_s_options *options)
Expand Down Expand Up @@ -41,6 +43,7 @@ void init_options(struct ccx_s_options *options)
options->live_stream = 0; // 0 -> A regular file
options->messages_target = 1; // 1=stdout
options->print_file_reports = 0;
options->report_format = REPORT_FORMAT_TEXT;
options->timestamp_map = 0; // Disable X-TIMESTAMP-MAP header by default

/* Levenshtein's parameters, for string comparison */
Expand Down
11 changes: 10 additions & 1 deletion src/lib_ccx/ccx_common_option.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,16 @@ struct encoder_cfg
int extract_only_708; // 1 if only 708 subs extraction is enabled
};

typedef enum
{
REPORT_FORMAT_TEXT = 0,
REPORT_FORMAT_JSON = 1
} report_format_t;


struct ccx_s_options // Options from user parameters
{
report_format_t report_format;
int extract; // Extract 1st, 2nd or both fields
int no_rollup; // Disable roll-up emulation (no duplicate output in generated file)
int noscte20;
Expand Down Expand Up @@ -201,7 +209,8 @@ struct ccx_s_options // Options from user parameters
int multiprogram;
int out_interval;
int segment_on_key_frames_only;
int scc_framerate; // SCC input framerate: 0=29.97 (default), 1=24, 2=25, 3=30
int scc_framerate;
// SCC input framerate: 0=29.97 (default), 1=24, 2=25, 3=30
#ifdef WITH_LIBCURL
char *curlposturl;
#endif
Expand Down
1 change: 1 addition & 0 deletions src/lib_ccx/lib_ccx.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ void process_hdcc(struct encoder_ctx *enc_ctx, struct lib_cc_decode *ctx, struct
// params_dump.c
void params_dump(struct lib_ccx_ctx *ctx);
void print_file_report(struct lib_ccx_ctx *ctx);
void print_file_report_json(struct lib_ccx_ctx *ctx);

// output.c
void dinit_write(struct ccx_s_write *wb);
Expand Down
Loading
Loading