How can I export speech analysis text with imbedded timecodes for the creation of subtitle files?

I found a script that allows you to export all your text layers with time codes as a .srt subtitle file. However, instead of multiple text layers, I have only one: essentially the meta data from Premiere speech analysis that with the aid of a different script, is being used at a "subtitle layer". Essentially, I'm trying to use this data to create a .srt file so I can create actual subtitles, not this hybrid animation/text layer.
Here is the script I used to export the text layer to .srt:
Subtitle Exporter v01  
Script by Philipp Grolle
www.display-artists.de
Instructions:
Select all the Text Layers you want to export, run the script, and save the file as .srt
Attention: The Script has not been debugged or testet. Try it on your own risk!
// get all the selected Layers
var theComp = app.project.activeItem;
var alleLayer = theComp.selectedLayers;
// count how many layers are selected
var anzahlLayer = alleLayer.length;
// Enable the line below if you want to change the order of your text (ascending / descending)
/* alleLayer.reverse(); */
   // prompt to save file
   var theFile = File.saveDialog("Save the text file.", "untitled.txt", "TEXT txt");
   // if user didn't cancel...
   if (theFile != null) {
      // open file for "w"riting,
      theFile.open("w","TEXT","????");
         // Do it for all the selected Layers
         for (x = 0; x < anzahlLayer; x++)
             // get In- and Outpoint of the current Layer and convert to timecode (00:00:00:00)
            var timecodeIn = timeToCurrentFormat(alleLayer[x].inPoint, 25);
            var timecodeOut = timeToCurrentFormat(alleLayer[x].outPoint, 25);
           // split the value of the inPoint; converting last 2 characters  (frames) to milliseconds, and finally join it again with comma instead of colon
            var str_in= timecodeIn;
            var timeCodeAnfang_in=str_in.slice(0,8);
            var timeCodeEnde_in=str_in.slice(9,11);
            var millisek_in = timeCodeEnde_in*40; // 1000 milliseconds divided by 25 fps = 40
            var zusammen_in = timeCodeAnfang_in +"," + millisek_in;
            //split the value of the outPoint; converting last 2 characters  (frames) to milliseconds, and finally join it again with comma instead of colon
            var str_out= timecodeOut;
            var timeCodeAnfang_out=str_out.slice(0,8);
            var timeCodeEnde_out=str_out.slice(9,11);
            var millisek_out = timeCodeEnde_out*40;
            var zusammen_out = timeCodeAnfang_out +"," + millisek_out;
            //counter for the number above the timecode (in the results)
            var zaehler = x+1;
            //writing the results to file
            theFile.write(zaehler);
            theFile.write("\r\n");
            theFile.write(zusammen_in);
            theFile.write(" --> ");
            theFile.write(zusammen_out);
            theFile.write("\r\n");
            theFile.write(alleLayer[x].property("Source Text").value);          
            theFile.write("\r\n\n");
      // close the text file
      theFile.close();
      // open text file in default app
      theFile.execute();
As I am only using one text layer, it shows me only one continious subtitle in the .srt file. Does anyone have any suggestions?

I should add that I myself am not particularly familiar with scripts or scripting, I'm merely trying all possible solutions to my problem and this seems to be a good approach. Any help would be much appreciated.

Similar Messages

  • My friend has an iPhone but doesn't use iMessage. How can I send her regular texts with the new iOS 7 update?

    My friend has an iPhone but doesn't use iMessage. How can I send her regular texts with the new iOS 7 update?

    That's because her phone is recognized in the Apple database as an iPhone.  It should eventually convert to SMS but that's above my level of expertise here so hopefully someone else can come along and help you further.  She could just turn on iMessage and solve the problem. Ha!
    Good luck!

  • How can I export photos from Aperture with a new sequence and ignore the embedded JPEG number? Have tried renumbering to no avail.

    How can I export photos from APERTURE with a new sequence and ignore the embedded JPEG number? Have tried renumbering to no avail.
    has anyone resolved this issue?
    This is now the second big Problem with using Apple's Appeture with NO apparent FIX...
    Aperture has NO DIRECT way to Burn to a CD/DVD & apparently NO way to RE-SEQUENCE the numbering system????
    ANYONE... I wish APPLE would address/fix these 2 problems... LIGHTROOM I guess is next?

    Hi David,
    Coming in and whining loudly is rude.  We are all volunteers here, voluntarily sharing our expertise so that users like you can make the most of their time with Aperture.  Speaking just for myself:  although I do care about your success with software (it's why I'm here), I don't care what software you use.  If you want to use Lightroom, do so, and post your questions in an appropriate forum.
    Burning files to a CD is a file operation done at the system level (it is built into OS X).  Aperture lets your create sharable image-format files from your Images.  You then use OS X's tools to burn those files to a CD.  Iirc, you can set up a "Burn Folder" in Finder, into which you can export files created from your Images, and with a single click burn your CD.
    Naming the files you create by exporting your Images can be tricky.  There are _many_ possibilities.  Some things can't be done.  Sequencing can be done in a number of ways (see Léonie's answer above).  What have you tried?  What was the result?  In what way did this differ from what you expected?
    --Kirby.

  • When I copy/paste a paragraph from a PDF doc, it pastes with no spaces between words. How can I fix this? I've searched everywhere for the solution but didn't find anyone had this issue.

    When I copy/paste a paragraph from a PDF doc (onto Facebook status bar, for example) it pastes with no spaces between words.  I.e: "The manhadajugofcoolwaterand offeredmeadrink." How can I fix this? I've searched everywhere for the solution but didn't find anyone had this issue. I'm new to Apple so any help will be much appreciated. Thanks!

    I can't speak about this occurring with FaceBook since I don't use FaceBook, but I see the same type of thing when I copy and pasted from websites. It doesn't always happen and I cannot find any particular set of circumstances under which it occurs or does not occur.
    I am merely responding to let you know that it happens to me as well and I have seen no way to correct it. I'm not so sure that there is a way to correct in in that it may have something to do with how the original text is formatted in the PDF or on the website and how it eventually "fits" into the text field or the area in which it is pasted.

  • How can I export a project on an external drive in the latest version of iMovie?

    Before the latest release of iMovie I easily managed to export a project on an external usb drive and re-import such project on a different Mac... In the latest iMovie version, however, I cannot see my drive any more..
    So, how can I export a project on an external drive in the latest version of iMovie?
    Thank you in advance

    I'm not sure this is the best way, but you could create a new iMovie Library, move your project to that Library, then close the library. Then move the Library to your USB drive. Then, on the other Mac, in iMovie open the Library.

  • How can I share applications and softwares with different users of the same computer?

    First question: How can I share applications and softwares with different users of the same computer?
    Second : Can I use 2 different I cloud accounts to synt 2 iphones with one computer?

    Applications installed on the admin account are available to all user accounts unless Parental Controls are enabled.
    Yes.   Separate user accounts, help here >   How to use multiple iPods, iPads, or iPhones with one computer

  • After refusing an update now all I get is a white screen with the firefox logo. If I have to reinstall firefox 3.66, how can I transfer my firefox profile with bookmarks etc, to the new installation?

    After refusing an update now all I get is a white screen with the firefox logo. If I have to reinstall firefox 3.66, how can I transfer my firefox profile with bookmarks etc, to the new installation?
    == This happened ==
    Every time Firefox opened

    -> press '''F11''' to bring the computer out of FullScreen
    -> Tap '''ALT''' key or press '''F10''' to show the Menu Bar
    -> go to View Menu -> '''Zoom''' -> click '''Reset''' -> '''Page Style''' -> select '''Basic Page Style'''
    -> go to View Menu -> Toolbars -> select '''Menu Bar''' and '''Navigation ToolBar''' -> unselect All Unwanted/Incompatible Toolbars
    -> go to Tools Menu -> Options -> General -> '''When Firefox starts : select "Show My Home Page"''' -> Type the address of the website which you want to be your HomePage e.g. http://www.google.com
    -> go to Tools Menu -> Options -> Content -> place Checkmarks on:
    1) Block Pop-up windows 2) Load images automatically 3) Enable JavaScript
    -> go to Tools Menu -> Options -> Privacy -> History section -> '''Firefox will: select "Remember History"'''
    -> go to Tools Menu -> Options -> Security -> place Checkmarks on:
    1) Warn me when sites try to install add-ons 2) Block reported attack sites 3) Block reported web forgeries 4) Remember Passwords for sites
    -> Click OK on Options window
    -> go to Tools Menu -> Add-ons -> Extensions section -> REMOVE All Unwanted/Suspicious/Incompatible Extensions (Add-ons)
    -> go to Tools Menu -> Add-ons -> Appearance section -> REMOVE All Unwanted/Suspicious/Incompatible Themes (Persona)
    Now Restart Firefox. Check and tell if its working.

  • Premiere CS4 - How can you import QuickTime (.mov) videos and which settings for the sequence?

    Premiere CS4
    How can you import QuickTime (.mov) videos and which settings for the sequence?
    Please reply in plain English or if possible in German
    Greetings from Vienna, Peter

    I have not installed Quicktime.
    I got a few scenes (.mov) from a Canon Eos 70d.
    I want to create a short film (in Premiere CS4) with these scenes, mixed with photos and MP3 music.

  • How can I create transparent animated  text with Motion and Final Cut Pro?

    Hi all,
    I am trying to replicate an effect that a previous video editor did in a project, but I can't contact them.
    They made animated text in Live Type, and saved it as a QT movie. When this text is placed over existing video in the FCP project, the text is "transparent", basically it acts like text created in FCP (You can see the background image behind the text, like through the middle of the letter "o").
    I have made some animated text in Motion, but when I save it as a QT movie, and bring it into FCP, the whole 1280x720 screen is covered by this movie, and I have to crop it so it does not cover the background image. It is all black except for the text. And of course the text is not on a transparent layer. Any ideas how I can create this effect with animated text? I've tried messing with transparency and overlay settings, nothing seems to work.
    Running latest version of Final Cut Studio...
    Thanks
    Dave

    Just bring the Motion (.motn) project into FCP and lay it over your clip.
    The QT you're exporting has to carry the alpha channel (animation codec, million+ colors), but don't waste your time/disk space with that. Just bring the motion project into FCP.
    Patrick

  • How can I export a graphic slide with a quicktime movie from Keynote?

    I export a title slide with a quicktime movie from Keynote to my desktop and it plays fine with audio. Once I insert or drag the clip into iWeb the resolution is degraded and very choppy. The resolution is 320x200 and I'm exporting from Keynote as a custom size (320x200) Frame rate: 29.97 Key Frames: Automatic Key Reordering is checked Data Rate: Automatic Quality: Multi pass. I need some help.

    how large is the video and if you publish - does it still have the same horrible quality?
    you might considering exporting as flash (loads faster) and integrating that into your iweb site using post-editing: http://karreth.com/index.php/articles/iframes-iweb/
    max

  • How Can I Make A Large Photo with Product Detail for My Thumbnails in Dreamweaver

    Hello All:
    New to Dreamweaver, so my code knowledge does not exist yet. Have Mercy!!!!
    Anyway , I am making a typical product page.
    I prefer that when people click the thumbnail product photo to not have to click into another brower.
    Nowadays you are able to click in what is commonly called a "Quick View" that pops up and gives you a full sized
    image along with product detail, and pricing.  That's all I want.
    How can I link this [the larger photo and product detai] to my thumbnails in Dreamweaver???? 
    I want the look that is on every website like Target, Macy, etc.
    Someone, please help me to  !!!!!!!
    These lil' faces are really cute.  They are helping me to smile after hours and days, weeks of frustration.   TWIN MADDOG!!!

    Hi,
    don't understand your problem, ore hope to understand it right. You could put the images on a DW file and link to another file with the larger image and where you have written all your informations.
    I made this here only for a new, larger image (without additional informations):
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Unbenanntes Dokument</title>
    </head>
    <body>
    <p><a href="pflanze1_l.jpg" target="_parent"><img src="pflanze1_s.jpg" alt="Thumbnail01" width="100" height="75" border="0" /></a></p>
    <p><a href="pflanze1_l.jpg" target="_parent">or this you use an Hyperlink to the larger image</a></p>
    </body>
    </html>
    s=small; l=large
    Hans-G.

  • How can I use itunes store credit with Apple TV without the credit card code?

    I would like to allow guests in my home to use the credit in my iTunes account to purchase movies and TV shows on the Apple TV in my guest room.
    Unfortunately, it seems that in order to make a purchase they will need my credit card security code.  If they have this, then they could purchase an arbitrary number of movies, but I would like to limit purchases to the credit in the account.
    Is there any solution here?  How can I give my guests an Apple TV "allowance" (not a monthly allowance, a one-time allowance) and not give them my credit card security code?

    You can't really do this with an already existing AppleID from what I know. Now, if you don't have an AppleID, here's the run-down of how to do it:
    http://support.apple.com/kb/HT2534
    Hope that helps.

  • How can I export images out of LR3.5 and have the file numbers watermarked on them?

    Ladies & Gents,
    I'm trying to export a large number of images out of LR3.5 and want to show a unique reference number on each one as a watermark, so that customers can easily state which photo they're interested in.  I can't find anything on the export settings of the software with the exception of copyright symbols etc, but this just puts the same watermark on each photo and I want to number them individually and make it easy for the customer to identify an image.
    I'm guessing there will be a 'plug in' to do this and I don't mind paying for it, I would just rather do everything in LR and not have to then use a second piece of software and re-export all the images for a second time.
    One last thing..... I'm thinking of upgrading to LR4 in the near future and so I would like to be able to use any suggestions on that platform as well (if possible)
    Many thanks,
    Luke

    http://www.photographers-toolbox.com/products/lrmogrify2.php

  • How can I share my music library with 2 users on the same PC??

    I have a home PC with 2 usernames on it. I have had an ipod for a while and have a fairly large library. My wife has just got an ipod and installed itunes under her username, but I can't seem to find a way of sharing my library between the 2. The 2 usernames both have access to exactly the same hard drive. The only way round it I've found is for my wife to login under my username. Can anyone help?!?
      Windows XP  

    You are most of the way there. Each user having access to hard drive is the key. If users are limited in file privileges this is harder.
    Any files you add to your library and any files she adds to her library are available to the other. Just not automatically. Each user must add the files to their own library using the add file or add folder option from menu bar.
    What I have done is set library location to a location outside of My Documents\My Music. On my network storage I have a folder names s:\itunes. Both accounts iTunes are set to use this location for the library.

  • HT1145 How can I get an old mac with 9.1 on the Internet to upgrade it. There is on ethernet port or USB port....only a CD-ROM drive.

    How can I get a Mac laptop on the Internet to upgrade it from OS 9.1 to OS X? it only has a CD-ROM drive..... no USB port or cat 5 port.

    The three notebooks which may have had Mac OS 9.1 have these identifier articles as well, which you can also
    look on the frame of your screen:
    http://support.apple.com/kb/ht2287 - Powerbook G3
    http://support.apple.com/kb/ht3065 - Powerbook G4
    http://support.apple.com/kb/ht1772 - iBook

Maybe you are looking for