forked from ebu/ebu-tt-live-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TT1 to TT3/MSPA 704 sequence identifier (#42)
* Validate bindings for EBU-TT-1 documents by dynamically setting superseding class on document creation * MSPA-702: Check existence of Styling and Layout elements for EBU-TT-1 * MSPA-702: EBU-TT-1 document must contain a tt:region element * MSPA-702: body/dur attribute is not allowed in EBU-TT-1 * MSPA-702: Check that smpte timeBase is acceptable in EBU-TT-1 * tt3 to ttd conversion (#41) MSPA-728 ebu-tt-3 to ebu-tt-d conversion * Validate bindings for EBU-TT-1 documents by dynamically setting superseding class on document creation * MSPA-702: EBU-TT-1 document must contain a tt:region element * rebased and fixed ebuttd test files * extracting ebutt1object base into generic ebuttdocumentbase class * Add EBU-TT 1 to EBU-TT 3 conversion Does not handle time conversion. Sets `ebuttp:sequenceIdentifier` to the value of `tt/head/metadata/documentMetadata/documentIdentifier` if present, otherwise uses "TestConverter". Resets the `conformsToStandard` to say it is EBU-TT-3 conformant. Sets the `timeBase` to `media` whether you like it or not, but doesn't do any other conversions. * Tidy out debug prints and unneeded commented code * Address review comments Also allows for a setting that specifies whether or not to use `ebuttm:documentIdentifier` element value in the input as the `ebuttp:sequenceIdentifier` attribute value in the output. Adds a test for this. * Fix some documentation Address some warnings and add a page for EBU-TT 1 to EBU-TT 3 conversion. WIP. * Rename conversion docs Should have been committed with previous commit. * Unit test EBUTT1 to EBUTT3 conversion * Fix validation error messages for unexpected attributes so it doesn't say they are missing. * Fix cloning of unknown element, and conversion of metadata * Make EBUTT1Document instantiatable by including required attributes and elements in the constructor * Add unit test cases for programmatical construction with smpte (skipped) and media timebase * Add unit test cases for from-document construction with smpte (skipped) and media timebase * Address review comments Pass pep8 wherever we can. * Remove no-longer-used error string * Rename test file Helps distinguish test EBU-TT 1 files from test EBU-TT 3 files. * Address review comment
- Loading branch information
1 parent
d4b1f6e
commit 71ac319
Showing
22 changed files
with
760 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Conversion of EBU-TT Part 1 documents to EBU-TT Live documents | ||
============================================================== | ||
|
||
The :py:func:`ebu_tt_live.documents.converters.ebutt1_to_ebutt3` function | ||
creates an EBUTT3Document from an EBUTT1Document using the helper class | ||
:py:class:`ebu_tt_live.bindings.converters.ebutt1_ebutt3.EBUTT1EBUTT3Converter`. | ||
|
||
This class manages various possible complications, including mapping SMPTE | ||
timecodes into media time, and setting a sequence identifier. | ||
|
||
Here's some documentation from the coding process that captures some of our | ||
internal conversation about how to map font sizes, to give an idea of the | ||
complexity. | ||
|
||
The problem | ||
----------- | ||
|
||
Convert an EBU-TT part 1 document to an EBU-TT part 3 document | ||
|
||
EBU-TT part 1 can have smpte timebase; EBU-TT part 3 cannot. | ||
EBU-TT part 1 must not have a sequence identifier and must not | ||
have a sequence number. EBU-TT part 3 documents must have both. | ||
|
||
In order to set the sequence identifier the converter can be | ||
configured with the desired value, or it can be set to extract the | ||
document identifier from the `ebuttm:documentIdentifier` element | ||
and use it, if it exists. | ||
|
||
TODO: how to convert smpte timebase time expressions into clock or media | ||
timebase time expressions. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.