> please find my code here: http://pastebin.com/f2b4f4eee
>
Hi Martin,
I tried to reproduce your error with the current tip of tree and
couldn't make it happen. I don't know if this is a problem with your
code or with the version of Xuggler you have installed, but here's the
main() loop I ran. Can you try it out on your machine and see if it
passes (this code should make a video with a red rectangle rotating
every 1/3 of a second):
static public void main(String[] args)
{
int w = 200;
int h = 200;
PictureWriter pict = new PictureWriter(w,h);
for(int i = 0; i < 100; i++)
{
BufferedImage image = new BufferedImage(w, h,
BufferedImage.TYPE_3BYTE_BGR);
Graphics2D g = image.createGraphics();
g.setRenderingHint(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
double theta = i / 3;
g.setColor(Color.RED);
g.rotate(theta, w / 2, h / 2);
g.fillRect(50, 50, 100, 100);
System.out.println("Encoding: " + i);
pict.encodeImage(image, (i * 1000 / 3));
}
pict.endEncoding();
}
--
http://www.xuggle.com/
xu‧ggle (zŭ' gl) v. To freely encode, decode, and experience audio and video.
Use Xuggle to get the power of FFMPEG in Java.
That should work provided you've set up your codecs correctly. There
was an issue with 2.0 where if you didn't do that it could lead to a
JVM crash, whereas with 2.1 we'll instead fail cleanly on encodeVideo.
See what happens for your code under the tip of tree (an early
preview of 2.1).
- Art
Hi Martin,
2.0 is GPL/LGPL. Any 2.1 build is AGPL (2.1 was the former name for
3.0), so you'll need to go to 2.0. Sorry.