IRT-Open-Source / scf

Subtitling Conversion Framework
Apache License 2.0
52 stars 18 forks source link

Calculate offset based on `ebuttm:documentStartOfProgramme` #12

Closed nigelmegitt closed 6 years ago

nigelmegitt commented 8 years ago

When converting from timebase="smpte" to timebase="media" it would be ideal to offer a setting (or indeed make it the default) to use the value of TCP or equivalently ebuttm:documentStartOfProgramme as the offset and discard any content that falls before that timecode.

For example, an EBU-TT document is created from an STL document and has:

This should generate an EBU-TT-D document with:

andreastai commented 8 years ago

Yes this makes sense and was also raised by other parties who use the script to convert "broadcast" subtitles to "internet" subtitles.

The solution may as simple as to have a new parameter (e.g. offsetTcp or offsetSop for offset Start of program) and to set the value of the "offsetInFrames" parameter accordingly. The processing should stop if offsetTcp AND offsetInSeconds and offsetInFrames have been specified.

spoeschel commented 7 years ago

Sorry for the quite long delay!

We will add respective parameters to STLXML2EBU-TT and EBU-TT2EBU-TT-D that will use the TCP/ebuttm:documentStartOfProgramme values, to adjust all timecodes accordingly.

spoeschel commented 7 years ago

The example also affects the subtitle zero, which is already covered by #13. Therefore we will address that specific aspect there (distinct from the resolution of this issue here).

spoeschel commented 6 years ago

Fixed in version 1.0.