sandflow / ttconv

Subtitle conversion. Converts STL, SRT, TTML and SCC into TTML, WebVTT and SRT.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IMSC writer configuration: 'clock_time_with_frames' invalid?

jbaden opened this issue · comments

Hello,

I am attempting to specify "time_format" as "clock_time_with_frames", but TTCONV is returning an error indicating that this is an invalid time expression format:

Command:
tt convert -i /Users/justinbaden/Desktop/TTCONV\ Test/TEST.scc -o /Users/justinbaden/Desktop/TTCONV\ Test/Test.ttml --itype SCC --otype TTML --config '{"general": {"progress_bar":false, "log_level":"WARN"}, "imsc_writer": {"time_format":"clock_time_with_frames", "fps": "24000/1001"}}'

Response:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/bin/tt", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ttconv/tt.py", line 417, in main
    args.func(args)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ttconv/tt.py", line 352, in convert
    writer_config = read_config_from_json(IMSCWriterConfiguration, json_config_data)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ttconv/tt.py", line 205, in read_config_from_json
    return config_class.parse(json_config)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ttconv/config.py", line 65, in parse
    field_value = decoder.__call__(field_value)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ttconv/imsc/config.py", line 51, in parse
    raise ValueError("Invalid time expression format", config_value)
ValueError: ('Invalid time expression format', 'clock_time_with_frames')

@jbaden ttconv currently disallows clock_time_with_frames with non-integer frame rates, because these files are usually misinterpreted.

See #351 for additional data points