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

WebVTT reader

chenlung opened this issue · comments

Specification at WC3.

Sample files: WebVTT.zip

This would be good to have as WebVTT is getting more traction on more platforms. The benefit too is that it can handle formatting better than its ancestor srt

The library can export to WebVTT. What would be a use case/workflow where import from WebVTT would be useful? What would be the typical output?

Adding a WebVTT reader is technically straightforward.

Just want to make sure we end up with the right features.

The most important features to me include the following:

  • Italics
  • Shifting alignment to the top
  • Frame-based timecode (where applicable)
  • A function to add or subtract a frame's worth of the end cue (different interpretations between tools)

The first two are common/supported in iTunes Timed Text (other things less so when comparing to TTML). I'm not an expert beyond that, so I'm happy if other people have comment.

So WebVTT ➡ TTML for iTunes delivery? iTunes uses a special flavor of TTML if I am not mistaken.

Hi

Webtt / vtt supports fuller formatting of captions that srt. So it's really the preservation of all the formatting in a source webtt that would be of benefit. We use scc to vtt and the source files sometimes have positioning, colors and attributes like italic etc.

many thanks

We use scc to vtt

This is already supported by the library.

Are you planning to convert from vtt to TTML?

So WebVTT ➡ TTML for iTunes delivery?
It was more about illustrating the common features in a commercial subtitle set (e.g in my experience, bold is very rarely used). iTunes only supports some of the TTML spec.

What I'd be interested in is VTT to iTT (and vice versa) conversion.

iTunes uses a special flavor of TTML if I am not mistaken.

I don't know the intricacies, but I think that's right.

I would look at using TTML as an archive format and the ability to go vtt -> ttml -> vtt with all the formatting intact would be the goal. vtt is supported by brightcove, ttml is supported by Premiere (although not fully)

having a format rich archive format would be the goal (ttml)

@chenlung See #379 . I would appreciate your feedback.

@chenlung Any feedback?

I'm unable to test it (an inability to compile. I'm primarily a Mac user, incidentally), so I'll trust that your work is fine (happy for others to try).

Many thanks for your efforts!

@chenlung Ok. Do the instructions in the README not work?

git clone https://github.com/sandflow/ttconv.git
cd ttconv
mkdir build
pipenv install --dev
export PYTHONPATH=src/main/python
python src/main/python/ttconv/tt.py convert -i src/test/resources/scc/mix-rows-roll-up.scc -o build/mix-rows-roll-up.ttml

A release could be issued so that you can test it using pip install --pre ttconv. Would that be better?

@chenlung Ok. Do the instructions in the README not work?

git clone https://github.com/sandflow/ttconv.git
cd ttconv
mkdir build
pipenv install --dev
export PYTHONPATH=src/main/python
python src/main/python/ttconv/tt.py convert -i src/test/resources/scc/mix-rows-roll-up.scc -o build/mix-rows-roll-up.ttml

A release could be issued so that you can test it using pip install --pre ttconv. Would that be better?

It's because I'm not a developer. Also, I'm running El Capitan (which isn't a recent OS).

It's because I'm not a developer. Also, I'm running El Capitan (which isn't a recent OS).

Understood.

I released a beta, which you can install using pip install ttconv==1.0.6b1

https://pypi.org/project/ttconv/1.0.6b1/

It's because I'm not a developer. Also, I'm running El Capitan (which isn't a recent OS).

Understood.

I released a beta, which you can install using pip install ttconv==1.0.6b1

https://pypi.org/project/ttconv/1.0.6b1/

Thanks, but I'm having trouble installing it (maybe I've got the wrong file).

  • Downloaded the WHL and ttconv-1.0.6b1.tar.gz.
  • Terminal does nothing when I put in pip install ttconv==1.0.6b1 and press Enter

Apologies in advance for my uselessness!