• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    Javascript EDL reader

    How To... ?
    2
    5
    1508
    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.
    • D
      DillTheKraut last edited by DillTheKraut

      For a Project I'm working on, I needed to transfer subtitle cues from Adobe Premiere sequences to Isadora.
      As Premiere can export an EDL edit list with timecode for IN and OUT marks, based on @DusX 'select line of text' script, I did an EDL reader.

      In combination with @Woland 's updated version of @fifou 's Timecode trigger actor, I managed to rebuild Premiere cut sequences in no time.

      Maybe someone else can use it, so here are the script and a user actor with the named In / Outs:
      (This is only tested with Premieres EDL export, with option 'Use Source Filename' on! But should work with other softwares EDL files like FinalCut too.)

      ======================

      function main() 

      { 
      // reads EDL files and filters values to output them  for further use including ClipTitle/ Clip Filename if put to a Note under the basic values

      // 2 Inputs: 1:File name or path (TEXT); 2:Line to select (INTEGER)

      // 10 Outputs: 1:Cues/Cuts total (INTEGER); 2:Cue/Cut # (INTEGER); 3:Media Type (TEXT); 4:Stream Type (TEXT); 5:Transition Type (TEXT); 6:Duration in Seconds (INTEGER); 7:SourceIN (TEXT); 8:SourceOUT (TEXT); 9:RecIN (TEXT); 10:RecOUT (TEXT); 11:Media Title (TEXT)

      // arguments[0] = text file name or path

      // arguments[1] = line to select

      // read EDL file
      var txt = read (arguments[0]);

      // split cue lines to an array and count cues
      var Cues = txt.split("\r\n\r\n");
      var CuesCount = Cues.length;

      // split cue values from notes
      var ValuesNotes = Cues[arguments[1]].split("\r\n");
      var NotesCount = ValuesNotes.length - 1;

      // split values to an array and count the values
      var Values = ValuesNotes[0].split(" ");
      var ValuesCount = Values.length;

      // read the values from the values array
      var CueNumber = Values[0];

      var ValueTyp = Values[2];
      var ValueStream = Values[9];
      var ValueTrans = Values[14];
      var ValueDur = Values[5];
      var ValueSourceIN = Values[22];
      var ValueSourceOUT = Values[23];
      var ValueRecIN = Values[24];
      var ValueRecOUT = Values[25];

      // read the Cue/file name if there is one
      if (NotesCount > 0) {
      var ClipTitleNote = ValuesNotes[1].split(": ");
      var ClipTitle = ClipTitleNote[1];
      } else {
      var ClipTitleNote = "Undefined";
      var ClipTitle = ClipTitleNote;
      }

      // outputs
      return [ CuesCount - 1, CueNumber, ValueTyp, ValueStream, ValueTrans, ValueDur, ValueSourceIN, ValueSourceOUT, ValueRecIN, ValueRecOUT, ClipTitle ];

      }

      EDL Reader.iua


      P.S.: Maybe someone have an idea how to change the script, so it jumps to the Cue# directly and reads the values instead of reading each line separately. (maybe with .StartWith() ?)

      Woland 1 Reply Last reply Reply Quote 7
      • Woland
        Woland Tech Staff last edited by

        I love seeing material come together from multiple users to create new and interesting tools. Great work!

        Best wishes,

        Woland

        TroikaTronix Technical Support
        New Support Ticket: https://support.troikatronix.com/support/tickets/new
        Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
        Add-Ons: https://troikatronix.com/add-ons/ & https://troikatronix.com/add-ons/?u=woland
        Professional Services: https://support.troikatronix.com/support/solutions/articles/13000109444

        | Isadora Version: all of them | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s |

        1 Reply Last reply Reply Quote 0
        • Woland
          Woland Tech Staff @DillTheKraut last edited by

          @dillthekraut said:

          I did an EDL reader.

           I got a notification that you edited this post today. We'd love it if you could upload this to the TroikatTronix Add-Ons Page.

          TroikaTronix Technical Support
          New Support Ticket: https://support.troikatronix.com/support/tickets/new
          Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
          Add-Ons: https://troikatronix.com/add-ons/ & https://troikatronix.com/add-ons/?u=woland
          Professional Services: https://support.troikatronix.com/support/solutions/articles/13000109444

          | Isadora Version: all of them | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s |

          D 1 Reply Last reply Reply Quote 0
          • D
            DillTheKraut @Woland last edited by DillTheKraut

            @woland
            It was just an insignifcant typo in the description header.

            How is a JavaScript template meant to be uploaded to the plugin db? I guess as user actor? There is no specific category like the 'Open GL Shader', which has probably the same work path, or is there? Maybe this is might be worth an extra category, as well for the new Pythoners? Anyway, i'll happily look into it asap.
            I would also like to kindly remind on the feature request regarding the search function for the Plug-In DB. 😁

            Woland 1 Reply Last reply Reply Quote 1
            • Woland
              Woland Tech Staff @DillTheKraut last edited by

              @dillthekraut said:

              How is a JavaScript template meant to be uploaded to the plugin db? I guess as user actor? There is no specific category like the 'Open GL Shader', which has probably the same work path, or is there?

              You could go with Category User Actor (or Patch if you want to make an example file) and select the tag "Javascript"


              @dillthekraut said:

              Maybe this is might be worth an extra category, as well for the new Pythoners?

              The Javascript tag has it covered. There's a tag for Python as well, so that's also handled :)


              @dillthekraut said:

              I would also like to kindly remind on the feature request regarding the search function for the Plug-In DB.

               Oh, believe me, I'm waiting on that one too. I'm dying to have it.

              TroikaTronix Technical Support
              New Support Ticket: https://support.troikatronix.com/support/tickets/new
              Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
              Add-Ons: https://troikatronix.com/add-ons/ & https://troikatronix.com/add-ons/?u=woland
              Professional Services: https://support.troikatronix.com/support/solutions/articles/13000109444

              | Isadora Version: all of them | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s |

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