cdown/srt

There is an upper limit to the number of characters that can be read.

shibababa opened this issue · 3 comments

My SRT file is 132kb, but the output file after "fixed-timeshift" is 127kb and the last 5kb of characters are missing.
I don't think I can use this tool and am using the datetime module to create and use my own python script.

The script I created has no limit on the number of characters that can be read and is time modifiable.
I don't understand why such a problem occurs.

cdown commented

Hi! Please provide the input SRT file. Most likely your SRT file is invalid and has had part of it ignored.

cdown commented

This test works just fine with a 44 megabyte file, so I'm pretty certain the problem is in your input file:

% let idx=1; for from in {1..999}; do for to in {1..999}; do printf '%d\n00:00:00,%03d --> 00:00:01,%03d\n%s\n\n' "$(( idx++ ))" "$from" "$to" content; done; done > /tmp/i.srt
% srt normalise -i /tmp/i.srt -o /tmp/o.srt
% du -sh /tmp/i.srt /tmp/o.srt
44M	/tmp/i.srt
44M	/tmp/o.srt
% md5sum /tmp/i.srt /tmp/o.srt 
323e89abf8a8da6d98ca2c90aaca3286  /tmp/i.srt
323e89abf8a8da6d98ca2c90aaca3286  /tmp/o.srt
cdown commented

No repro and no further information in 3 days, closing.