Closed GoogleCodeExporter closed 8 years ago
Hello Carlos,
This was the first thing I tried when the project became open-source yesterday
:) I
was successful in doing so and have been cleaning up my change before
submitting it,
but it will be updated soon.
To create an input file for a SVN repository, you can run this command inside a
checkout folder.
> svn log --xml > my_repo_log.xml
You will then need to edit the INPUT_FILE variable inside code_swarm.pde, which
looks
under the 'data' folder in the source directory.
Original comment by cgalvan1...@gmail.com
on 20 Jun 2008 at 1:57
Original comment by cgalvan1...@gmail.com
on 20 Jun 2008 at 1:58
Ok, thanks :)
BTW, I run Processing on Windows and to run code_swarm I have this error.
Screenshot: http://img46.imageshack.us/img46/3037/errorcodeswarmia6.png
Great project!
Original comment by carlosj....@gmail.com
on 20 Jun 2008 at 2:41
I just checked in my addition to handle SVN logs. Let me know how it works out
for
you and I will close this ticket once you've verified that it works for you :)
Original comment by cgalvan1...@gmail.com
on 20 Jun 2008 at 2:42
Ah, I got the same error when I first tried to run the project.
What I did was download the Java Runtime Environment 5.0 from here:
http://java.sun.com/javase/downloads/index_jdk5.jsp
And then I downloaded Processing(without Java)
I think the problem was that the PriorityQueue class wasn't introduced until
Java
5.0, and the embedded version of java that came with that Processing download
was
lower than that.
If that works for you, which I think it will, it may prompt you to create a
code_swarm directory to run the program. I'm not sure why it does this since I
have
just started looking over this code as of yesterday :) but if you do as it says
and
then copy the structure of the trunk into that new folder it should run great!
Let
me know if you run into any more problems.
Original comment by cgalvan1...@gmail.com
on 20 Jun 2008 at 2:52
Oh, I forgot to mention, you need to add the verbose flag when you call svn log
so
that it will also extract the author of the commit and what they changed, like
so:
> svn log --xml -v > my_repo_log.xml
Original comment by cgalvan1...@gmail.com
on 20 Jun 2008 at 3:03
> What I did was download the Java Runtime Environment 5.0 from here:
> http://java.sun.com/javase/downloads/index_jdk5.jsp
> And then I downloaded Processing(without Java)
Nothing, not working, I don't understand :(
There are some settings or do something in Processing?
Original comment by carlosj....@gmail.com
on 20 Jun 2008 at 3:31
What we could do now is include the svn log of this project as the sample data
file.
Original comment by michael....@gmail.com
on 20 Jun 2008 at 3:32
Hm, do you have any other versions of Java installed that are getting picked
up? Did
you try restarting your computer after you installed the new Java version?
Just to be sure the correct version of Java is getting picked up, you can run
this
simple app on the Java site.
http://www.java.com/en/download/installed.jsp
Let us know what that site returns. Also, Michael, what would you suggest to
be the
best way for someone to install Processing? And I think it would be a great
idea to
include this project's svn log as a sample for now :)
Original comment by cgalvan1...@gmail.com
on 20 Jun 2008 at 3:41
>Hm, do you have any other versions of Java installed that are getting picked
up? Did
> you try restarting your computer after you installed the new Java version?
I have the Java 6 Update 6. The site returns: You have the recommended Java
installed
(Version 6 Update 6). And I have also tried to restart my computer.
Original comment by carlosj....@gmail.com
on 20 Jun 2008 at 3:59
From the screenshot it looks like you don't have the other classes, like Node,
PersonNode, etc. Did you download all the .pde files and put them in the same
directory?
Original comment by michael....@gmail.com
on 20 Jun 2008 at 4:01
> From the screenshot it looks like you don't have the other classes, like Node,
> PersonNode, etc. Did you download all the .pde files and put them in the same
directory?
omg, that I'm stupid! :$
When open code_swarm.pde creates a folder called code_swarm and then copy all
the
files/folders from codeswarm-read-only/prototype to that folder and works!
I tried to svn codeswarm and I have this error:
java.lang.NullPointerException
at Temporary_5347_8714.update(Temporary_5347_8714.java:258)
at Temporary_5347_8714.draw(Temporary_5347_8714.java:133)
at processing.core.PApplet.handleDisplay(PApplet.java:1465)
at processing.core.PGraphics.requestDisplay(PGraphics.java:690)
at processing.core.PApplet.run(PApplet.java:1562)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at Temporary_5347_8714.update(Temporary_5347_8714.java:258)
at Temporary_5347_8714.draw(Temporary_5347_8714.java:133)
at processing.core.PApplet.handleDisplay(PApplet.java:1465)
at processing.core.PGraphics.requestDisplay(PGraphics.java:690)
at processing.core.PApplet.run(PApplet.java:1562)
at java.lang.Thread.run(Unknown Source)
I tried with another svn that has more commit and works. Ah, how to I can
record a
video of the output?
Original comment by carlosj....@gmail.com
on 20 Jun 2008 at 4:42
Glad you got it to work! :)
I'll look into why the svn of codeswarm didn't work.
To create a video of the output, all you have to do is add a few lines at
various
places in the code_swarm.pde. Here is the link to the page on processing's
site that
tells you what to add:
http://processing.org/reference/libraries/video/MovieMaker.html
For the quality, I suggest SORENSON and LOSSLESS, but Michael probably knows of
a
better combination :)
Original comment by cgalvan1...@gmail.com
on 20 Jun 2008 at 4:50
I added these lines to each places (setup(), draw(), keyPressed())
But when running does nothing and nor returns error.
This is my file code_swarm.pde with MovieMaker, that I don't know if it's okay.
Original comment by carlosj....@gmail.com
on 20 Jun 2008 at 5:34
Attachments:
There is a method called dumpFrame() in code_swarm.pde which will save the
display to
a file each frame. I prefer to save images rather than encode a video on the
fly for
quality control. The I use ffmpeg to encode the video.
Original comment by michael....@gmail.com
on 20 Jun 2008 at 5:40
Ok, it seems more easier :)
I have set takeSnapshots in true and created png files in the folder frames.
Original comment by carlosj....@gmail.com
on 20 Jun 2008 at 5:53
This is the final result (video and xml) from svn.meneame.net. Menéame is a
Spanish
site like Digg :)
About the video... the colors are ok? I don't know each color.
One last question (I think :P) works with git repositories and how?
Original comment by carlosj....@gmail.com
on 20 Jun 2008 at 6:49
Attachments:
Awesome. Yours is the first evidence that it works for someone else.
You can set the colors through the ColorAssigner, in the initColors() method.
It maps
a regular expression of the full file path to a linear color range (2 colors
specified in RGB space). My convention has been to map source code to hot
colors and
documents to cool colors.
There is no support for git yet. You can write it ;)
Original comment by michael....@gmail.com
on 20 Jun 2008 at 8:40
Hi there,
I'm just trying out the code_swarm stuff and, from what I can read here, I
should
choose to take snapshots and use ffmpeg to generate a video with the snapshots.
Is there a way to get the version of code_swarm.pde used by Carlos to make it
work? I
don't really get (at a first glance) how to add all the stuff from
http://processing.org/reference/libraries/video/MovieMaker.html in my
code_swarm.pde
and I'm sure it would save me a lot of time to just re-use Carlos' version.
I've added a new phpColors method (although I'm sure I'm going to have to
review the
colors once I actually get something working):
void phpColors()
{
colorAssigner.addRule( ".*/documentation/.*", color(150,255,255), color(170,255,255) );
colorAssigner.addRule( ".*/lib/.*", color(25,255,255), color(40,255,255) );
colorAssigner.addRule( ".*/lang/.*", color(65,255,255), color(80,255,255) );
colorAssigner.addRule( ".*\\.gif|.*\\.jpg|.*\\.png|.*\\.swf", color(120,255,255),
color(135,255,255) );
}
Thanks,
Yannick
Original comment by ywarn...@gmail.com
on 21 Jun 2008 at 3:54
Hey Yannick,
In the // User-defined variables section near the top of code_swarm.pde, you
should
see this line:
boolean takeSnapshots = false;
If you change this to true, the snapshots will be taken automatically
throughout the
main loop of the program and will be placed in a 'frames' folder in the same
directory as code_swarm.pde.
Original comment by cgalvan1...@gmail.com
on 21 Jun 2008 at 6:18
That's what I understood from the previous comments, but even setting it to
true was
giving me error messages (which I didn't read carefully, obviously) saying the
log.xml file couldn't be read.
So the idea is:
- when opening code_swarm.pde for the first time, the *processing* app puts the
pde
into a new directory "code_swarm/" and then you have to
- move all the .pde files, to the newly created code_swarm/
- move the particle.png to the newly created code_swarm/ as well
- create a data/ directory inside the newly created code_swarm/
- move the log.xml file inside the code_swarm/data/ directory (log.xml which you
generated using the "svn log --xml -v > log.xml" inside your repository)
- change takeSnapshots to "true" in code_swarm.pde
- change INPUT_FILE to "log.xml" in code_swarm.pde
- execute code_swarm.pde
This will create the code_swarm/frames/ directory and put the screenshots
inside it.
Each screenshot is about 30K and it is likely that one year of project will take
about 100MB on your hard drive.
Then I'm converting the images in frames/ to a video using:
mencoder mf://*.png -mf fps=25:type=png -ovc lavc -oac copy -o movie.avi
I think that sums it up. I also think that you guys should be very careful about
documentation. The documentation of a project is what makes it popular, not its
great
code or its efficiency :-)
But honestly, this is incredibly beautiful. It takes a long time to generate
but it
is a masterpiece of automatic art generation! I like it, very much. I'm not
sure it's
going to be of any "use", but in the arts perspective, it's just great. No,
really, I
mean it!
Yannick
Original comment by ywarn...@gmail.com
on 22 Jun 2008 at 2:20
And I reduce the size of my video by issuing something like this:
mencoder <filename.avi> -ovc xvid -oac mp3lame -xvidencopts bitrate=687 -o
<output.avi>
or that
mencoder <filename.avi> -ovc xvid -oac mp3lame -xvidencopts bitrate=-700000 -o
<output.avi>
(because 30MB for a video is a bit too much to show on a website)
but I'd be glad to know how you add a sound to that, and what was the technique
used
to add a legend at given important times... (is there a way to do that on the
command
line or did you use a video making tool, if so which one?)
Original comment by ywarn...@gmail.com
on 22 Jun 2008 at 2:39
The above complicated process was eliminated recently by renaming the prototype
dir
to code_swarm. Update your checkout and try it.
I agree about documentation. Let me know if you want to help us out.
To optimize videos for the web, you could use a better compression scheme like
h.264
and stream it from a site like Vimeo or YouTube. 30 MB isn't bad if you demand
crystal quality, though.
Original comment by michael....@gmail.com
on 22 Jun 2008 at 3:42
Thanks for the update on code. I'm willing to help out for the doc but I think
for
now the given "complicated" process is detailed enough to get a few examples
working
(if it works for me, it should work for most people, as I hate Java ;-))
Some good things would be to explain what the two colours are for in the color
rules
definitions (I suppose they represent a range of fading colours?). The rest
could
wait a little. I'm aiming at getting this stuff to work out of the box for very
simple samples, so together with your latest code changes, this would reduce the
problem to: change two constants, execute your svn logs gathering command,
execute
"processing" and convert the images to a video.
The quality of the video is not really important to me as long as you can read
the
names of the contributors, which is not satisfactory when I scale down the
video from
640x480 to 320x240... I will try h.264 (never tried that one before and didn't
know
it was best for web use).
How did you add the subtitles and sound to your example videos?
Original comment by ywarn...@gmail.com
on 22 Jun 2008 at 4:58
The video for the open-source dokeos project (e-learning system) is available
here:
http://www.dokeos.com/download/dokeos-activity.avi
Unless there is some kind of legal restriction to show the activity of my fellow
developers into this project through the video (I suppose there might be some
kind of
personal right there but it is highly unlikely anybody would complain), you can
use
it freely to demonstrate code_swarm.
Original comment by ywarn...@gmail.com
on 22 Jun 2008 at 6:25
Excellent. Please share it with the world and let them know we want people's
help on
this project.
I used Final Cut Express to edit my videos. You could do the same with iMovie or
Adobe Premiere, probably. Maybe even Windows Movie Maker if you're patient.
Original comment by michael....@gmail.com
on 22 Jun 2008 at 6:51
http://beeznest.wordpress.com/2008/06/21/viewing-the-activity-of-an-oss-in-video
/
Original comment by ywarn...@gmail.com
on 22 Jun 2008 at 5:17
How do I get access to create/modify wiki pages? Do you have to grant me that
or am I
just missing something?
Original comment by ywarn...@gmail.com
on 22 Jun 2008 at 6:00
You need to give me your Google account name or Gmail address. Then I can add
you to
the committers list.
Original comment by michael....@gmail.com
on 22 Jun 2008 at 6:12
There you go then: ywarnier@gmail.com. Please add me to the committers list.
Original comment by ywarn...@gmail.com
on 22 Jun 2008 at 7:39
> Please share it with the world
Menéame site like Digg (180 votes):
http://meneame.net/story/evolucion-del-codigo-meneame
My blog (I also want to make a how-to for more people to use your program):
http://charli.es/evolucion-de-proyectos-de-software-libre/
YouTube (+5000 views): http://www.youtube.com/watch?v=g2wrzd1mpkc
#5 - Most Discussed (Today) - Education - Spain
#17 - Most Viewed (Today) - Spain
#52 - Most Viewed (Today) - Education - Germany
#31 - Most Viewed (Today) - Education - Ireland
#8 - Most Viewed (Today) - Education
#1 - Most Viewed (Today) - Education - Spain
#4 - Most Viewed (Today) - Education - Mexico
#37 - Most Viewed (Today) - Education - France
#60 - Most Viewed (Today) - Education - Netherlands
#70 - Most Viewed (Today) - Education - Russia
:D
The problem is some comments (in Spanish) of some trolls :(
Original comment by carlosj....@gmail.com
on 22 Jun 2008 at 7:43
Original issue reported on code.google.com by
carlosj....@gmail.com
on 20 Jun 2008 at 1:33