diff --git a/linesplit.php b/linesplit.php index ce78938..9c6dd3a 100755 --- a/linesplit.php +++ b/linesplit.php @@ -3,6 +3,8 @@ error_reporting(E_ALL); +define('MAX_CHARACTERS', 2950); // reduced from previous 5000 + // Split at double-NL to only split at srt boundaries $lines = explode("\n\n", file_get_contents($_SERVER['argv'][1])); @@ -50,7 +52,7 @@ do { $line = $lines[$nextline++]; $linewords = strlen($line); // characters - if ($linewords + $buffwords > 5000) { + if ($linewords + $buffwords > MAX_CHARACTERS) { // flush buffer before adding flushwords($nextbuffer); $nextbuffer = '';