Render and upload

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

I am pondering a script and I wanted to run it by the experts here to see if it is feasible before I dive into it.

We have a client site where we can upload quicktimes and other files for the client to log into and view. Can javascript interface with web pages and follow links and enter data into forms? I want to write a script that takes the current comp and renders a small quicktime and associated thumbnail image. Then based on either pre set values or text boxes take the data and files and upload them using the form on the website.

Is that do-able?
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

It must look pretty dumb or reply to yourself before anyone else does. But heck, I've never been shy.

I started tooling around with the AE side of the script I mentioned above. I've run into a little snag though. My script adds a comp to the render queue and sets the output module to a jpeg file template. I change the filename with this line:

curOM.file = new File(renderLoc.toString() + "/" + myComp.name + "_Thumbnail.jpg");

It appears to set the filename to something like this "Comp 1_Thumbnail.jpg" It looks that way in the render queue and it returns that value to an alert box. However, the file gets the name "Comp 1_Thumbnail.jpg0155" It puts the frame number on the end of the file. Can anyone give me any tips on getting around this?

Thanks.
User avatar
Disciple
Posts: 137
Joined: June 5th, 2004, 8:05 am
Location: Los Angeles, CA
Contact:

byronnash wrote: We have a client site where we can upload quicktimes and other files for the client to log into and view. Can javascript interface with web pages and follow links and enter data into forms? I want to write a script that takes the current comp and renders a small quicktime and associated thumbnail image. Then based on either pre set values or text boxes take the data and files and upload them using the form on the website.
Is that do-able?
Byron
From what I know
AE Scripting can:
1) read a file and get data from the file.
2) modify comp by using data from the file, and render a small QT mov.
3) copy the file to a server.

If you use a webpage which can export data to a text file, you could probably pull this off.
The thumbnail bit I have no idea right now.

Also,
Scripting can communicate other computers via TCP/IP by using Socket object. However I don't know enough about this object to make sure it fulfills your needs.

I think what is not clear in your post is : do you want to have users fill in a form and based on the information in that form you will render out a comp, or is that you want to render out a comp, upload it, and upload information about the rendered movie with associated data that would then posted to the website?

Alex
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

Here is an image of the upload page I'd like AE to interface with.

Image
And this is the next page where you find the file and also the thumbnail.

Image

I've gotten the easiest part worked out already. My script takes the current comp, adds it to the queue and applies the correct settings. It also takes the current frame and sets that up to render a small jpeg thumbnail. I haven't done anything with the socket yet in scripting. I think ideally, I would like a form to pop up in AE that asks all the same questions as the form above does. It would store the data and then automatically enter it into the form and load the file rendered. The purpose would be to be able to run one script in one place to get something rendered out and uploaded to our client site.
User avatar
Disciple
Posts: 137
Joined: June 5th, 2004, 8:05 am
Location: Los Angeles, CA
Contact:

That's something pretty powerful and interesting your trying to do Byron.
I think that part of it falls out of the scope of AE Scripting though, but i might be wrong.
For example, I don't see how you could fill in a form in AE that would connect to a remote database and populate the appropriate records? I guess you would need to have AE write the data in the form to a text file, probably formatted in a certain way according to your remote database, and have another app enter the data into the remote db.

Can you give me some info on what type of database you have on your server and what languages are being used? Is it MySQL with PHP, or something else? I have some geek friends who work with that type of stuff and who might enjoy the challenge.

As for the first part of the script, I think you need to create a palette with text fields, with an option to save the user data to a text file. I think maybe Paul or Impudent could help on that, as I haven't really explored palette creation and management at all.

Alex
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

Yeah, I'm afraid it might get a bit too complex. We didn't create the web database here. I think they use php but I'm not up on web tech at all. The best way I thought it might work is if my script could create the same file or entry that the form does and just bypass that form altogether. That's probably way over my head though.

One thing that would be nice is this though. How can I get the script to open a browser and a web page? The least I could do is bring up the web form for the user. I've looked at the socket object a bit but it doesn't say anything about actually opening a browser.

Thanks.
User avatar
Disciple
Posts: 137
Joined: June 5th, 2004, 8:05 am
Location: Los Angeles, CA
Contact:

byronnash wrote:Yeah, I'm afraid it might get a bit too complex. We didn't create the web database here. I think they use php but I'm not up on web tech at all. The best way I thought it might work is if my script could create the same file or entry that the form does and just bypass that form altogether. That's probably way over my head though.
The thing is, developping something like this would be an amazing tool for a lot of people out there. You could even sell it if it was solid enough. I think it would be worth a shot. Is there a way for you to find out what the database is made of ? Or maybe I could implement one myself, that way we could collaborate and try to set this thing up. I'm pretty busy, so we be a bit slow, but why not. I have the possibility to install unlimited SQL databases at one of my hosts, and I think he should be running the latest flavor of PHP.
byronnash wrote: One thing that would be nice is this though. How can I get the script to open a browser and a web page? The least I could do is bring up the web form for the user. I've looked at the socket object a bit but it doesn't say anything about actually opening a browser.
.
Hmm, I wonder is this isn't more about having a script talk to an application, which would probably require a call to another script, hence an applescript on the mac, or a DOS shell script on Windows. This is a bit tricky as I suspect that even though you can use these to send scripts to AE, I'm not sure you can go the other way. Unless you can make it a post-render action.

Anyways, I think this is worth looking into. I'll check with my web coding friends what they think of this problem.

Alex
Post Reply