Spring 2007 Homework 3 Questions
Questions?
I tried to open MovieMaker after downloading it by double clicking it from the folder I have it in. It just flashes up on the screen and then disappears. What am I doing wrong?
I have added an append box at the bottom of the page. This means you don't need to edit the page to add to it. Just type your text into the box.
i tried to use the add text function to add my name to the movie for part 1. It does not appear when I play the movie, but the function runs normally. Is it not visible b/c there is a black background in the .mov file?? If so, how do I change it?
To change the background from black to some other color, add a big filled rectangle. Another thing you might want to do is to make sure that your name is surrounded by double quotes ("") not single quotes (''). Hope that helps! :) Toni Walden
You can also change the color of the text with addText(< picture >, < xpos >, < ypos >, < text >, white)Cedric Stallworth | |
| Note that ypos is the y-location of the line on which the text appears. If you set this = 1, you are writing along the top of the screen and will only see the bottom of the descender characters like "y" or "g". Experiment with the ypos argument. 10 should make your name appear correctly. 20 will give you a thin margin above it. Colin Potts |
Hw3 didn’t specify which frame rate we suppose to use. 30pfs?
woops... i mean 30 fps?
The Movie Maker provided on the website for Windows is not working for me. Whenever I try to create a movie, a lot of text is printed in a command prompt window. Almost every line is followed by (unknown source), and when I try to browse for my movie, it does not get created in the Movie Maker folder (or any other folder for that matter). Is the program bugged? My operating system is Windows XP: Media Center Edition with SP2. Thanks
| It sounds as though the program can't find any of your pictures. (I assume that is what "unknown source" means.) Did you browse for the starting and end file in MovieMaker or did you type in the file path manually into the text box? If you typed it, you may have made a mistake. If you browse and then select by clicking, you can be sure that the file really exists. If the problem persists, put the jpg files in a folder on a portable drive and see a TA. You may need to have someone else generate the movie for you and transfer it back to your computer. Colin Potts |
I'm not sure how to use MovieMaker on a Mac. I tried to follow the directions that were provided on the website, but they don't really make sense to me. I'm able to choose a starting frame and ending frame, but when I click on "Create Movie", nothing happens. Can someone with a Mac help me?
| The only thing that is complicated about MovieMaker on the Mac is running it – navigating to the directory using the terminal. Once you run MovieMaker – and you obviously are – you are running the same program as on the PC. So well done, even if the instructions didn't make sense, you followed them correctly! Are you remembering to append ".mov" to the file name? MovieMaker is picky about this. When you click Create Movie, you should get a lot of confirmation messages printed in the terminal window. The .mov file will be in the same folder as MovieMaker itself, not in the same folder as your pictures. Colin Potts |
I'm having the same problem with the movie maker actually making my movie. I have QuickTime on my computer, but nothing gets created in my folder movie1. And I did remember to add .mov in the box when I get prompted to create a file name.I also have Windows XP (home edition) Help! ~gtg186q
| MovieMaker saves the movie in the same folder as MovieMaker itself. Colin Potts |
what is the prehomework and where do i find it?
If i use an external image as a base for my movie should i include that .jpg file when i turn in the homework?
| Yes. This is an educational fair use. However, you shouldn't use copyright media outside of the course – e.g. don't upload it to YouTube! Colin Potts |
When I download and unzip Movie Maker I don't have a .exe file, I have a command file. The program eventually comes up, but how do I get the exe file? (I have microsoft) The movie maker for windows is a lot more complicated, so I'd rather not use that.
| That's fine. MovieMaker is actually a Java program, so you should have MovieMaker.bat and MovieMaker.class files. (This is from memory, and I hope I have this right. Either way, you won't have an exe file.) If the program starts up, you aren't missing anything. Colin Potts |
I'm also trying to get moviemaker to work on my mac. It seems to download but doesn't run when I open the folder and click the icon. It opens a textedit box with one line of stuff, but that's it.
Professor Stallworth - Can you post the movie function we were looking at yesterday in class for a reference for the homework? I thought you said that you would do this. Please let me know where to find it if you already have or when you do. Thank you.
The Jes program is creating empty picture frames when I run the function I've written. It appears to be automatically attempting to create the pictures with my fireworks program; I would try creating the frames with another program, but I have no idea how to tell Jes with what program to create the pictures. I know the code is working properly, because I've run the program on someone else's computer and it creates the proper frames, but on my computer it creates 250 or so picture frames that contain no data. I also know what file the pictures are going to, but obviously the movie maker can't create a movie with frames with no data. It's the oddest thing, and I would really like to be able to work on my own computer. Any help would be greatly appreciated.
i cannot get the moviemaker to work on my mac it downloads to a folder and none of the files execute the program.
I checked in the MovieMaker folder and there was still no quicktime video. I stored movie maker in its older folder within the JES folder I have so that I wouldn't have to unzip the files every time.
What am I doing wrong????
(I'm having the same problem with the movie maker actually making my movie. I have QuickTime on my computer, but nothing gets created in my folder movie1. And I did remember to add .mov in the box when I get prompted to create a file name.I also have Windows XP (home edition) Help! ~gtg186q
| MovieMaker saves the movie in the same folder as MovieMaker itself. Colin Potts |
I have my code for writepic perfected but the thing is no picture shows, I put show(pic) to make sure there is an image and there is one. So why is writePic drawing a blank (no pun intended)
| Are you having the same problem as the person below? I don't understand your problem. Amanda Bennett |
My program creates the files and names them correctly. When I go to look at them individually, my picture previewer says that no preview can be generated. There is no data in the files my program creates. Also, when the program is done running the bottom area of JES gives me a comment that reads "Note:There is no file at..." for each frame. I've tried to make movies out of them anyway using MovieMaker and it lets me specify the starting picture, ending picture, frames per second, etc. I've remembered to include the .mov extension as well. However, after I do all of this the black text box thing in MovieMaker gives me a bunch of text, most of which ends in the phrase "unknown source". It does not make the movie (probably due to the fact that there is no data in the files JES created). To make sure that it wasn't just my code, I downloaded some of the code from class and ran it. It did the same thing to me again. I don't know what is wrong.
| When you use writePictureTo(), try to write to a folder directly on your C drive (such as a folder with the path C:\Movie). Try that and see how it works. Amanda Bennett |
When you say we need to turn in any pictures needed to make our movie work, do you mean the folder containing the frames for the squareBounce function?
| No, if you are using a background or sprites for the function myFirstMovie, you will need to turn in all of those. your squareBounce function should generate everything on its own without outside pictures. Amanda Bennett |
how do you specify so that in the WritePictureTo function it will go where you want it, we copied down the writePictureTo(picture, filename(frameNum)) but it doesnt work. What should we do?
| Do you have the function filename() defined? that is not a predefined function in JES. the second input to writePictureTo is a path, so you can use pickAFolder and then add the desired filename following the folder address. Amanda Bennett |
I am trying to add my third box to part 1 of hw. All of a sudden for the third box it doesn't like this command x3 = x3 + x3_step when I used it perfectly for x1 and x2. It says "The error was: 'x3_step' Local name referenced but not bound to a value." I try to define it somehow and then it changes the direction of the box that it should go in. Why does it only start getting mad at this on the third box?
Can we put our name in the middle instead of the upper left? (homework 3 part 1) It will look so much better with what I'm doing...
| You mean in the interest of art? Sure. Bend the rules with utter impunity. Colin Potts |
my computer shuts down during the execution of my program - at first i thought it was just a problem with my computer but ive noticed that it always happens while my program is executing - it is a lot of processing and it takes about 3-5 for it to complete i think - but could that cause it to just shut down??
| Weird. Very Weird. I would recommend showing it to one of the professors or taking it to a TA (assuming its a laptop). If it's a desktop try running the code on a friends computer and seeing if the same thing happens (then we can definitely rule out the fact its not your computer). Toni Walden | |
I have my code written and when i look at the files in my directory folder and view the frames, they are working correctly and are all in order. yet when i open the movie maker and try to set the strating and ending frame, the frames are all our of order. they are numbered like "frame01" through "frame05.jpg" and then all the sudden it goes "frame50.jpg" through "frame59.jpg" and so on. i have tried using the writePictureTo method from the pong example and then other method i learned in class but none of them change my file orders. what do i do?
| Ok, so first thing is you are going to HAVE to have filenames of the same length. I could go into a long detailed explanation why, but I'll save you the semi-boring details. Think through the pong example code - the code is generating 99 frames. This means you'll have filenames like what you described above. For the homework, you'll have to generate at least 240 frames - so you need your filenames to be like "frame005.jpg", "frame050.jpg", and "frame100.jpg" (cough conditional statements cough). Another thing you'll want to be careful of is fixing your frame writing function and then running your code without deleting the images in the folder you are writing them to. Hope this helps! :) Toni Walden |
also when i click create movie it says "cannot create movie because starting frame and ending frame do not match" what does that mean?
For our squareBounce movie, as long as the box bounces three times and changes color according to the homework rules, does it matter what happens after that as long as the movie lasts 8 seconds?
What happened to addOvalFilled?? It's in my help file for picture functions, but it appears to have been removed. That makes me a saaad panda. :( Is there any other way we can do a filled oval? Because drawing an infinite amount of rotated squares doesn't sound fun.
| I took a look at the source - The addOvalFilled function has been commented out. I uncommented it in my copy, and it works fine, but I'd hate to start telling people to uncomment things without knowing why they were removed in the first place - this'd be a question for someone who wrote it. For now, try adding this code to your function and calling it like you would addOvalFilled. - Bryan Ake |
def addOvalFilled1(picture, acolor,x,y,w,h):
if not picture.__class__ == Picture:
print "addOvalFilled(picture,acolor,x,y,w,h): Input is not a picture"
raise ValueError
g = picture.getBufferedImage().getGraphics()
g.setColor(acolor.color)
g.fillOval(x - 1,y - 1,w,h)
On the instructions for part 2 of the hw, he just tells us to be creative...how creative do you mean for us to be to still get an A?
The sunset code that was used in lecture is not working for me. I get only one frame when I run the program. Is there still a deliberate error in it?
| Code shouldn't work for most people but not for you. Did you copy it from the slides and code page correctly. The writePictureTo() call should be inside the loop so that it is called for every frame. Colin Potts |
I'm having the same problem as a few of the others that have posted on the page. My movie is not showing up anywhere after being created. The only response that has been given as an answer (twice) is that the movie is created in the same folder as moviemaker. Well, that does not seem to hold true. Is there any other possible fix to this problem? -gtg337x
| Are you adding .mov to the end of your movie name? Toni Walden |
| Another thing that you could do is (for non-Macs): Go to Start –> Search. Type in the name of whatever you named your movie, and let the search run on your entire computer. See if it comes up. If it does, then look at the location (it will probably be in the 2nd or 3rd column). If not, then there is probably a problem with the way you are entering your frames into your moviemaker. They should show up wherever your moviemaker is made, but if not, then make sure (as Toni stated), that you are adding .mov to the end of your movie name. Best of luck! Sweta Vajjhala |
Does rotating the canvas work ? Just asking because I'm about to try it and I don't want to do it if it won't.
The function that is up def bouncingCar does not even work when i put it directly into jes and set a media path for the car. IT has so many errors and will not run
I had this same problem:
The Movie Maker provided on the website for Windows is not working for me. Whenever I try to create a movie, a lot of text is printed in a command prompt window. Almost every line is followed by (unknown source), and when I try to browse for my movie, it does not get created in the Movie Maker folder (or any other folder for that matter). Is the program bugged? My operating system is Windows XP: Media Center Edition with SP2. Thanks
But i went to a friends computer to try and it did the exact same thing. I just copied and pasted the code directly from the website so I don't know why this wouldn't work. Ive tried it on more than two computers and its the same thing every time.
| It sounds to me like you wrote the frames in a protected folder. Create a folder on your desktop - run your code again in JES and set the media path to the folder on your desktop. Try using Movie Maker to make a movie out of those frames. Hope this helps! :) Post again if it doesn't! Toni Walden |
I had the same problem and had someone who is good at cs look at it. They edited the pre-homework code and it works fine for me now. They changed the filename function to this:
def filename(n):
if n < 10:
stem = r"C:\Temp\pong0" + str(n) + ".jpg"
else:
stem = r"C:\Temp\pong" + str(n) + ".jpg"
return stem
Where "C:\Temp\" is any directory you want. Hope this helps.
| Thank you. I had forgotten the r in front of the quotes, which is for PC users. (The directory separator is a back slash not a forward slash). BTW, I surrounded your code with code tags so that it indents correctly. Colin Potts |
I have been trying to open up the movie maker program and even though the file is located on the desktop (it shows when i type ls in the terminal window). It just keeps saying "No such file or directory"... What am I doing wrong?
For part 2, I am using pictures that are smaller than 300 X 300 pixels. I can change them, but it distorts the picture. Is this what I should do anyway?
i am trying to get an image to slowly move into the frame so i was using the copy function and had a if statement that read if x0: pass else: change the target value pixel, but no matter how i set that up the computer insists on trying to get negative target value how can i write the code so that as it copys the image it ignores target pixels of negative values and only starts copying once the target pixels are positive?
I am not able to upload hw3part1.py, hw3part2.py, squareBounce.mov, and myFirstMovie.mov onto the rSmart CLE:CS1315 page; it gives an alert saying that the upload size limit of 20MB has been exceeded. My .mov files are 8 and 10 seconds long.
| Oh dear. I wasn't aware of this limitation. Try uploading the code files and the smaller of the two movies. If that fails, just upload the code. You will have to make arrangements with your TA to give him or her your movie files (e.g. bring them on a memory stick to recitation). Explain what happened. Colin Potts |
My code for the first part works fine and runs and save the frames, but it still says "There is no file at C:\Documents and Settings\Administrator\My Documents\CS\HW3\pong001.jpg" for every frame. Does this matter even though the frames are there anyway?
| This is just a warning to you that the files don't exist when you call getMediaPath(). Python doesn't know whether you are going to write to these files, in which case they will exist, or whether you are going to try to read them, in which case this message would be a helpful warning. Since you are creating new files and writing them, you don't need to pay any attention to these messages. Colin Potts |
if x1 >= 250:
x1_step = -4
color = red
For the first part of the homework, why does the color of the box not change with this if statement?
| That would very much depend when this block of code gets executed and what you do later. I suspect either that it's not being executed when you think it should be or that you never call addRectFilled with the color input. Colin Potts |
Python makes my head hurt!
Sakai says my hw is late, but we did have until 11:45 tonight right?
Will we get docked points if our program takes about 10 minutes to run & make the frames?
| No. But to help your TA plan, you might send a message to him or her that your program takes this long run. Of course, if you are prepared to wait for nine years for your grade(according to Moore's "Law") your program will take only 10 seconds to run on comparable equipment then, so there would be no problem. Colin Potts |
Link to this Page