Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Styled subtitles are converted incompletely #8055
Comments
|
Post the full output of youtube-dl when run with |
|
Done |
|
i didn't find a good solution yet.
in the srt file:
in the python documentation about text and tail attributes of xml.etree.ElementTree.Element https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.text :
so this code can't extract the text between tags. out = str_or_empty(node.text)
for child in node:
if child.tag in (_x('ttml:br'), _x('ttaf1:br'), 'br'):
out += '\n' + str_or_empty(child.tail) |
[utils] fix dfxp2srt text extraction(fixes #8055)
When converting subtitles from .ttml to .srt, inline spans causes subtitles to be cut off prematurely.
Original (.ttml):
Conversion (.srt):
The following part is missing:
Verbose output: