Skip to content

Commit e471020

Browse files
committed
completely disable cchardet for python >= 3.11
1 parent 657fe26 commit e471020

File tree

3 files changed

+149
-153
lines changed

3 files changed

+149
-153
lines changed

HISTORY.rst

Lines changed: 148 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,134 @@
11
History
22
=======
33

4-
0.1.0 (2019-02-24)
5-
------------------
6-
* Support srt format;
7-
* Support using srt as reference;
8-
* Support using video as reference (via ffmpeg);
9-
* Support writing to stdout or file (read from stdin not yet supported; can only read from file);
4+
0.4.22 (2022-12-31)
5+
-------------------
6+
* Misc maintenance / compatibility fixes;
107

11-
0.1.6 (2019-03-04)
12-
------------------
13-
* Misc bugfixes;
14-
* Proper logging;
15-
* Proper version handling;
8+
0.4.19 (2022-01-07)
9+
-------------------
10+
* Blacken code and get rid of future_annotations dependency;
1611

17-
0.1.7 (2019-03-05)
18-
------------------
19-
* Add Chinese to the list of encodings that can be inferred;
20-
* Make srt parsing more robust;
12+
0.4.18 (2021-11-07)
13+
-------------------
14+
* Allow `--apply-offset-seconds` when only subtitles specified;
15+
* Make golden section search over scale factors option (`--gss`) available from help;
16+
* Use -inf as objective for invalid offsets;
2117

22-
0.2.0 (2019-03-06)
23-
------------------
24-
* Get rid of auditok (GPLv3, was hurting alignment algorithm);
25-
* Change to alignment algo: don't penalize matching video non-speech with subtitle speech;
18+
0.4.17 (2021-10-03)
19+
-------------------
20+
* Don't remove log file if --log-dir-path explicitly requested;
21+
* Add --suppress-output-if-offset-less-than arg to suppress output for small syncs;
2622

27-
0.2.1 (2019-03-07)
23+
0.4.16 (2021-07-22)
24+
-------------------
25+
* Fix a couple of validation bugs that prevented certain uncommon command line options from use;
26+
27+
0.4.15 (2021-05-25)
28+
-------------------
29+
* Make typing_extensions a requirement
30+
31+
0.4.14 (2021-05-10)
32+
-------------------
33+
* Hotfix for pysubs2 on Python 3.6;
34+
35+
0.4.13 (2021-05-10)
36+
-------------------
37+
* Support SSA embedded fonts using new pysubs2 'opaque_fonts' metadata;
38+
* Set min required pysubs2 version to 1.2.0 to ensure the aforementioned functionality is available;
39+
40+
0.4.12 (2021-04-13)
41+
-------------------
42+
* Pin auditok to 0.1.5 to avoid API-breaking change
43+
44+
0.4.11 (2021-01-29)
45+
-------------------
46+
* Misc sync improvements:
47+
* Have webrtcvad use '0' as the non speech label instead of 0.5;
48+
* Allow the vad non speech label to be specified via the --non-speech-label command line parameter;
49+
* Don't try to infer framerate ratio based on length between first and last speech frames for non-subtitle speech detection;
50+
51+
0.4.10 (2021-01-18)
52+
-------------------
53+
* Lots of improvements from PRs submitted by @alucryd (big thanks!):
54+
* Retain ASS styles;
55+
* Support syncing several subs against the same ref via --overwrite-input flag;
56+
* Add --apply-offset-seconds postprocess option to shift alignment by prespecified amount;
57+
* Filter out metadata in subtitles when extracting speech;
58+
* Add experimental --golden-section-search over framerate ratio (off by default);
59+
* Try to improve sync by inferring framerate ratio based on relative duration of synced vs unsynced;
60+
61+
0.4.9 (2020-10-11)
2862
------------------
29-
* Developer note: change progress-only to vlc-mode and remove from help docs;
63+
* Make default max offset seconds 60 and enforce during alignment as opposed to throwing away alignments with > max_offset_seconds;
64+
* Add experimental section for using golden section search to find framerate ratio;
65+
* Restore ability to read stdin and write stdout after buggy permissions check;
66+
* Exceptions that occur during syncing were mistakenly suppressed; this is now fixed;
3067

31-
0.2.2 (2019-03-08)
68+
0.4.8 (2020-09-22)
3269
------------------
33-
* Allow reading input srt from stdin;
34-
* Allow specifying encodings for reference, input, and output srt;
35-
* Use the same encoding for both input srt and output srt by default;
36-
* Developer note: using sklearn-style data pipelines now;
70+
* Use webrtcvad-wheels on Windows to eliminate dependency on compiler;
3771

38-
0.2.3 (2019-03-08)
72+
0.4.7 (2020-09-05)
3973
------------------
40-
* Minor change to subtitle speech extraction;
74+
* Misc bugfixes and stability improvements;
4175

42-
0.2.4 (2019-03-19)
76+
0.4.6 (2020-06-10)
4377
------------------
44-
* Add six to requirements.txt;
45-
* Set default encoding to utf8 to ensure non ascii filenames handled properly;
78+
* Bugfix for writing subs to stdout;
4679

47-
0.2.5 (2019-05-14)
80+
0.4.5 (2020-06-09)
4881
------------------
49-
* Clamp subtitles to maximum duration (default 10);
82+
* Allow MicroDVD input format;
83+
* Use output extension to determine output format;
5084

51-
0.2.6 (2019-05-15)
85+
0.4.4 (2020-06-08)
5286
------------------
53-
* Fix argument parsing regression;
87+
* Use rich formatting for Python >= 3.6;
88+
* Use versioneer to manage versions;
5489

55-
0.2.7 (2019-05-28)
90+
0.4.3 (2020-06-07)
5691
------------------
57-
* Add utf-16 to list of encodings to try for inference purposes;
92+
* Fix regression where stdout not used for default output;
93+
* Add ability to specify path to ffmpeg / ffprobe binaries;
94+
* Add ability to overwrite the input / unsynced srt with the --overwrite-input flag;
5895

59-
0.2.8 (2019-06-15)
96+
0.4.2 (2020-06-06)
6097
------------------
61-
* Allow user to specify start time (in seconds) for processing;
98+
* Fix Python 2 compatibility bug;
6299

63-
0.2.9 (2019-09-22)
100+
0.4.1 (2020-06-06)
64101
------------------
65-
* Quck and dirty fix to properly handle timestamp ms fields with >3 digits;
102+
* Add --reference-stream option for selecting the stream / track from the video reference to use for speech detection;
66103

67-
0.2.10 (2019-09-22)
104+
0.4.0 (2020-06-02)
68105
------------------
69-
* Specify utf-8 encoding at top of file for backcompat with Python2;
106+
* Remove dependency on scikit-learn;
107+
* Implement PyInstaller / Gooey build process for graphical application on MacOS and Windows;
70108

71-
0.2.11 (2019-10-06)
109+
0.3.7 (2020-05-11)
72110
------------------
73-
* Quick and dirty fix to recover without progress info if `ffmpeg.probe` raises;
111+
* Fix PyPI issues;
74112

75-
0.2.12 (2019-10-06)
113+
0.3.5 (2020-05-08)
76114
------------------
77-
* Clear O_NONBLOCK flag on stdout stream in case it is set;
115+
* Fix corner case bug that occurred when multiple sync attempts were scored the same;
78116

79-
0.2.14 (2019-10-07)
117+
0.3.4 (2020-03-20)
80118
------------------
81-
* Bump min required scikit-learn to 0.20.4;
119+
* Attempt speech extraction from subtitle tracks embedded in video first before using VAD;
82120

83-
0.2.15 (2019-10-11)
121+
0.3.3 (2020-03-15)
84122
------------------
85-
* Revert changes from 0.2.12 (caused regression on Windows);
123+
* Hotfix for test archive creation bug;
86124

87-
0.2.16 (2019-12-04)
125+
0.3.2 (2020-03-13)
88126
------------------
89-
* Revert changes from 0.2.9 now that srt parses weird timestamps robustly;
127+
* Add ability to merge synced and reference subs into bilingual subs when reference is srt;
90128

91-
0.2.17 (2019-12-21)
129+
0.3.1 (2020-03-12)
92130
------------------
93-
* Try to correct for framerate differences by picking best framerate ratio;
131+
* Fix bug when handling ass/ssa input, this format should work now;
94132

95133
0.3.0 (2020-03-11)
96134
------------------
@@ -101,134 +139,93 @@ History
101139
* Use utf-8 as default output encoding (instead of using same encoding as input);
102140
* More robust test framework (integration tests!);
103141

104-
0.3.1 (2020-03-12)
142+
0.2.17 (2019-12-21)
105143
------------------
106-
* Fix bug when handling ass/ssa input, this format should work now;
144+
* Try to correct for framerate differences by picking best framerate ratio;
107145

108-
0.3.2 (2020-03-13)
146+
0.2.16 (2019-12-04)
109147
------------------
110-
* Add ability to merge synced and reference subs into bilingual subs when reference is srt;
148+
* Revert changes from 0.2.9 now that srt parses weird timestamps robustly;
111149

112-
0.3.3 (2020-03-15)
150+
0.2.15 (2019-10-11)
113151
------------------
114-
* Hotfix for test archive creation bug;
152+
* Revert changes from 0.2.12 (caused regression on Windows);
115153

116-
0.3.4 (2020-03-20)
154+
0.2.14 (2019-10-07)
117155
------------------
118-
* Attempt speech extraction from subtitle tracks embedded in video first before using VAD;
156+
* Bump min required scikit-learn to 0.20.4;
119157

120-
0.3.5 (2020-05-08)
158+
0.2.12 (2019-10-06)
121159
------------------
122-
* Fix corner case bug that occurred when multiple sync attempts were scored the same;
160+
* Clear O_NONBLOCK flag on stdout stream in case it is set;
123161

124-
0.3.7 (2020-05-11)
162+
0.2.11 (2019-10-06)
125163
------------------
126-
* Fix PyPI issues;
164+
* Quick and dirty fix to recover without progress info if `ffmpeg.probe` raises;
127165

128-
0.4.0 (2020-06-02)
166+
0.2.10 (2019-09-22)
129167
------------------
130-
* Remove dependency on scikit-learn;
131-
* Implement PyInstaller / Gooey build process for graphical application on MacOS and Windows;
168+
* Specify utf-8 encoding at top of file for backcompat with Python2;
132169

133-
0.4.1 (2020-06-06)
170+
0.2.9 (2019-09-22)
134171
------------------
135-
* Add --reference-stream option for selecting the stream / track from the video reference to use for speech detection;
172+
* Quck and dirty fix to properly handle timestamp ms fields with >3 digits;
136173

137-
0.4.2 (2020-06-06)
174+
0.2.8 (2019-06-15)
138175
------------------
139-
* Fix Python 2 compatibility bug;
176+
* Allow user to specify start time (in seconds) for processing;
140177

141-
0.4.3 (2020-06-07)
178+
0.2.7 (2019-05-28)
142179
------------------
143-
* Fix regression where stdout not used for default output;
144-
* Add ability to specify path to ffmpeg / ffprobe binaries;
145-
* Add ability to overwrite the input / unsynced srt with the --overwrite-input flag;
180+
* Add utf-16 to list of encodings to try for inference purposes;
146181

147-
0.4.4 (2020-06-08)
182+
0.2.6 (2019-05-15)
148183
------------------
149-
* Use rich formatting for Python >= 3.6;
150-
* Use versioneer to manage versions;
184+
* Fix argument parsing regression;
151185

152-
0.4.5 (2020-06-09)
186+
0.2.5 (2019-05-14)
153187
------------------
154-
* Allow MicroDVD input format;
155-
* Use output extension to determine output format;
188+
* Clamp subtitles to maximum duration (default 10);
156189

157-
0.4.6 (2020-06-10)
190+
0.2.4 (2019-03-19)
158191
------------------
159-
* Bugfix for writing subs to stdout;
192+
* Add six to requirements.txt;
193+
* Set default encoding to utf8 to ensure non ascii filenames handled properly;
160194

161-
0.4.7 (2020-09-05)
195+
0.2.3 (2019-03-08)
162196
------------------
163-
* Misc bugfixes and stability improvements;
197+
* Minor change to subtitle speech extraction;
164198

165-
0.4.8 (2020-09-22)
199+
0.2.2 (2019-03-08)
166200
------------------
167-
* Use webrtcvad-wheels on Windows to eliminate dependency on compiler;
201+
* Allow reading input srt from stdin;
202+
* Allow specifying encodings for reference, input, and output srt;
203+
* Use the same encoding for both input srt and output srt by default;
204+
* Developer note: using sklearn-style data pipelines now;
168205

169-
0.4.9 (2020-10-11)
206+
0.2.1 (2019-03-07)
170207
------------------
171-
* Make default max offset seconds 60 and enforce during alignment as opposed to throwing away alignments with > max_offset_seconds;
172-
* Add experimental section for using golden section search to find framerate ratio;
173-
* Restore ability to read stdin and write stdout after buggy permissions check;
174-
* Exceptions that occur during syncing were mistakenly suppressed; this is now fixed;
175-
176-
0.4.10 (2021-01-18)
177-
-------------------
178-
* Lots of improvements from PRs submitted by @alucryd (big thanks!):
179-
* Retain ASS styles;
180-
* Support syncing several subs against the same ref via --overwrite-input flag;
181-
* Add --apply-offset-seconds postprocess option to shift alignment by prespecified amount;
182-
* Filter out metadata in subtitles when extracting speech;
183-
* Add experimental --golden-section-search over framerate ratio (off by default);
184-
* Try to improve sync by inferring framerate ratio based on relative duration of synced vs unsynced;
185-
186-
0.4.11 (2021-01-29)
187-
-------------------
188-
* Misc sync improvements:
189-
* Have webrtcvad use '0' as the non speech label instead of 0.5;
190-
* Allow the vad non speech label to be specified via the --non-speech-label command line parameter;
191-
* Don't try to infer framerate ratio based on length between first and last speech frames for non-subtitle speech detection;
192-
193-
0.4.12 (2021-04-13)
194-
-------------------
195-
* Pin auditok to 0.1.5 to avoid API-breaking change
196-
197-
0.4.13 (2021-05-10)
198-
-------------------
199-
* Support SSA embedded fonts using new pysubs2 'opaque_fonts' metadata;
200-
* Set min required pysubs2 version to 1.2.0 to ensure the aforementioned functionality is available;
201-
202-
0.4.14 (2021-05-10)
203-
-------------------
204-
* Hotfix for pysubs2 on Python 3.6;
205-
206-
0.4.15 (2021-05-25)
207-
-------------------
208-
* Make typing_extensions a requirement
209-
210-
0.4.16 (2021-07-22)
211-
-------------------
212-
* Fix a couple of validation bugs that prevented certain uncommon command line options from use;
213-
214-
0.4.17 (2021-10-02)
215-
-------------------
216-
* Add --suppress-output-if-offset-less-than arg to suppress output for small syncs;
208+
* Developer note: change progress-only to vlc-mode and remove from help docs;
217209

218-
0.4.17 (2021-10-03)
219-
-------------------
220-
* Don't remove log file if --log-dir-path explicitly requested;
210+
0.2.0 (2019-03-06)
211+
------------------
212+
* Get rid of auditok (GPLv3, was hurting alignment algorithm);
213+
* Change to alignment algo: don't penalize matching video non-speech with subtitle speech;
221214

222-
0.4.18 (2021-11-07)
223-
-------------------
224-
* Allow `--apply-offset-seconds` when only subtitles specified;
225-
* Make golden section search over scale factors option (`--gss`) available from help;
226-
* Use -inf as objective for invalid offsets;
215+
0.1.7 (2019-03-05)
216+
------------------
217+
* Add Chinese to the list of encodings that can be inferred;
218+
* Make srt parsing more robust;
227219

228-
0.4.19 (2022-01-07)
229-
-------------------
230-
* Blacken code and get rid of future_annotations dependency;
220+
0.1.6 (2019-03-04)
221+
------------------
222+
* Misc bugfixes;
223+
* Proper logging;
224+
* Proper version handling;
231225

232-
0.4.21 (2022-12-30)
233-
-------------------
234-
* Misc maintenance / compatibility fixes;
226+
0.1.0 (2019-02-24)
227+
------------------
228+
* Support srt format;
229+
* Support using srt as reference;
230+
* Support using video as reference (via ffmpeg);
231+
* Support writing to stdout or file (read from stdin not yet supported; can only read from file);

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ brew install ffmpeg
3636
(Windows users: make sure `ffmpeg` is on your path and can be referenced
3737
from the command line!)
3838

39-
Next, grab the script. It should work with both Python 2 and Python 3:
39+
Next, grab the package (compatible with Python >= 3.6):
4040
~~~
4141
pip install ffsubsync
4242
~~~

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
auditok==0.1.5
2-
cchardet;platform_system!='Windows'
32
cchardet;python_version<'3.11'
43
chardet;python_version>='3.7'
54
charset_normalizer

0 commit comments

Comments
 (0)