@@ -77,31 +77,43 @@ const MINIMUM_BOUNDARY_SILENCE_SECONDS = 0.1;
77
77
const BOUNDARY_STRATEGIES = [
78
78
{
79
79
name : 'black-logo' ,
80
- filters : [ 9 ] ,
80
+ filters : [ 11 ] ,
81
81
minSilenceSeconds : 1.5 ,
82
82
minFrames : 5
83
83
} ,
84
84
{
85
85
name : 'white-logo' ,
86
- filters : [ 11 ] ,
86
+ filters : [ 13 ] ,
87
87
minSilenceSeconds : 1.5 ,
88
88
minFrames : 5
89
89
} ,
90
90
{
91
91
name : 'white-borders-logo' ,
92
- filters : [ 13 ] ,
92
+ filters : [ 15 ] ,
93
+ minSilenceSeconds : 1.5 ,
94
+ minFrames : 5
95
+ } ,
96
+ {
97
+ name : 'black-logo-ai-subtitles' ,
98
+ filters : [ 17 ] ,
99
+ minSilenceSeconds : 1.5 ,
100
+ minFrames : 5
101
+ } ,
102
+ {
103
+ name : 'black-no-logo-ai-subtitles' ,
104
+ filters : [ 19 ] ,
93
105
minSilenceSeconds : 1.5 ,
94
106
minFrames : 5
95
107
} ,
96
108
{
97
109
name : 'no-logo' ,
98
- filters : [ 14 ] ,
110
+ filters : [ 20 ] ,
99
111
minSilenceSeconds : 0.1 ,
100
112
minFrames : 3
101
113
} ,
102
114
{
103
115
name : 'newsline' ,
104
- filters : [ 16 ] ,
116
+ filters : [ 22 ] ,
105
117
minSilenceSeconds : 0 ,
106
118
minFrames : 1
107
119
}
@@ -157,6 +169,8 @@ const getFfmpegBoundaryDetectionArguments = (
157
169
[ '-i' , join ( appRootPath . path , 'data/black_cropped.jpg' ) ] ,
158
170
[ '-i' , join ( appRootPath . path , 'data/white_cropped.jpg' ) ] ,
159
171
[ '-i' , join ( appRootPath . path , 'data/white_borders_cropped.jpg' ) ] ,
172
+ [ '-i' , join ( appRootPath . path , 'data/black_cropped_aisubs.jpg' ) ] ,
173
+ [ '-i' , join ( appRootPath . path , 'data/black_cropped_nologo_aisubs.jpg' ) ] ,
160
174
[ '-i' , join ( appRootPath . path , 'data/newsline_intro.jpg' ) ] ,
161
175
[
162
176
'-filter_complex' ,
@@ -166,19 +180,25 @@ const getFfmpegBoundaryDetectionArguments = (
166
180
'[1]extractplanes=y[by]' ,
167
181
'[2]extractplanes=y[wy]' ,
168
182
'[3]extractplanes=y[wby]' ,
169
- '[4]extractplanes=y[nly]' ,
183
+ '[4]extractplanes=y[bay]' ,
184
+ '[5]extractplanes=y[bnlay]' ,
185
+ '[6]extractplanes=y[nly]' ,
170
186
'[vy]split=outputs=2[vy0][vy1]' ,
171
187
// Crop top left corner
172
188
'[vy0]crop=w=960:h=540:x=0:y=0[cvy]' ,
173
- '[cvy]split=outputs=4 [cvy0][cvy1][cvy2][cvy3]' ,
189
+ '[cvy]split=outputs=6 [cvy0][cvy1][cvy2][cvy3][cvy4][cvy5 ]' ,
174
190
// Detect black frames with logo
175
191
'[cvy0][by]blend=difference,blackframe=99' ,
176
192
// Detect white frames with logo
177
193
'[cvy1][wy]blend=difference,blackframe=99:50' ,
178
194
// Detect white frames with logo and border
179
195
'[cvy2][wby]blend=difference,blackframe=99:50' ,
196
+ // Detect black frames with logo and AI Subtitle text
197
+ '[cvy3][bay]blend=difference,blackframe=99' ,
198
+ // Detect black frames with no logo, with AI Subtitle text
199
+ '[cvy4][bnlay]blend=difference,blackframe=99' ,
180
200
// Detect black frames with no logo
181
- '[cvy3 ]blackframe=99' ,
201
+ '[cvy5 ]blackframe=99' ,
182
202
// Detect Newsline intro
183
203
'[vy1][nly]blend=difference,blackframe=99' ,
184
204
// Detect silences greater than MINIMUM_BOUNDARY_SILENCE_SECONDS
0 commit comments