MASON-INTEREST-L Archives

December 2011

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tony Bigbee <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Tue, 27 Dec 2011 09:53:05 -0700
Content-Type:
multipart/alternative
Parts/Attachments:
text/plain (2600 bytes) , text/html (6 kB)
Hi,

I've discovered that the cross platform version of JMF 2.1.1e works with
Windows 7 64-bit.
Also, if you don't have iMovie/a Mac, ffmpeg is very easy to use and you
can accomplish in one step (step 5 below) what takes several clicks with a
GUI.
I've tested it with Windows 7, but you can do this with Linux or a Mac as
well.

Steps:
0.  Download JMF 2.1.1e and download and install Ffmpeg.
http://ffmpeg.org/

1.  Add the JMF .jar files to the runtime classpath of the MASON model.

2.  Click on the motion film camera icon, and choose a 24-bit option for
the type of movie output,  10 or 15 frames per second (your mileage may
vary).

3.  Run the simulation from the desired beginning to ending tick.

4.  Click the motion camera icon (which now has a red dot) to stop
recording, and wait for the (often very large file) to complete writing.

5.  In a DOS cmd window, execute the following ffmpeg.exe based command:

ffmpeg.exe -i moviefile.mov -vcodec libx264 moviefile.libx264.mp4

This will transcode the MASON/JMF-generated file moviefile.mov and write a
new file called moviefile.libx264.mp4 that should be much smaller using the
h.264 codec.   Other codecs will yield approximately the same size files,
but the quality will not be as good.

There are framerate, bitrate, and other
options<http://ffmpeg.org/ffmpeg.html#Main-options> you
can explore for finer control <http://h264.code-shop.com/trac/wiki/Encoding>.
For example '-b:v 512k' (without the quotes) will roughly double the
bitrate and size of the file. Improvement in video quality might occur. Or
not.

'-preset veryslow' will trade processing time for efficiency.   Another good
place <http://mewiki.project357.com/wiki/X264_Settings> to peruse.

This resulting file is playable by both Windows Media Player and QuickTime
Player.
See http://cs.gmu.edu/~eclab/projects/mason/extensions/movies/.

Tony

On Sun, Aug 28, 2011 at 12:25 PM, Sean Luke <[log in to unmask]> wrote:

> On Aug 28, 2011, at 1:47 PM, Tony Bigbee wrote:
>
>  As a side note, I'm wondering if you've looked at alternatives to the
>> perpetually dying JMF.    In the alternatives section in the below article
>> on JMF, there is a list of alternatives including a library that mirrors
>> the JMF API, but I don't have any experience with these.
>>
>> http://en.wikipedia.org/wiki/**Java_Media_Framework#**Alternatives<http://en.wikipedia.org/wiki/Java_Media_Framework#Alternatives>
>>
>
> I've considered replacing JMF, but must admit it's a low priority.  All of
> the JMF facilities are entirely encapuslated in MovieEncoder and MovieMaker
> so it should be pretty easy to swap another one in if you wanted to look
> into it.


ATOM RSS1 RSS2