Thursday, March 11, 2010

Creating a Movie from Images (Linux)

The short story at this time. These instructions refer to the creation of MPEG4 video from JPGs images on Linux.
You need mencoder, part of the mplayer software.

Type:

> mencoder mf://<PATH>/*.jpg -mf w=320:h=240:fps=12:type=jpg
-ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell
-oac copy -o output.avi

Where you should customize at least:
  • <PATH>/*.jpg is the path to the directory where your JPGs are.
  • w=320:h=240 is the image size.
  • output.avi is the resulting file name

Monday, March 08, 2010

Eclipse: Copying Preferences To a New Workspace

When I create a new workspace in Eclipse what I want every time is to have all my preferences from the other workspaces, first of all the color preferences. There is no apparent option in Eclipse to do that. File --> Import --> Preferences won't do that. Maybe it's hidden somewhere else.
I found an easy way to do that: simply copy the settings directory to the new workspace.
Preferences are stored in each workspace in:
/.metadata/.plugins/org.eclipse.core.runtime/.settings

Shut down Eclipse.
Copy part or the entire contents of that directory to the corresponding directory of the new workspace (after you've created it, of course).
Restart and you're done!

Monday, March 01, 2010

Turning a SVN Project into a SVN/Java Project

This will be needed for a Java project created with the type "from SVN source". It will not have a Java nature by default.

Add a Java nature to the project in .project:

<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>

Create the file .classpath with the JDK/JRE libraries (and optionally the default output directory):

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Then you might want to add to the classpath the libraries which could not be detected at creation time.

This method is alternative to the one detailed here.

Eclipse: Hiding Internal JARs

If you need to hide all the internal libraries your project is using, you can do so from the Package Explorer:
  1. Choose the view menu
  2. Check Show referenced libraries node
You can't do that from the Project Explorer (formerly Resource Navigator) since that is a view not reserved to Java projects.