Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty .SRT files are created #4

Open
mdomnita opened this issue Oct 15, 2017 · 2 comments
Open

empty .SRT files are created #4

mdomnita opened this issue Oct 15, 2017 · 2 comments
Labels

Comments

@mdomnita
Copy link
Owner

mdomnita commented Oct 15, 2017

When converting some courses only the first .srt file is created okay, the rest of them are 0B in size (empty).
Caption files samples with this issue https://ufile.io/ydd4e

Only happens for courses with low codes (<300000 or so)

@mdomnita mdomnita added the bug label Oct 15, 2017
@rosetinted
Copy link

I used your LyndaCaptionToSrtConvertor (with the current conversion code from Lynda-Decryptor plugged in) to convert the files you provided.

All of them converted correctly. There was no missing or incorrect text as far as I could see, and none of the files were 0 bytes.

Previously, the main cause for 0-byte files was an unrecognized timestamp. Maybe you can step through the "findTimestamps" function to see if that's going alright. There are comments in place, but I agree it's a bit arcane if you look at it for the first time. Let me know if you need any pointers.

When working with bytes, I found it helpful to use a hex editor like HxD. Using it on the .caption files helped me discover the fixed spacing around the timestamps and text. It can probably assist in solving your current problems with the conversion.

@mdomnita
Copy link
Owner Author

Thanks for the answer. @rosetinted . I realized that only the low id courses (under 300k or so) happen to still have this issue. Probably the subtitle files have different structure in these courses.

I will test it again with the courses that did not convert ok, but I made an update after merging the last pull request and tested it. It still does the same with those courses.

Anyway, 90% of the courses converted correctly now so I will close this issue, I don't have a subscription anymore so I cannot download new courses to test at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants