FORUMS: list search recent posts

Solved... kind of. (Automatic generate of subtitles for DVD using Premiere's Speech Analysis)

COW Forums : Adobe Encore DVD

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Tyris Audronis
Solved... kind of. (Automatic generate of subtitles for DVD using Premiere's Speech Analysis)
on May 10, 2013 at 11:11:05 am

Ok, so I had 4 days to author a 1.5 hour DVD with subtitles, and no script. I'm a bit masochistic so I decided to try to make speech recognition work for Encore subtitles. Well, I got it to work (after VERY much trial and error), and here's what I did for the workflow. I figured I'd share it to start a discussion and maybe all of you can help me tweak the flow and make something that has a more acceptable kluge level. THis assumes you know where the buttons are. It would take WAAAAY too long to give you a "beginner" tutorial. So just google what the buttons are if you don't know.

First, don't even attempt speech without a script. So... I had my uber-fast typist of a wife transcribe the DVD into a word doc. (She's vowed to never do it again, so I'm going to need an intern in the future... lol).

The word doc was in standard format with normal punctuation and paragraphs.

Copied and pasted that into Story. Now, there are some requirements for using the script in Premiere so here are some tips:
1) Delete the title page (not necessary, but makes it easier to minimize the BS

2) Use a scene heading (you only need one)
3) NUMBER YOUR SCENES (assign scene numbers)

Next, with your rendered movie, first assign the scene number to the metadata in the project window in premiere (make sure you put a DOT after the number ("1.").

Now analylize the speech.

Save your project and go to After Effects

Make sure that "Write XMP IDs" in unchecked in your preferences in AFX, and that "Create Layer Markers from XMP data" is checked

Import your movie (the metadata for the analysis has already been written)

Create a PARAGRAPH text layer, and put the following expression on the source text parameter (script gotten from the "XMP metadata in Creative Suite 4 Production Premium" by Dan Ebberts @ Adobe):

//****************************************************
// This expression creates a text string consisting
// of groups of five marker comment fields
// (separated by spaces). Each text string is displayed
// when the current time has reached the first marker
// of that group.

L = thisComp.layer("LAYER NAME GOES HERE");
max = 5; // number of words to display

n = 0;
if (L.marker.numKeys > 0){
n = L.marker.nearestKey(time).index;
if (L.marker.key(n).time > time){
n--;
}
}


s = " ";
if (n > 0){
base = Math.floor((n-1)/max)*max + 1;

for (i = base; i < base + max; i++){
if (i <= L.marker.numKeys){
s += L.marker.key(i).comment + " ";
}
}
}
s

Ok, so the "max" parameter is how many words at one time it writes. I used 10 instead of 5 because my speaker talks way too fast.

Add a stroke to the text style of black (white text)

Turn off the visibility of the original video file so only the text is on the screen

Add a red layer to the background

Save and close AFX

Open Media Encoder and load in the AFX comp. RENDER A FULL VIDEO (full framerate). Why? Because if you skip ahead, you'll skip over markers and miss some of the subs.

Now, bring in the video of subtitles in Media Encoder.

Export it out as a TIF sequence at 1,5,or 10 FPS (depending on how fast your speaker talks... choose the lowest acceptable frame rate. Or you'll end up with SUPER LONG import times on Encore

After it's exported, use this script I created wrote, and published online to generate an image script for subtitles: http://www.audronis.com/demos/SubScript/

(What this does is takes in all of the parameters for your subtitles and gives Encore the images and timecodes for where to put them)

Copy the generated script, and paste it into a txt file (save it with UTF-8 encoding)

In encore, import your original video as a timeline, and open the timeline

Create a subtitle track, right click the track, and "import subtitles" as "image script" (load the txt file you just saved)

Use the eyedropper to select the red from the BG, for the background, the white of the text as the fill, and the black outline as color 2.

Continue through with defaults, and it's importing!

This could take a while depending on how many images were generated. I had over 28,000 (1.5 hours at 5 fps), and it took me nearly an hour to import.

THIS IS KLUDGEY! I don't deny it. So, if there's a better workflow available for free... let me know. After all, that's why I posted it here. Eventually, when my schedule frees up, I'll post a video of the whole process online. I'm just too f-in tired right now, and it's 4am.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]