Dataclay — Automating Digital Production
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Register
    • Login

    Best Way to Template Subtitle Track

    Scheduled Pinned Locked Moved
    Templates
    5
    20
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Ben Formanundefined
      Ben Forman @Ben Forman
      last edited by

      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

      Jonundefined Jeffundefined 2 Replies Last reply Reply Quote 0
      • Jonundefined
        Jon @Ben Forman
        last edited by

        @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?

        1 Reply Last reply Reply Quote 0
        • Jeffundefined
          Jeff @Ben Forman
          last edited by

          @ben-forman

          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!

          Ben Formanundefined 1 Reply Last reply Reply Quote 0
          • Ben Formanundefined
            Ben Forman
            last edited by

            I’m on a Mac, does the same advice still apply? I need to change the encoding of the JSX? Can I use sublime?

            Ben Formanundefined Jonundefined 2 Replies Last reply Reply Quote 0
            • Ben Formanundefined
              Ben Forman
              last edited by

              Note my issue happening with SRT files I got from other places (not the github ones)

              1 Reply Last reply Reply Quote 0
              • Ben Formanundefined
                Ben Forman @Ben Forman
                last edited by

                @ben-forman There appear to be lots of ‘Save with Encoding’ options, the first few I’ve tried didnt work though.

                1 Reply Last reply Reply Quote 0
                • Ben Formanundefined
                  Ben Forman @Jeff
                  last edited by

                  @jeff said in Best Way to Template Subtitle Track:

                  @scainopictureman

                  @scainopictureman Can you post the jsx file that worked here?

                  1 Reply Last reply Reply Quote 0
                  • Jonundefined
                    Jon @Ben Forman
                    last edited by

                    @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.

                    Ben Formanundefined 1 Reply Last reply Reply Quote 0
                    • Ben Formanundefined
                      Ben Forman @Jon
                      last edited by

                      @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?

                      Jonundefined 1 Reply Last reply Reply Quote 0
                      • Jonundefined
                        Jon @Ben Forman
                        last edited by Jon

                        @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, and CRLF 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.

                        16d599cd-5194-4739-9b26-e6bd1e38e708-image.png

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post