Hints::Hints (weak_ptr<const Film> film)
: WeakConstFilm (film)
, _writer (new Writer(film, weak_ptr<Job>(), true))
- , _long_ccap (false)
- , _overlap_ccap (false)
- , _too_many_ccap_lines (false)
- , _early_subtitle (false)
- , _short_subtitle (false)
- , _subtitles_too_close (false)
- , _too_many_subtitle_lines (false)
- , _long_subtitle (false)
, _stop (false)
{
int scope = 0;
for (auto i: film()->content()) {
if (i->video) {
- Ratio const * r = Ratio::nearest_from_ratio(i->video->scaled_size(film()->frame_size()).ratio());
+ auto const r = Ratio::nearest_from_ratio(i->video->scaled_size(film()->frame_size()).ratio());
if (r && r->id() == "239") {
++scope;
} else if (r && r->id() != "239" && r->id() != "235" && r->id() != "190") {
check_out_of_range_markers ();
check_text_languages ();
- emit (bind(boost::ref(Progress), _("Examining closed captions")));
+ emit (bind(boost::ref(Progress), _("Examining subtitles and closed captions")));
auto player = make_shared<Player>(film);
player->set_ignore_video ();
_writer->write (player->get_subtitle_fonts());
+ if (_long_subtitle && !_very_long_subtitle) {
+ hint (_("At least one of your subtitle lines has more than 52 characters. It is recommended to make each line 52 characters at most in length."));
+ } else if (_very_long_subtitle) {
+ hint (_("At least one of your subtitle lines has more than 79 characters. You should make each line 79 characters at most in length."));
+ }
+
bool ccap_xml_too_big = false;
bool ccap_mxf_too_big = false;
bool subs_mxf_too_big = false;
longest_line = max (longest_line, i.text().length());
}
- if (longest_line > 52 && !_long_subtitle) {
+ if (longest_line > 52) {
_long_subtitle = true;
- hint (_("At least one of your subtitle lines has more than 52 characters. It is advisable to make each line 52 characters at most in length."));
+ }
+
+ if (longest_line > 79) {
+ _very_long_subtitle = true;
}
_last_subtitle = period;
for (auto j: i->text) {
if (j->use() && !j->language()) {
hint (_("At least one piece of subtitle or closed caption content has no specified language. "
- "It is advisable to set the language for each piece of subtitle or closed caption content in the \"Content→Timed Text\" tab"));
+ "It is advisable to set the language for each piece of subtitle or closed caption content "
+ "in the \"Content→Timed text\", \"Content→Open subtitles\" or \"Content→Closed captions\" tab."));
return;
}
}