pt_ImportSubtitles
  • pt_ImportSubtitles
    pt_ImportSubtitles

    https://aescripts.com/pt_importsubtitles/

    Useful if you need to embed subtitles onto video for web or tape delivery. You can import subtitles into After Effects using either the Encore Text Script or SubRip file format, then render with an alpha and import into your editing software, or use Dynamic Link to import directly into Premiere Pro.

  • did you have any plans to fix black background plate like this? 

    image

  • Hi Jonas, a few people have asked for this so yes it is on my "to do" list and requests like yours certainly makes it more likely to happen, but it's quite a complex problem to do properly. For now you could try this solution. Let me know if it works for you.

    Let’s say you’ve imported the subtitles and have them as white text with no background. Drop this composition into another comp. Apply the Shift Channels effect to the layer and set Take Alpha From to Full On. Apply a Fast Blur and set it to 100. Apply a Mosaic effect and set the values to horizontal 20, Vertical 8. Apply a Threshold effect and experiment with the value to get white blocks on black. Apply an invert effect to make it black blocks on white. You’ll need to experiment with the Mosaic values and possibly also the vertical position of the subtitles in the precomp. Then place another copy of the original subtitle precomp on top.

  • Hey and thanks for this great Script ,
    i have a problem with arabic text (right to left language ) this what it look like
    image
    i have (ArabicText) script from aescripts can i use it with ( import subtitles) ??
    or you can fix this ??

    this what must look like !
    image

    help please 

    thanks 



  • Hey and thanks for this great Script ,
    i have a problem with arabic text (right to left language ) this what it look like
    image
    i have (ArabicText) script from aescripts can i use it with ( import subtitles) ??
    or you can fix this ??

    this what must look like !
    image


    help please 

    thanks 



    help.PNG
    1197 x 709 - 57K
    help 2.PNG
    554 x 194 - 5K
  • Hi Mohamed, I'm not sure if it's possible to do this at the moment, but if so I imagine you would have to use ImportSubtitles to import them first, and then manually use ArabicText to adjust each subtitle keyframe.

    I have spoken with the author of ArabicText and we have a plan to allow owners of both scripts to access this functionality from within ImportSubtitles in a future version, but I can't say when this will happen.
  • Hi,

    In the Description tab says that the script is compatible with AE CS5.5, but the Compatibility tab says is compatible with AE CS6 too.

    I tested the trial version and did not work in CS6. After all, should it work or not in CS6?

    Thanks!
  • Hi Erik, There were no changes in CS6 that would affect compatibility so yes it should work. It seems to work ok for me. In what way is it not working for you?
  • You are right. I tested again today and it worked.

    Last time there was a problem with my After Effects, the script created a log accusing each subtitle line as an error, and it didn't import any text.

    Thanks!
  • Hi,

    I've purchased this script last may for a project, and since then I didn't need it. Now I need to use it again, so I installed it back again. I created the text layer, opened the pt_importsubtitle window and tried to import either an .srt or encore txt but the script does nothing after I select the file. I remember it used to work for me more than a year ago, and I'm still on cs5.5 as I was that time.

    any advice apreciated

    peter
  • Hi Peter, That is very strange. As you say, nothing has changed since it previously worked for you. I'd suggest trying to restart After Effects, if that doesn't work try deleting the AE prefs, if that doesn't help try rebooting your computer. If none of those work you could  open a support ticket and send me your subtitle file so I can rule out any problems with that.
  • Thanks a lot Paul!
    Unfortunately none of the solutions worked and I also tried importing other srts but nothing.
    Actually the only thing I didn't try yet was restart, as I'm exporting a different project in Encoder for another couple of hours, but I'll try that too when export is done.

    p
  • Is it possible to have a version for Premiere to avoid AE impoort, dynamic links? 



  • Hi Jonas, I don't think Premiere even has scripting functionality, and if it did I don't imagine it's text functionality would be as fully featured as After Effects. So I'm afraid the answer is no. It's not that bad using dynamic link from AE->PP is it?
  • Hi Paul,
    Your script works flawlessly for the most part, but the bottom alignment option is giving me some serious headaches. It works for some of my text, but not all of it. Any idea what might be going on? I see keyframes in the Anchor Point track, and it's moving my text up and down some of the time, but it's as if the script doesn't always see the correct number of lines that the paragraph text box is generating.
  • Hi Jared, Could you open a support ticket and send me your project containing both the original paragraph text layer you're selecting when you use the script and the result of the import, along with the subtitle file you're importing. Thanks.
  • Hi Jared, Could you send me your project containing both the original paragraph text layer you're selecting when you use the script and the result of the import, along with the subtitle file you're importing? Thanks.
    Email sent. Thanks so much!
  • Hello Paul

    I have an audio file in After Effects, containing meta data,  which was made through Premiers' Speech Analysis.  Everything works great in AE, and I'm able to see subtitles, utilizing an expression.  But your script seems to have key features which I would hope to use.  I've tried downloading your script to test, but no luck.  Is there a way in which I can utilize your script?

    Thanks
    Jeff
  • Hi Jeff, Could you open a support ticket and   give me some more information about this preferably with the AE project and audio file containing the meta data. And also let me know which particular key features you're interested in.
  • Hi Paul,

    I just tried your trial and it worked very well on our testing. I was wondering can it align everything centre? If I hit the centre button on the paragraph page it seems to work how I want it to but its on one text file. Is there a way to set this up before I import so it will run through out? or a way to paste that correction across the key frames? (I opened AE for the first recently so apologies if im asking the obvious or the impossible :-) this looked like a nice work around to get subs back into premiere pro.

    Thanks

    Joe
  • Hi Joseph, You just need to have it set to Center Text in the paragraph panel before you do the import. Make sure you don't have an existing text layer selected when you do the import. If no layers are selected it will use whatever the current settings are in the Character and Paragraph panels, otherwise it will make a duplicate of the selected text layer and use those settings instead.
  • Hi Paul, trying out the additional feature of using SubRip files for your script but the timecode format does not seem to be happy and throws errors

    Error at line 1. The line '00:00:20,000 --> 00:00:24,400 has a start time earlier than the existing time 00:00:00:00 that was set on line 0

    Error at line 1. The line '00:00:20,000 --> 00:00:24,400 has an end time earlier than the existing time 00:00:00:00 that was set on line 0

    I was testing it using this example script:

    1
    00:00:00:20,000 --> 00:00:00:24,400
    Altocumulus clouds occur between six thousand

    2
    00:00:00:24,600 --> 00:00:00:27,800
    and twenty thousand feet above ground level.

  • Hi Alyssa, In your example you have one too many 00: at the start of the timecode which caused the script to fail (for me it just says no subtitles found) in my tests until I removed them. Instead of 00:00:00:20,000 they should be like 00:00:20,000. (hours:minutes:seconds,milliseconds)
    Are you using v1.3 of the script? We seem to be getting differing results in that I didn't get those errors at all, and the timecodes shown in your error messages don't match the incorrect formatting in your example lines. Could you open a support ticket and  send me the SRT file you're having problems with 


  • Hello Paul,

    I'm trying to apply a stroke on all the imported lines of text in one (or a few) click(s). How do I do that?

    I tried applying a stroke effect but it seems to work on Masks only. I can apply a stroke with the Character panel but I can only seem to do one-by-one.

    Any assistance from anyone would be appreciated! Using CS4.
  • Hi Leon, Once you've got the stroke setting how you want it in the Character panel, delete the imported subtitle and import it again. Or just ensure you've got the settings in the Character panel correct before doing the import. 

    One way to make the changes to an existing subtitle import is to use my pt_TextEdit script to make the changes, after first setting the preference for it to make changes on all existing keyframes.
  • Whieses: 

    1. Link to subtitle file insteed, so you don't have to reimport everthing when you update it
    2. Possible to add background plate.
    3. Possible to change, font, size, color etc on the full layer after you import it. 
    4. Presets of font, color, size etc etc so you don't have to set it every time. 
    5. To have multiple subtitles in one project. Select one video file and 5 subtitle file and you load a preset with font,color and it creates 5 diffrent timeline.

  • Hi Jonas, addressing your suggestions:

    1. This isn't possible I'm afraid. pt_ImportSubtitles creates lots of keyframes when interpreting the subtitle file and there's no way to make this a live link.

    2. I've just released v1.4 which has the option of adding a box around the text. In fact I just realised it was you who asked for this back in August. Hope you like it!

    3. You can alter the text layer's Scale property to change the size after import. You could add a text animator to the layer to change the colour/stroke size after import, or just apply a Fill effect to the layer. I have another script called pt_TextEdit which could change the font after import, but it's probably as easy to just import it again.

    4. If you have a text layer selected when you do the import it will use that style for the subtitles. So you can create and save some text layers with different styles and use these as your presets. pt_TextEdit has the ability to save and apply presets, so you could use that after import (set it to affect all existing keyframes) but I think the first option is probably better.

    5. I can see why you might want this if you are doing multiple language versions, but it's not that hard to repeat the steps 5 times and I doubt there's the demand to make it worth me doing.


  • Hi, I'm asking this again, unfortunately I forgot what I did in the past. Could you please tell me what's the exact AE effect to adjust the imported .srt subtitle's transparency? I just want to add a small amount of black outline to the text, because the 100% white default is unsuitable for video (problems on white video content). Thanks.
  • Hi Alex, Before importing the subtitles you could set the stroke settings as you want them in the Character panel. If you want both fill and stroke to be partially transparent you can just change the layer's Opacity property value after import.

    If you want a more complex combination, or to do it after import, twirl open the Text layer and select a property from the layer's "Animate" options. It will create a new "Animator' and add the property to it, after which you can select that Animator's "Add" options to add other properties. For example you might want to control the Fill Color Opacity, Stroke Width, Stroke Color, etc.
  • Thank you Paul, I'll probably find my way through it with your reply. It's just that I don't know AE at all. I think in the past I applied the effect after the import but not quite sure. I'm trying something now but it seems to apply only to one subtitle, not all. I'll apply the effect *before* the import tomorrow, it sounds like it'll work fine with a bit of trial and error. Your second paragraph is interesting but I wouldn't know how to "twirl open the text layer" to begin with... Thanks for your reply.
  • Hi Alex, There's a little triangle icon just to the left of the layer's name (in the Timeline panel where you see the layers as horizontal strips). Click the triangle to "twirl" open the layer and access its editable settings. Do the same for the "Transform" section and you'll see the Opacity property. Or you could just select the layer and press "T" to reveal the Opacity property, but "twirling the layer open" will reveal all the other stuff, including the "Animate" options.

    If you change the settings in the Character panel after importing, it will only apply the change to the current keyframe, so you need to change those settings before you do the import. Also, there's no way to change the opacity in the Character panel so you'll have to do that the other way I've described.
  • Hello, I downloaded the demo, copied in scripts ui panel  (mac) but when I try to open the plugin panel, I receive this error :(

    image
  • Hi Matteo, could you  open a support ticket and send me a copy of your AE preferences file? You'll find it in your user folder /Library/Preferences/After Effects. Recent versions of AE have a button in the General prefs section for revealing the pref file.  

    Then you could try quitting AE, moving the pref file somewhere else and restarting to see if that fixes it.
  • OH MY GOD, Paul! Thank you. Thank you. Thank you! After beating my head against the wall in Premiere for days trying to re-do (for digital downloads) all the subtitle work we already did (for four languages) in Encore/DVD Studio Pro for our little independent film, I finally found this. You're a fricken miracle worker. This is the best $25 I've spent ever in my life. Did I say thank you? Thank you! 
  • Thanks Benjamin. It's always good to hear when it's working well for someone!

  • I see keyframes in the Anchor Point track, and it's moving my text up and down some of the time

    is this problem solved? now I have the same problem :( + font size change but I don't know where - no keyframes for that :(
  • and there's another problem - subtitles are in the wrong order :( so line 1 in source file is the second line after import - why?
  • These issues appear to be rare and caused by bugs in After Effects. I've helped Marcin deal with them off list but if anyone else encounters these problems, please let me know. 
  • I have used this plugin for ages in CS5 and it worked like a charm. However upon upgrading to CC 2014 it now doesn't really work at all - please see video here to explain - http://youtu.be/L3-kvoUT0Hg

    My previous workflow in CS5 was to set a text layer with my desired text properties (colour, size etc) and then select that and import subtitles to inherit those styles. Now that way doesn't appear to work properly, and if I import normally, it's far too small. I have download and installed 1.41 and this script still seems to work fine in CS5.

    Thank you for any help in advance!
  • Hi Ian, I've watched the video but am struggling to tell what I'm supposed to be seeing (white text on bright yellow!). But I will do some tests in CC 2014 to see if I find any problems. You're saying that when you have a text layer selected before import, it isn't matching the style of that layer? I couldn't see the settings in your Character panel so I can't say whether it wasn't matching those settings when you didn't have a text layer selected before import.
  • Hi Paul

    Yes sorry - the video was a bit hastily put together! Exactly. In CS5, the script was visibly working and I would get the Windows spinning wheel while it was working out the break points and black background etc. What hopefully comes across in the video is that the SRT text is just dumped - it doesn't load the black background (the option is selected) and the text just ends where the first line break is. I guess it's possible the script is still working but there's no representation of this so I've assumed not.

    I'll have more of a play around when I get back into the office tomorrow and see if I can be more expansive on the issue. I definitely wouldn't rule out user error but on first glance it just struck me as buggy behavior (but alas I was running out the door as I posted!)

    Watch this space...

    ------

    EDIT:

    Looked like the PC needed a full reboot - just killing all Adobe processes wasn't enough apparently. I guess it was using some cached version of the 1.4 script. Behaviour is now as expected. Again - thanks for a great product!
  • Paul,
    So I'm curious if I'm running into a bug, or just working outside the design parameters, as it were. I've subbing a video, and I've got a Korean sub track that I'm trying to spot. However, it appears that either the script (Or AE, or the AE scripting engine) can't handle Unicode, because the non-latin characters just turn into the generic gibberish you get when attempting to run Unicode characters through a non-Unicode font/processor. I know it's not a font issue, as I can paste representative samples in. It's just running through the script that doesn't work.
  • Hi Ben, You should check to make sure the subtitle file is saved as a UTF8 encoded text file. If it's not that, please open a support ticket and send me a copy of the file you're having problems importing. Paul
  • Great plugin. 

    I'm having some problems though and hope you can help - I am importing subrips that have line breaks (ie 2 lines of subtitles) and when importing into AE it is only bringing in the first line (and blck box) - I'm sure it's something super simple (hoping...)

    Any ideas?
  • Hi Krishna, If you can open a support ticket at https://aescripts.com/contact/ and attach your subrip file and resulting AE project, I'll take a look. 
  • Thanks Paul - will do that now...
  • Hi Paul,

    First of all, I would like to thank you for your script. It has been and still is very useful!
    Hi Mohamed, I'm not sure if it's
    possible to do this at the moment, but if so I imagine you would have to
    use ImportSubtitles to import them first, and then manually use
    ArabicText to adjust each subtitle keyframe.

    I have
    spoken with the author of ArabicText and we have a plan to allow owners
    of both scripts to access this functionality from within ImportSubtitles
    in a future version, but I can't say when this will happen.

    Do you have any news about integrating ArabicText into pt_ImportSubtitles? I often have Arabic subtitles to embed and it's taking a lot of time to manually reverse the letters.

    Cheers!
  • Hi - I've used this script for various European languages, but have now been asked to do Chinese subtitling which I assum is a double byte character set. Will the script work OK and is there any real difference with the SRT file? Many thanks

  • Hi Graham, it can work with Chinese subtitles, but it depends on the text encoding for the file, which should be unicode UTF-8. However I recently created a specific version of ImportSubtitles for a customer that was having problems importing Chinese subtitles and am now looking at folding this in as an option for the main release. So please open a support ticket at https://aescripts.com/contact/ if you have any problems and I'll help you get it sorted.

    If anyone is having problems importing different languages using ImportSubtitles I'd like to hear about it. I can only come up with solutions based on the examples I have

  • @Duc-Nhi Pho, sorry for not replying sooner. I'm afraid I haven't made any progress yet in getting ArabicText integrated into ImportSubtitles. I will bring it up again with that author, but I'd also encourage you to request this on the ArabicText comments page so they are aware of the demand.
  • Hi Graham, it can work with Chinese subtitles, but it depends on the text encoding for the file, which should be unicode UTF-8. However I recently created a specific version of ImportSubtitles for a customer that was having problems importing Chinese subtitles and am now looking at folding this in as an option for the main release. So please open a support ticket at https://aescripts.com/contact/ if you have any problems and I'll help you get it sorted.
    If anyone is having problems importing different languages using ImportSubtitles I'd like to hear about it. I can only come up with solutions based on the examples I have
    Thanks for the prompt reply Paul.

    I'll quote the client and see what happens!

    Graham