assurance-tunnel
assurance-tunnel
assurance-tunnel
assurance-tunnel

[ACTOR BETA] SRT Subtitle Player v0.9.3 (New Version: 18 June 2020)



  • Dear All,

    In response some users who are trying to deal with SRT files (the standard text file format for specifying subtitles or closed captions) I created a new actor called SRT Subtitle Player.


    Simply feed in a timecode location, and it outputs the text from the subtitle file for that time.

    You can generate the timecode any way you like, but the obvious use case would be to feed it from the 'position' output of the Movie Player.

    Note that this plugin strips all tags (e.g., <b>...</b>) since Isadora would not be able to use them for formatting.

    Give it a try and leave your feedback here. If you experience a crash with a particular SRT file, it would be helpful if you posted it when you let me know.

    Best Wishes,
    Mark

    srt-subtitle-player-v0.9.3.zip



  • @mark: Thank you. My storyteller wife just recorded a story with closed captions for the upcoming Juneteenth virtual celebration and I will try this actor today.



  • @mark

    I downloaded this file 

    Moses und Aron.en.srt.zip

    and it doesn't work. No text. I load the file in the subtitle software Aegisub (http://www.aegisub.org) and export it as .srt without any change…and it works. I suppose the export function changes something but I don't know what.

    Subtitles-exported.srt.zip

    best, Jean-François 



  • @mark

    Thank you so much. I've done a brief test on three short films, and it seems to work fine: happy with the .srt files and syncs with the movie as it should... When time permits I'll test with a long-form one, but I've no reason to think it won't work. Thanks a million!



  • @jfg

    .srt files are just txt files with a different ending. You could open it in a text editor and compare the files internals.



  • @dillthekraut

    I already done it. No difference on this level.


  • Tech Staff

    @jfg

    Both of your files are working fine for me. Does the output give an error for the file that does not work?

    Best Michel


  • Tech Staff

    @jfg

    I have used Aegisub regularly, and it generally works very well.
    It may be that there are some custom elements added to the format you are using.
    I will take a look and let you know what I find.


  • Tech Staff

    @jfg

    As I suspected, you have a CPS field, and this seems to be causing the SRT to not be read correctly.
    You can correct this by right clicking on the headers in Aegisub and unchecking 'Characters Per Second' and exporting an SRT file with the column hidden.
    That fixed it for me.



  • @dusx said:

    As I suspected, you have a CPS field, and this seems to be causing the SRT to not be read correctly.

     Ryan, I don't think this is correct. The CPS is a calculation of how many characters per second the viewer must read, to help you gauge if your subtitles are too fast. Unchecking this column in Aegisub does not change the actual text in the file.

    I am looking at @jfg's two files. As @Michel reported they both play fine for me, and a text comparison shows them to be identical. (The are also both UTF-8 files with a BOM header, and unix line feed as the newline character.)

    I don't know why the first one (Moses und Aron.en.srt) crashed for @jfg 

    Best Wishes,
    Mark



  • @DusX 

    My explanation was perhaps not clear but I use the file I downloaded direct and it was not working. Only after I opened it in Aegisub and export it it has worked. Sorry for my bad english 

    @mark

    After I read your answer I decompress the .zip file I sent you and wonder the decompressed file works fine. I don't understand what's happening but it comes from the srt file I download or from the downloading process.

    Thank you

    best, Jean-François 



  • @jfg said:

    I don't understand what's happening but it comes from the srt file I download or from the downloading process.

     Can you give us a link where you downloaded the file so we can try also?

    Best Wishes,
    Mark



  • @mark said:

     Can you give us a link where you downloaded the file so we can try also?

     it is difficult because I used the Software "Submarine"  https://www.bitfield.se/submar... and it doesn't give the possibility to show or copy the link. 

    I have tried with another file from the same source with the same result. I can only see the text after opening the file with Aegisub and directly export as srt (only save doesn't work).

    From another source (same result):  https://opensubtitles.online/l...

    best, Jean-François 



  • @jfg said:

    From another source (same result):  https://opensubtitles.online/l...

    I guess I can see the problem with this link. If I open this text file in BBEdit, it shows the following in terms of the text file format:

    So the first problem is that the file is stored in the Mac OS Roman file format, which is really ancient and not used any more. To make matters worse, it uses Windows line endings (CRLF) instead of MacOS as the format indicates.

    If I take that text file and save it as:

     <<<< THIS IS HOW THE FILE SHOULD BE SAVED >>>>

    then the file loads fine.

    However if I save it this way as UTF-8 but with Windows line endings:

    It does not read properly on macOS. This last problem I have fixed for the next version. But this won't solve the fact the issue with a Mac OS Roman file. The file data must really be saved as UTF-8 so that the full character set can be used.

    In addition, I've added a 'count' output that shows the number of captions that were read. If you feed in your file and this shows "0", then a new error will appear in the error output:

    empty (incorrect encoding?)

    In any case, if you don't have BBEdit, get the free version. It allows you to adjust these settings (encoding, line endings) easily in the toolbar at the bottom of the window.

    I'll post the new version that deals with the line endings once I hear back from others about any other bugs.

    Best Wishes,
    Mark



  • @mark

    Dear Mark,

    thank you very much. I have BBEdit or I can export with Aegisub, now that I know where it is coming from.

    best, Jean-François 



  • Dear All,

    The original post has been updated with v0.9.1 of the SRT Subtitle Player. I think I've fixed all the known bugs. But please let me know if you find anything else.

    Remember: the SRT file must be either pure ASCII or a UTF-8 Encoded file! If you feed in a Mac OS Roman or some other weird/ancient encoding, the plugin will crash!

    Best Wishes,
    Mark



  • @mark

    got a new problem: if I delete the name of the file in "srt files" without to add a new one (typing or copying) Isadora crashes. It doesn't happen if I hit "Enter" before I click outside of the text window. It looks like the window doesn't be empty. 

    For the rest it works very well.

    Thanks

    Jean-François



  • @jfg

    Your crash is solved with v0.9.2 -- new download in the first post here.

    Best Wishes,
    Mark



  • @mark

    Work perfect.

    Thank a lot

    best, Jean-François 



  • @mark,

    sorry but how do the projector realize the linefeed?

    when we feed the srt player text out to text in of the text drawer we get a 2 line entry from the srt in one line

    and without space, when we than put the textdraw video out to projector, the entry shows up in two lines.

    where is the linefeed made like the srt format gives it?

    thx.

    r.h.