published: python3 check_cps.py your.srt 20 as run: python3 check_cps.py source.srt 20 exit=0 result: file=source.srt limit=20 cues=334 characters=17074 average_cps=14.76 over_limit=62|cue 3 at 8950: 69 chars in 3.100 s = 22.26 cps| edge: BOM, CRLF line ends, italic tag, a 0.5 s cue, a gap-0 cue pair as run: python3 check_cps.py edge.srt 20 exit=0 result: file=edge.srt limit=20 cues=5 characters=146 average_cps=22.64 over_limit=3|cue 1 at 1000: 44 chars in 0.500 s = 88.00 cps| published: python3 fix_cps.py your.srt fixed.srt 20 as run: python3 fix_cps.py source.srt fixed-20.srt 20 exit=0 result: limit=20 fixed_by_extending=8 fixed_by_borrowing=26 still_over=28 max_later_start_ms=400| edge: BOM, CRLF line ends, italic tag, a 0.5 s cue followed by a cue 50 ms later, and a fast cue that ends exactly where the next one starts (gap 0) as run: python3 fix_cps.py edge.srt edge-fixed.srt 20 exit=0 result: limit=20 fixed_by_extending=1 fixed_by_borrowing=0 still_over=2 max_later_start_ms=400| published: python3 check_cps.py fixed.srt 20 --cut as run: python3 check_cps.py fixed-20.srt 20 --cut exit=0 result: file=fixed-20.srt limit=20 cues=334 characters=17074 average_cps=14.73 over_limit=28|cue 3 at 8950: 69 chars in 3.400 s = 20.29 cps; cut 1 chars to reach 20| edge: edge file after the fix as run: python3 check_cps.py edge-fixed.srt 20 --cut exit=0 result: file=edge-fixed.srt limit=20 cues=5 characters=146 average_cps=22.29 over_limit=2|cue 1 at 1000: 44 chars in 0.900 s = 48.89 cps; cut 26 chars to reach 20| published: ffprobe -v error -show_entries stream=codec_name -of csv=p=0 fixed.srt as run: ffprobe -v error -show_entries stream=codec_name -of csv=p=0 fixed-20.srt exit=0 result: subrip| edge: edge file after the fix as run: ffprobe -v error -show_entries stream=codec_name -of csv=p=0 edge-fixed.srt exit=0 result: subrip| published: ffmpeg -i fixed.srt fixed.vtt as run: ffmpeg -v error -y -i fixed-20.srt fixed-20.vtt exit=0 result: | edge: edge file after the fix as run: ffmpeg -v error -y -i edge-fixed.srt edge-fixed.vtt exit=0 result: |