Param "-delay" does not work in out=webvtt but works in out=srt output #500

Closed
opened 2026-01-29 16:45:24 +00:00 by claunia · 5 comments
Owner

Originally created by @Murmur on GitHub (Aug 29, 2019).

(ccextractor version 0.88 from github)

Using out=webvtt does not add 4sec delay to text timings but out=srt from the same input oboyes a delay parameter fine.

## fail, does not add +4sec
ccextractor -codec -dvbsub -utf8 -nobom -nofc -out=webvtt \
  -in=ts "test.ts" -o "sub.vtt" \
  -delay 4000 -noteletext -nocodec teletext -datapid 0x467 -parsePAT -parsePMT
## ok, adds +4sec
ccextractor -codec -dvbsub -utf8 -nobom -nofc -out=srt \
  -in=ts "test.ts" -o "sub.srt" \
  -delay 4000 -noteletext -nocodec teletext -datapid 0x467 -parsePAT -parsePMT

Is it a problem here in webvtt.c file, see srt vs webvtt variable handling ms_start,ms_end,subs_delay values?
https://github.com/CCExtractor/ccextractor/blob/master/src/lib_ccx/ccx_encoders_webvtt.c#L399
https://github.com/CCExtractor/ccextractor/blob/master/src/lib_ccx/ccx_encoders_srt.c#L84

Originally created by @Murmur on GitHub (Aug 29, 2019). (ccextractor version 0.88 from github) Using `out=webvtt` does not add 4sec delay to text timings but `out=srt` from the same input oboyes a delay parameter fine. ``` ## fail, does not add +4sec ccextractor -codec -dvbsub -utf8 -nobom -nofc -out=webvtt \ -in=ts "test.ts" -o "sub.vtt" \ -delay 4000 -noteletext -nocodec teletext -datapid 0x467 -parsePAT -parsePMT ## ok, adds +4sec ccextractor -codec -dvbsub -utf8 -nobom -nofc -out=srt \ -in=ts "test.ts" -o "sub.srt" \ -delay 4000 -noteletext -nocodec teletext -datapid 0x467 -parsePAT -parsePMT ``` Is it a problem here in webvtt.c file, see srt vs webvtt variable handling `ms_start,ms_end,subs_delay` values? https://github.com/CCExtractor/ccextractor/blob/master/src/lib_ccx/ccx_encoders_webvtt.c#L399 https://github.com/CCExtractor/ccextractor/blob/master/src/lib_ccx/ccx_encoders_srt.c#L84
claunia added the good-first-taskGCI19 labels 2026-01-29 16:45:25 +00:00
Author
Owner

@NilsIrl commented on GitHub (Dec 23, 2019):

@Murmur

Was no able to reproduce, could you give your input file? As different input files use different functions

@NilsIrl commented on GitHub (Dec 23, 2019): @Murmur Was no able to reproduce, could you give your input file? As different input files use different functions
Author
Owner

@NilsIrl commented on GitHub (Dec 23, 2019):

I think I know the problem but I would greatly prefer if I had files to test it with

Also @cfsmp3 this seems to be another example where something I feel like should be done earlier in the pipeline rather than be dealt by the encoders.

If I get files to test it with (i.e. attempt to fix it), I will try to make it happen earlier rather than just fixing it for webvtt

@NilsIrl commented on GitHub (Dec 23, 2019): I think I know the problem but I would greatly prefer if I had files to test it with Also @cfsmp3 this seems to be another example where something I feel like should be done earlier in the pipeline rather than be dealt by the encoders. If I get files to test it with (i.e. attempt to fix it), I will try to make it happen earlier rather than just fixing it for webvtt
Author
Owner

@wmstack commented on GitHub (Dec 23, 2019):

Delay works fine with webvtt for me. Also did you mean ... -codec dvbsub -utf8...? can you provide the test.ts

@wmstack commented on GitHub (Dec 23, 2019): Delay works fine with `webvtt` for me. Also did you mean `... -codec dvbsub -utf8...`? can you provide the `test.ts`
Author
Owner

@NilsIrl commented on GitHub (Dec 23, 2019):

Looking at the source code, the problem does indeed exist

@NilsIrl commented on GitHub (Dec 23, 2019): Looking at the source code, the problem does indeed exist
Author
Owner

@Murmur commented on GitHub (Dec 30, 2019):

I made a small TS test file and a text file with detailed debug information. This file has two problems a) delay not working and b) text extract not working for all tracks (I create a separate ticket for this one).
http://akini.mbnet.fi/videos/test1_dvbsub.ts
http://akini.mbnet.fi/videos/test1_readme.txt

File has two dvbsub streams (0xc37 works for srt,vtt,png extract. 0xc4f works only for png extract):

Stream #0:2[0xc37](fin): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:4[0xc4f](swe): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)

CCExtractor test commands to use -delay 0 and -delay 5000 argument:

ccextractor -codec dvbsub -utf8 -nobom -nofc -noteletext -nocodec teletext -nomyth -nots \
  -oem 2 -quant 2 \
  -in=ts "test1_dvbsub.ts" -datapid 0xc37 \
  -out=srt -o test1_c37.srt -delay 5000

ccextractor -codec dvbsub -utf8 -nobom -nofc -noteletext -nocodec teletext -nomyth -nots \
  -oem 2 -quant 2 \
  -in=ts "test1_dvbsub.ts" -datapid 0xc37 \
  -out=webvtt -o test1_c37.vtt -delay 5000

ccextractor -codec dvbsub -utf8 -nobom -nofc -noteletext -nocodec teletext -nomyth -nots \
  -oem 2 -quant 2 \
  -in=ts "test1_dvbsub.ts" -datapid 0xc37 \
  -out=spupng -o test1_c37.xml -delay 5000

Results for delay argument
out=srt works fine for delay 0..n values.
out=webvtt is always using 0 delay.
out=spupng is always using 0 delay in a xml file.

@Murmur commented on GitHub (Dec 30, 2019): I made a small TS test file and a text file with detailed debug information. This file has two problems `a) delay not working` and `b) text extract not working for all tracks (I create a separate ticket for this one)`. http://akini.mbnet.fi/videos/test1_dvbsub.ts http://akini.mbnet.fi/videos/test1_readme.txt File has two dvbsub streams (0xc37 works for srt,vtt,png extract. 0xc4f works only for png extract): ``` Stream #0:2[0xc37](fin): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:4[0xc4f](swe): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired) ``` CCExtractor test commands to use `-delay 0` and `-delay 5000` argument: ``` ccextractor -codec dvbsub -utf8 -nobom -nofc -noteletext -nocodec teletext -nomyth -nots \ -oem 2 -quant 2 \ -in=ts "test1_dvbsub.ts" -datapid 0xc37 \ -out=srt -o test1_c37.srt -delay 5000 ccextractor -codec dvbsub -utf8 -nobom -nofc -noteletext -nocodec teletext -nomyth -nots \ -oem 2 -quant 2 \ -in=ts "test1_dvbsub.ts" -datapid 0xc37 \ -out=webvtt -o test1_c37.vtt -delay 5000 ccextractor -codec dvbsub -utf8 -nobom -nofc -noteletext -nocodec teletext -nomyth -nots \ -oem 2 -quant 2 \ -in=ts "test1_dvbsub.ts" -datapid 0xc37 \ -out=spupng -o test1_c37.xml -delay 5000 ``` **Results for delay argument** out=srt works fine for delay 0..n values. out=webvtt is always using 0 delay. out=spupng is always using 0 delay in a xml file.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#500