CG Challenge

Mutley Eugenius

New member
OK, so here's a toughie challenge. I have just tranlated and transcribed an interview. I want to subtitle it. I have all the text in a text file. I want 2 lines of text per subtitle page, and I have already set the margins on my text editor so that I have a correct title width, and I have even cut the text up into 2 line phrases with 2 lines between each.

I have Character Generator in SE, and I want to use it for this, with a separate page per subtitle, then drag all the pages onto the clip and have them in, sequence, then tweak them to length. I may even use the markers function to hack it up.

I want to know how to import a text file into CG, with a characteristic format to the first slide, and have CG import all the text line pairs as new slides, one after the other, until the whole text file is in, then drag all the CG Pages into SE.

How do I that?
 
Just drag the .txt file from the Filebin onto the canvas - this opens a text import dialog. Edit - Oh wait, you can't do that in SE afaik. You'll have to use CG Designer.
 
I have VT [3], can I create the pages there and then bring them into SE 2.0 for sa HD Project?

What I really want to see is about a hundred pages formed in instant rapid succession, all with the same text formatting and placement, but with different text.

If that means I have to save them all as different .txt files and import them all in one drag, I'll do that, because I can make a visualbasic program to do textfile stuff very easily.

Can I do multiple drags like this?
 
I have VT [3], can I create the pages there and then bring them into SE 2.0 for sa HD Project?
I'm really not sure if CG Designer had that ability back in VT[3] or not - long time ago. Just try it and see what happens.

What I really want to see is about a hundred pages formed in instant rapid succession, all with the same text formatting and placement, but with different text.
Asked and answered. ;)

(one text file, one drag -> many title pages)
 
Last edited:
Haven't looked at the file format of the .cg files, but if they were 'XML-ish', you could create the first .CG file by hand, then write a basic program to read it, replace the text with the next two lines from your master .TXT file, write it out with a sequence number, then loop until you're done.

I'll try to look at a CG file if I get a chance tomorrow. If it's binary, it still might be possible but would take a little more backward engineering.

Best,
-john
 
Well, I tried it, but editing the text in notepad corrupts the files somehow & it won;t load at all.

I'll try a visual basic test later on to insert new text...

Hope it works.
 
I'm away from my studio today so probably won't have a chance to look at it until later. From what you described, sounds like the file is binary and that this will require a programming approach vs a script. VB should fit the bill.

I could see a demand for a utility like this that could auto- generate things like lower thirds off of a file with names and titles/positions.

If you get it to work, let me know.

Best
John
 
Last edited:
I could see a demand for a utility like this that could auto- generate things like lower thirds off of a file with names and titles/positions.
Seriously, this is already native to SE. You just drag in ASCII text file onto the canvas and choose how many lines to read before creating the next new page - done. VT[3]'s version of VT-Edit is just too long ago to recall for sure whether it was there or not (I think it was).

BTW, if loading your text file into Notepad messed it up, the original probably wasn't actually a text file (.txt) - maybe a .doc?
 
Hi Steve - your prior post confused me...

Just drag the .txt file from the Filebin onto the canvas - this opens a text import dialog. Edit - Oh wait, you can't do that in SE afaik. You'll have to use CG Designer.

Since the project Mutley Eugenius is talking about seems to be HD, I was looking to SE as the way to generate the titles - not CG Designer. I took what you said above to mean that doing a batch create like this in SE wasn't possible - thus my 'utility' comment and attempt to explore a work-around.

Sorry if I misunderstood.

-john


P.S.: Have no fear - when you speak, I take it very seriously... :thumbsup:
 
Since the project Mutley Eugenius is talking about seems to be HD
Sure, John, I'm just responding to this bit: "I have VT [3], can I create the pages there and then bring them into SE 2.0 for sa HD Project?"

If VT[3]'s CG Designer does have the text import facility of later versions (I think it does, not 100% sure), cranking out the CG pages is easy. As far as the .cg file resolution goes, I just tested this. I used LT 1.x to substitute for CG Designer - the SD title page auto-sized itself on import into the 1080i SE2 project.
 
Cool Steve - I just didn't want you to think I was ignoring what you were saying.

As for having the SD title auto-resize in an HD project, that sounds great. Was it able to do it without distorting the aspect ratio?

-john
 
Cool Steve - I just didn't want you to think I was ignoring what you were saying.
No worries, John, I'm not touchy. One could certainly take another approach (such as writing an app), I'm just not convinced that the effort is required yet.

Was it able to do it without distorting the aspect ratio?
I just used a 4:3 SD .cg file, so it was stretched horizontally - but hardly noticeable because the content was all vectors anyway. You could avoid that by creating the .cg files in 16:9 SD mode, which is what I'd have done if I'd thought a little longer. :)
 
BTW, if loading your text file into Notepad messed it up, the original probably wasn't actually a text file (.txt) - maybe a .doc?

Christ, Steve, don't you ever sleep? I was up all night sailing the ship around, so I have an excuse, but you...?

Anyway, I was trying to edit a .CG page in notepad by changing it to a .txt to edit it then back to .cg to load it, but it didn't work. Converting to notepad changes the character set sufficiently to make it invalid.

But back to your suggestion, ASCII text, I didn't know about that.
I tried making a few test lines in notepad and saving ita as an .ASC file, then dragging it into a blank CG, but it just kicked it out. Is there something I have to do first? Like, how do I delimit 2 lines of text per page?

BTW, I'm going back to bed.
 
I was up all night sailing the ship around ...
It's a tough life, but someone's got to do it. ;)

I tried making a few test lines in notepad and saving ita as an .ASC file, then dragging it into a blank CG, but it just kicked it out. Is there something I have to do first?
Try a simple .txt file. If it works, a dialog pops up when you drag it onto the canvas that allows you to set various things (like how many lines per page), justification, etc.
 
Open the full sub title script document in Notepad. This is the one you have with all the dialog and double space between the two lines of text you have referenced in your post. Next open a new notepad and place them side by side. Now copy and paste the first two lines of sub title text onto the empty notepad (lets call it the left notepad the full script the right notepad) or the left notepad. Now do a save as and for ease of use, first create a new folder in your NewTek\Speededit2\effects\titles folder and name it sub titles. Then make a new folder in this folder and call it the project name (I like to keep things very organized). Now name the file st01 and hit enter to save it. Now go to the right notepad and select the 2nd sub title and copy it. Now select what ever is in the left notepad and press paste giving you only the new 2nd sub title. Now use file save as and change the 01 to 02 and save. Continue doing this till you have all your two line sub titles in text files sequential for easy use in SE 2.
Now drag a Title Page.cg into your project and then open the control tree. This is where you normally type text for your titles. With the control tree edit text window open, go to your folder sub titles which should be in the same folder where the Title Page.cg laid. Double click on it to open reveal the project sub title folder and then double click on it to reveal all the text files you made via Notepad. Take st01.txt and drag it right onto your Control tree text edit window and you will be presented a dialog box asking you what you want to do. For now, just hit OK and you should now have this first sub title imported. Now change the font to the one you want all the sub titles to use and then size it to what you want all the sub titles to mimic. Now use the center and bottom alignment buttons to position the text. This bottom alignment of SE may not be the desired position so open the position in control tree (Text [Sub title text]) and change the Y till it is in the desired position (I find 440 in the Y to be a nice location). Do not touch the X value.
So I'll call this basic text input into SE 2 for sub title or any title for that matter. If you want, you could create a preset for this in the tool shed as well as a preset in text styles tab for the size, color and font. You could then repeat this process for all the title pages you need for each sub title and then position and change the length on the time line for each sub title to match the dialog in the video clips.
But if you know me by now, I like to consider myself a SE power user so lets crank this up.
Leaving the first sub title with all the proper attributes you just assigned it (position, font type, color, center etc.), go back and drag the next sub title st02.tx into the same title page.cg that is being viewed in the control tree window like before. Again just hit OK and the 2nd sub title is now in the same title page. This time, it retained the font type and size of the first text which saves time and why you need to do the work on the first one only and after that all others imported into the title will format correctly. So now use the center alignment and then the bottom alignment (Please make sure the first one is aligned using the bottom button and not manually positioned as we need to insure all sub titles are exactly at the same Y position and the bottom button alignment makes quick work of this).
Repeat this process till you fill the title with all your sub titles any they will be stacked up on each other. In the control tree, you can distinguish between each sub title easy as they are on a line per line in order of import which should match your naming order/sequence. So now comes the key frames. Expand the tree for the first Text [sub title] and enable the check box on the alpha and change the control tree tab view to spline. Making sure the title on the time line is selected, open selected clip properties or use F8. Change the mark in and mark out point to match the length of the video clip the sub titles will be placed under. Many people make the mistake of just dragging the length of the title to stretch it but that will not change the true length in time. As a side bar, do this with the spline window open and stretch the title to a new length and release the mouse button. notice the end time on the spline window does not change. All you have done is change the speed of the clip properties. This is revealed when you now open selected clip properties and mark end time stood the same but the speed has decreased. Not what we want if we want true key frames match true time. So back on topic, change the mark end time to the desired new time and press OK in selected clip properties to exit it. You will now notice the end time in the spline window reflects the new mark end time. Move the time line to the start of the title and change the alpha value to 0 and press the empty circle next to it to make it a solid white. This creates a key frame for this value at the very first frame of the length of the title clip. next advance the time line to the point you want this first sub title to appear. Now hit the left arrow key on your keyboard to go back one video frame and then press the circle next to alpha to create a keyframe. Now press the right arrow key to go back to the frame you want the sub title to appear and change the alpha value to 255. Now advance the time line to where you want the sub title to disappear and then use left arrow to go to the frame before and make a key frame (clicking on the circle to make it solid white) and then use right arrow key to move one frame forward back where you want it to disappear and change the value to 0.
Now we have the first sub title key frame completed but before we move on, I want you to use the left mouse button to drag and select all the key frames except the very first one that started at zero for the alpha and then copy them. SO we are clear, you would copy the 2nd key frame which has a value of zero and then the next key frame which is one frame advance in time which is value 255 and the next key frame which is also 255 and the last key frame which is zero. Now close this Text [] line/first sub title and open the next one and enable the alpha to display in the spline window. Advance the time line to where you want this next sub title to appear on screen and then left arrow key to back up one frame. Right click in the spline window and choose Paste (At time bar) or CTRL+SHIFT+V. This should paste the four key frames that make the alpha go from zero at first key frame to full, 255 and the very next key frame and then hold for a duration and then back to zero. So now use right mouse to drag and select the two last key frame. Now holding the shift key down, slide the key frame to make this next sub title disappear at the right pint in the time line. Now close it and open the next sub title and preform the same steps. Continue until you have all the sub titles appear and disappear at all the right times.
Last because like I said, I like to be organized, go to the section at the bottom of the time line and back space over Title Page.cg and rename it sub titles. Then drag it into the folder that has all the text files. This will remove it form the time line/project so just drag it back on the time line or just press undo CTRL+z and it will go right back into the time line/project but you now have the whole sub title section saved in the proper folder just in case.

I normally would have just did a quick video tutorial to show you this and I still may later in the week but can't right now.

Take care,
 
Jose,

I'm sorry to put you through writing all that, but it tells me what I am already having to do. I am trying to get away from all the constant copy-pastes that I am having to do. Understand, I am doing a LOT of subtitles right now.

But Kris from KLTV just hit the nail on the head. Thanks Kris, this is what I need. Looks like I have to upgrade to VT [4] to do this though.

I never explored toaster scripts, looks like a whole chapter of my life got skimmed through there.

By the way, the other idea that I really liked was from John Mahoney,

He gave me another idea which was to write a VB program to edit my Photoshop file that I am currently using and process numerous iterations of it sequentially, each with the dirfferent text lines. Then, I can use a photoshop batch automate function to convert 200 PSD files to targas while I have a cup of coffee.

Then, group import onto the timeline, and bang.

The really really hot thing about this with SpeedEDIT is that I can turn the whole batch of subtitle overlays into one subproject, stretch it to the length of the interview, and they are close to in the right place to begin with. Then...(ha Haaa!) play the file and drag the border between each pair of subtitles to the right spot WHILE IT'S PLAYING and then review it. With a fast enough machine, like I have, you can do the whole timing customization in one or 2 playthroughs.

I could do it with CUT TO MARKERS but you have to see the words on the screen which you can't easily do with this.

Thanks guys, I think I'll be all right now.

You've all been supremely helpful - Man IS basically good.
 
Last edited:
Looks like I have to upgrade to VT [4] to do this though.

Maybe, maybe not. I think it would work back in the VT[3] days as well, at least part of it. I don't see anything obvious in the script that I don't remember being in the original VT[3] ToasterScript stuff. I'd try it and see if you get any ToasterScript errors when you attempt it. It shouldn't hurt anything.

Kris
 
So close but yet so far...

Kris, thanks a lot, this function is exactly what I'm looking for, and Dude, I'm SOOO Close. But VT[3] cannot use VT[4] toasterscripts. I get errors on running.

So I have to get a hold of Aussie (NewTek Script Programmer) & ask him how to modify the script to run in VT[3] if poss.
 
Back
Top