SubtitleEdit / subtitleedit

the subtitle editor :)
http://www.nikse.dk/SubtitleEdit/Help
GNU General Public License v3.0
8.83k stars 913 forks source link

When opening SRT file, sometimes first subtitle times are cleared to zero #8863

Closed dobratzp closed 1 month ago

dobratzp commented 1 month ago

Sometimes when I open an SRT subtitle file, a moment after loading the subtitles, the very first subtitle has its start and end time changed to 00:00:00.000. When this happens, the SRT file itself is not marked as modified and if you select File => New and then File => Open to open the same SRT file again, it loads fine.

If you don't notice the zeroing out of the first subtitle and then you do additional modifications to the subtitles and then save it, it will persist the 00:00:00.000 to disk.

I haven't figured out the exact sequence of events that causes this to consistently happen.

Subtitle Edit 4.0.8 running on Windows 11 Pro.

niksedk commented 1 month ago

Hm, I cannot re-create this... could you make a video + attach the subtitle file?

dobratzp commented 1 month ago

I haven't been able to catch the error on video. Most of the time the error does not occur. Maybe it's related to timing or caching. My workflow involves opening an MKV file and selecting a PGS subtitle track to OCR and I've noticed that opening the MKV file may take a few minutes or a few seconds. Whenever I open an SRT file, it also opens an MKV file in the video player with a similar name. When I observed the error, I was thinking that it loaded the timestamp correctly from the SRT file and then after the corresponding MKV file loaded in the video player the timestamp of the first subtitle was zeroed out.

niksedk commented 1 month ago

OK, let me know if you find out how to re-create this.

niksedk commented 1 month ago

OK, I actually also got this now... should be fixed in https://github.com/SubtitleEdit/subtitleedit/commit/312915879f83f22690f1ce1bd2e27e86c43ffef7