Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
a5ff84b
Fix https://github.com/pbs/pycaption/issues/168
sannies Jun 7, 2018
8f3579e
remove position: {},start as start is not valid and don't use middel …
sannies Jun 8, 2018
3362679
add position: ,line-left asotherwise the middle of the cue will be po…
sannies Jun 13, 2018
52f6253
str() enum value
sannies Jun 13, 2018
cb054ba
Revert "Merge pull request #156 from pbs/empty-cue"
sannies Jun 13, 2018
b6a5ba8
correctly deal with Py enaums
sannies Aug 16, 2018
fad5fdd
monkey patch beautifulsoup according to https://bugs.launchpad.net/b…
sannies Sep 24, 2019
6a759b0
enum34 is only needed for Python < 3.4
kmosiejczuk Nov 15, 2019
7c7d380
Merge pull request #2 from kmosiejczuk/enum34-only-for-before-py34
sannies Feb 18, 2020
7206086
manually applied https://github.com/castlabs/pycaption/pull/1/files#…
sannies Feb 18, 2020
1e95028
update travis to perform 2.7 tests
sannies Feb 18, 2020
4493212
update beautiful soup and author in steup.py
sannies Feb 18, 2020
af702c2
remove python2 rubbish
sannies Feb 18, 2020
73dcf2f
remove monkeypatch for bs4
sannies Feb 18, 2020
f3ee463
scenarist DVD subtitles
sannies Feb 19, 2020
7e259ff
scenarist DVD subtitles
sannies Feb 20, 2020
e36b55d
remove dependency to future module and catch AttributeError instead
sannies Feb 20, 2020
a4ed569
remove dependency to future module in all imports
sannies Feb 20, 2020
1c292d2
include noto-sans font
sannies Feb 21, 2020
f16dbf4
Fix WebVTT timestamps
andrej-peterka Nov 9, 2020
7be94b9
Workaround for extended SRT format
andrej-peterka Mar 18, 2021
698d597
scenarist: speedup image quantization
andrej-peterka Mar 23, 2021
b837294
Don't dither
andrej-peterka Mar 23, 2021
8283d85
Merge pull request #5 from castlabs/scenarist-speedup
sannies Mar 24, 2021
b05021c
Fix scenarist subtitles longer than 1 hour
andrej-peterka May 25, 2021
e76c2e2
srt reader: support stripping html / ass tags
andrej-peterka Jun 7, 2021
a0b8b4e
Support writing SCC subtitles to top, fix bounding box
andrej-peterka Jun 23, 2021
026cd6a
Support writing "extended srt" with subs on top
andrej-peterka Jun 23, 2021
f51dc41
SRT: sanity checks
andrej-peterka Jul 5, 2021
2660700
Fix SRT output if video width and height are not specified
andrej-peterka Jul 5, 2021
1e0d28d
Backport scc from pbs/pycaption
andrej-peterka Feb 3, 2022
a288eda
Improve SCC source handling.
andrej-peterka Feb 9, 2022
757de56
Switch back to using old font.
andrej-peterka Mar 8, 2022
89b8720
Fix some edge cases, use the new font
andrej-peterka Mar 10, 2022
9d84f11
Add "-note" font to manifest
andrej-peterka Mar 10, 2022
b5dc4eb
scenarist: add "compat" option.
andrej-peterka Apr 22, 2022
9bff337
Support renderingChinese subtitles
andrej-peterka May 10, 2022
5187168
Merge pull request #10 from castlabs/vtk-1286
sannies May 10, 2022
8b8f053
webvtt writer: don´t convert illegal character in HTML tags
chartelt May 13, 2022
4baec76
Scenarist: add additional fonts
andrej-peterka May 13, 2022
6ada8b9
Improve matching of fonts based on requested language
andrej-peterka May 31, 2022
0c3c5cb
Additional glyph checking
andrej-peterka May 31, 2022
c075f50
Switch to NotoSansCJK for Chinese/Japanese/Korean.
andrej-peterka Jul 1, 2022
b7fd4e9
Remove old versions of fonts.
andrej-peterka Jul 1, 2022
9d042be
Get pixel and display area from the video width/height
andrej-peterka Jul 5, 2022
8e3f5de
Choose smaller fonts for smaller resolutions
andrej-peterka Jul 5, 2022
e119bf1
Print out missing glyphs in case font is missing some
andrej-peterka Sep 2, 2022
698f760
VTT: support writing full timestamps when hour is 0
andrej-peterka Nov 8, 2022
126fd0f
Tweak adjusting timings when avoiding clashes between end/start
andrej-peterka Nov 23, 2022
9424467
Manually backport DFXP reader from upstream
andrej-peterka Nov 23, 2022
07a2a0c
Merge branch 'scc_tweaks'
andrej-peterka Nov 23, 2022
6e784f6
Manually backport DFXP reader from upstream
andrej-peterka Dec 9, 2022
1f646d3
(SCC reader) Add option to merge separate captions with same times
andrej-peterka Apr 6, 2023
9d15242
(VTK-1714) Add helper functions, refactor
andrej-peterka Jun 20, 2023
31e1105
(FIX) Fix running under Python 3.10
andrej-peterka Jun 29, 2023
e487831
Ignore unknown node types when laying out SCC lines
cvillers Aug 8, 2023
e4c2cf8
Merge pull request #15 from castlabs/scc-line-layout-fix
sannies Aug 9, 2023
3c1b4f5
raw compression
sannies Jan 9, 2024
9a36dd3
Scenarist: support setting the tiff compression.
andrej-peterka Jan 9, 2024
4fcd710
add support for arabic
sannies Feb 9, 2024
78123d5
include arabic font
sannies Feb 9, 2024
8d016b9
Add font with arabic and basic euro glyphs
sannies Feb 9, 2024
2b45a1c
add font to MANIFEST.in
sannies Feb 9, 2024
3e83cac
(VTK-1695) Implement support for PixelLogic's STT subtitles
andrej-peterka Feb 13, 2024
0d33fde
(VTK-2056) Fix some subtitles being rendered off screen
andrej-peterka Feb 16, 2024
0c7abee
Use Not with Note and Math symbols only
sannies Apr 2, 2024
1e9f780
include all fonts
sannies Apr 4, 2024
db12762
Add Math to all CJK fonts
sannies Apr 11, 2024
434e64d
correct typo
sannies Apr 11, 2024
962f802
get filenames right
sannies Apr 11, 2024
e6d1ea1
(VTK-2424) Improve parsing STT subs
andrej-peterka Oct 15, 2024
79d1dd7
integrate striprtf with fonttable support
sannies Oct 25, 2024
b103069
correctly install dep from github
sannies Oct 25, 2024
bdca113
try striprtf install differently
sannies Oct 25, 2024
af2db62
try striprtf install differently
sannies Oct 25, 2024
ac14426
codec register seem to work differently in 3.12
sannies Oct 25, 2024
a60f726
move stl ebu 1991 tests to pycaption / enable python 3.12
sannies Oct 25, 2024
7ec393d
deal with edgecases in striprtf
sannies Oct 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
language: python

python:
- 3.4
- 3.5
- 2.7
- 3.4
- 3.5

script: python setup.py test

Expand Down
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include pycaption/english.pickle
include pycaption/*.ttf
include pycaption/*.otf
recursive-exclude tests *
include README.rst
include README.rst requirements.txt
Binary file added pycaption/NotoSansArabic-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added pycaption/NotoSansJP+Math-Regular.ttf
Binary file not shown.
Binary file added pycaption/NotoSansKR+Math-Regular.ttf
Binary file not shown.
Binary file added pycaption/NotoSansSC+Math-Regular.ttf
Binary file not shown.
Binary file added pycaption/NotoSansTC+Math-Regular.ttf
Binary file not shown.
5 changes: 4 additions & 1 deletion pycaption/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import bs4

from .base import (
CaptionConverter, CaptionNode, Caption, CaptionList, CaptionSet)
from .dfxp import DFXPWriter, DFXPReader
from .sami import SAMIReader, SAMIWriter
from .scenarist import ScenaristDVDWriter
from .srt import SRTReader, SRTWriter
from .scc import SCCReader, SCCWriter
from .webvtt import WebVTTReader, WebVTTWriter
Expand All @@ -14,7 +17,7 @@
'SAMIReader', 'SAMIWriter', 'SRTReader', 'SRTWriter',
'SCCReader', 'SCCWriter', 'WebVTTReader', 'WebVTTWriter',
'CaptionReadError', 'CaptionReadNoCaptions', 'CaptionReadSyntaxError',
'detect_format', 'CaptionNode', 'Caption', 'CaptionList', 'CaptionSet'
'detect_format', 'CaptionNode', 'Caption', 'CaptionList', 'CaptionSet', 'ScenaristDVDWriter'
]

SUPPORTED_READERS = (
Expand Down
3 changes: 1 addition & 2 deletions pycaption/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from datetime import timedelta
from numbers import Number
from six import text_type

from .exceptions import CaptionReadError, CaptionReadTimingError

Expand Down Expand Up @@ -232,7 +231,7 @@ def get_text_for_node(node):
def _format_timestamp(self, value, msec_separator=None):
datetime_value = timedelta(milliseconds=(int(value / 1000)))

str_value = text_type(datetime_value)[:11]
str_value = str(datetime_value)[:11]
if not datetime_value.microseconds:
str_value += '.000'

Expand Down
4 changes: 2 additions & 2 deletions pycaption/dfxp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from .base import *
from .extras import SinglePositioningDFXPWriter, LegacyDFXPWriter
from .base import * # noqa: F401, F403
from .extras import SinglePositioningDFXPWriter, LegacyDFXPWriter # noqa: F401
Loading