Git Product home page Git Product logo

dcsubtoae's Introduction

DCSubToAE

ExtendedScript plugin to import Subtitles into After Effects

Currently supports the following subtitle formats:

  • Interop (DCSubtitle XML)
  • TimeXML
  • SRT (SubRip)
  • FinalCut XMEML

more to come...

The import right now is rather basic:

  • there is little to no error checking
  • SRT: text formatting is not supported (tags are just read as text)
  • Interop: images are not supported
  • FinalCut: Unicode characters can break the text conversion

How does it work?

Rather simple, actually (once one manages to bend your mind around the ExtendedScript API - which more often than not is for from obvious...). What we do is use the Layer Marker facility of After Effects to write each subtitle as a Layer Marker's comment onto a fresh layer. We then use Text Animators to keyframe certain text attributes at the correct in- and out-times of the subtitles.

The advantage of doing it this way:

  • speed
  • regular Text Layer that can be modified globally without keys (font, size...)

The disadvantage (compared to creating Text Document objects and keyframing those):

  • less keyed control over the text attributes
  • all text uses the same font etc
  • no "real" regular and italic fonts in the same layer (instead, fake italics by skewing the fonts per key)

The "Source Text" attribute of the Text Layer uses an expression (set up by the script too) to read the text from the Layer Markers:

n = 0; 
t = 0; 
if (marker.numKeys > 0)
{
  n = marker.nearestKey(time).index; 
  if (marker.key(n).time > time) n--;
} 
if (n > 0) marker.key(n).comment; 
else '';

Installation

Just copy into your Scripts\ScriptUI Panels\ folder

Disclaimer

This script was created as an in-house tool to burn (and retime) subtitles for DCPs. I would not exactly call it well tested and error proof. I'd rather expect it to set your cat on fire and run screaming through town. Naked. But in most cases, with well behaving subtitle files, it does what it should. And that's something too, right?

dcsubtoae's People

Contributors

flipswitchingmonkey avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.