Best Way to Template Subtitle Track
-
I’m having the same issue
-
I’m on AE 23.2.1
I believe I’m on the latest version of Templater, but am not 100% sure
-
I’m seeing some odd weird green text, and the entire expressions box appears to be glitching
https://www.jotform.com/uploads/AlexaSports/222508108729053/5577826774387959455/Screenshot 2023-04-19 at 11.50.37 PM.png
-
@ben-forman Looks like that second screenshot isn’t coming through due to spaces in the URL.
Does advancing the preview to the next data point or a different subtitle file (srt -> jsx) resolve the expression not completing its calculation?
-
After doing some troubleshooting, it seems like the behavior we’re seeing here is the result of the encoding format of the .jsx subtitles files in the project. If we open the Lockdown-Walkthrough.jsx, Templater-Intro.jsx, and Templater-Walkthrough.jsx files in an advanced text editor like Notepad++, it should be possible to change the encoding from Unix (LF) to Windows (CR LF) to make the example files read correctly on Windows-based systems.
Or, as @scainopictureman did in their previous reply, you could always replace the existing .jsx files with properly formatted ones to verify that the expression works with files with the correct text encoding.
Unfortunately, it seems as though GitHub converts everything to Unix (LF) encoding when files are downloaded through the website interface, so there’s not much we can do on that side, but at least we know what’s causing the error in After Effects.
Thanks!
-
I’m on a Mac, does the same advice still apply? I need to change the encoding of the JSX? Can I use sublime?
-
Note my issue happening with SRT files I got from other places (not the github ones)
-
@ben-forman There appear to be lots of ‘Save with Encoding’ options, the first few I’ve tried didnt work though.
-
@jeff said in Best Way to Template Subtitle Track:
@scainopictureman Can you post the jsx file that worked here?
-
@ben-forman said in Best Way to Template Subtitle Track:
I’m on a Mac, does the same advice still apply? I need to change the encoding of the JSX? Can I use sublime?
So the line endings on Mac might work best as CR (rather than CRLF or LF). Sublime should let you change the line endings, too.
@ben-forman said in Best Way to Template Subtitle Track:
@ben-forman There appear to be lots of ‘Save with Encoding’ options, the first few I’ve tried didnt work though.
The encoding should be utf-8.
-
@jon said in Best Way to Template Subtitle Track:
So the line endings on Mac might work best as CR (rather than CRLF or LF). Sublime should let you change the line endings, too.
Can you clarify what this means? Am I changing characters? Changing encodings?
-
@ben-forman said in Best Way to Template Subtitle Track:
@jon said in Best Way to Template Subtitle Track:
So the line endings on Mac might work best as CR (rather than CRLF or LF). Sublime should let you change the line endings, too.
Can you clarify what this means? Am I changing characters? Changing encodings?
LF
,CR
, andCRLF
are platform-specific “line-endings”—they tell the OS where a given line of text or code ends and a new one starts. The behavior where it was displaying all of the subtitle text at once is because AE and the OS aren’t correctly interpreting where each line ends.UTF-8 is a text character encoding—numerical representations of a graphical character/shape. There are also others like ASCII, UTF-16.
The files in the GitHub repo are already UTF-8. When I created them on Windows, the files had CRLF line endings, but git automatically converted them to LF line endings upon uploading.
I am on Windows and an older version of Sublime, but this is what it looks like on my menu. Save after changing.