VM is crashing when writing pictures in FLV

Wyświetlanie wiadomości 1-16 z 16
VM is crashing when writing pictures in FLV Martin Mueller 09-05-27 08:22
Hey,

i tried to convert a mp4-video into a flv-video. Im reading the videopictures like its described in the wiki and then its passing every picture to my "PictureWriter"-Class.

There im starting a new outStreamCoder and setting all the stuff like its said in the wiki (Encoding Video from a sequence of Images).

Its writing the first 3 images and then the VM crashes with the following error:

# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77c16fa3, pid=4600, tid=5680
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_15-b04 mixed mode)
# Problematic frame:
# C  [MSVCRT.dll+0x36fa3]
#
# An error report file with more information is saved as hs_err_pid4600.log

please find my code here: http://pastebin.com/f2b4f4eee

The reading of the picture works fine... i guess there is a problem with the memory...

Is there an easier way to convert from one format to another?

thanks






Re: [xuggler-users] VM is crashing when writing pictures in FLV Art Clarke 09-05-28 19:16
On Wed, May 27, 2009 at 8:22 AM, Martin Müller <ma...@pronity.de> wrote:
> Hey,
>
...

> Its writing the first 3 images and then the VM crashes with the following
> error:
>
> # An unexpected error has been detected by HotSpot Virtual Machine:
> #
> #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77c16fa3, pid=4600,
> tid=5680
...

> 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.

Re: [xuggler-users] Re: VM is crashing when writing pictures in FLV Martin Mueller 09-05-29 01:27
Hi Art,

thank you very much for your quick respond.

Actually, your main-method is working correctly. I dont understand why my code doesnt.

Might there be a problem if i want to read one file AND write to another file at the same time?

I read the Images from one file an write it in a different format into another...

thanks a lot

Martin

2009/5/29 Art Clarke <acl...@xuggle.com>

Re: [xuggler-users] Re: VM is crashing when writing pictures in FLV Art Clarke 09-05-29 20:17
On Fri, May 29, 2009 at 1:27 AM, Martin Müller
<karotte...@googlemail.com> wrote:
> Hi Art,
>
> thank you very much for your quick respond.
>
> Actually, your main-method is working correctly. I dont understand why my
> code doesnt.
>
> Might there be a problem if i want to read one file AND write to another
> file at the same time?
>
> I read the Images from one file an write it in a different format into
> another...
>

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

--
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.

Re: [xuggler-users] Re: VM is crashing when writing pictures in FLV Martin Mueller 09-06-01 11:36
Hi Art,

thanks very much for your response. I'm gonna try to setup the codecs correctly.

But how do i the latest tip of tree if im working on windows. I dont want to compile xuggler on my own.

is there another way to get the latest code?

thanks,

Martin Müller

2009/5/30 Art Clarke <acl...@xuggle.com>

Re: [xuggler-users] Re: VM is crashing when writing pictures in FLV Art Clarke 09-06-02 22:38
Here's where the latest (tip of tree) windows XP builds come from:
http://build.xuggle.com/job/xuggle_java_xuggler_jdk5_i386_winxp/

- Art

On Mon, Jun 1, 2009 at 11:36 AM, Martin Müller
Re: VM is crashing when writing pictures in FLV Martin Mueller 09-06-03 02:19
Hello Art,

I tried the provided build of xuggler 2.1.638 and i get the following
exception if i try to create a container with IContaier.make()

11:12:41.564 [main] ERROR com.xuggle.ferry.JNILibraryLoader - Could
not load library: xuggle-xuggler; version: 2; Visit http://www.xuggle.com/xuggler/faq/
to find common solutions to this problem
java.lang.UnsatisfiedLinkError:
com.xuggle.xuggler.XugglerJNI.Global_NO_PTS_get()J
        at com.xuggle.xuggler.XugglerJNI.Global_NO_PTS_get(Native Method)
        at com.xuggle.xuggler.Global.<clinit>(Global.java:240)
        at com.xuggle.xuggler.encode.DecodeAndCaptureFrames.<clinit>
(DecodeAndCaptureFrames.java:54)
Exception in thread "main"

all enviroment-variables are set fine... is this an error in your
build?

Im using windows xp prof, SP3. I tried with jre 1.5 and jre 1.6.

thanks a lot.

Martin

On 3 Jun., 07:38, Art Clarke <acla...@xuggle.com> wrote:
> Here's where the latest (tip of tree) windows XP builds come from:http://build.xuggle.com/job/xuggle_java_xuggler_jdk5_i386_winxp/
>
> - Art
>
> On Mon, Jun 1, 2009 at 11:36 AM, Martin Müller
>
>
>
> <karottenfres...@googlemail.com> wrote:
> > Hi Art,
>
> > thanks very much for your response. I'm gonna try to setup the codecs
> > correctly.
>
> > But how do i the latest tip of tree if im working on windows. I dont want to
> > compile xuggler on my own.
>
> > is there another way to get the latest code?
>
> > thanks,
>
> > Martin Müller
>
> > 2009/5/30 Art Clarke <acla...@xuggle.com>
>
> >> On Fri, May 29, 2009 at 1:27 AM, Martin Müller
> >> <karottenfres...@googlemail.com> wrote:
> >> > Hi Art,
>
> >> > thank you very much for your quick respond.
>
> >> > Actually, your main-method is working correctly. I dont understand why
> >> > my
> >> > code doesnt.
>
> >> > Might there be a problem if i want to read one file AND write to another
> >> > file at the same time?
>
> >> > I read the Images from one file an write it in a different format into
> >> > another...
>
> >> 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
>
> >> --
> >>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.
>
> --http://www.xuggle.com/
Re: [xuggler-users] Re: VM is crashing when writing pictures in FLV Art Clarke 09-06-03 07:04
Did you uninstall your old xuggle-xuggler before you installed the new
one?  If Windows, did you reboot after the installation?  If not, try
both and let me know.

- Art
Re: [xuggler-users] Re: VM is crashing when writing pictures in FLV Martin Mueller 09-06-03 07:11
Hi Art,

yes I did both. Do i have to reboot after the uninstall as well?

i did the following:

1st step: uninstall xuggler 2.0
2nd step: install xuggler 2.1
3rd step: reboot
4th step: try
5. step: got the error :(

greets


2009/6/3 Art Clarke <acl...@xuggle.com>

Re: [xuggler-users] Re: VM is crashing when writing pictures in FLV Art Clarke 09-06-03 08:11
What OS are you on?  If windows, what's the contents of your
%XUGGLE_HOME% and %PATH% variables?  If Linux, what's the contents of
your $XUGGLE_HOME, and $LD_LIBRARY_PATH variables?  And when you say
"got the error", which error did you mean?

- Art
Re: VM is crashing when writing pictures in FLV Martin Mueller 09-06-03 08:20
Hi Art,

i am on Windows XP SP3.

PATH: C:\Programme\Xuggle\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS
\System32\Wbem;C:\Programme\Gemeinsame Dateien\GTK\2.0\bin;C:\Program
files\MiKTex 2.7\miktex\bin

i installed xuggle in C:\programme\xuggle

XUGGLE_HOME: C:\programme\Xuggle

and the error is:

11:18:03.185 [main] ERROR com.xuggle.ferry.JNILibraryLoader - Could
not load library: xuggle-xuggler; version: 2; Visit http://www.xuggle.com/xuggler/faq/
to find common solutions to this problem
java.lang.UnsatisfiedLinkError:
com.xuggle.xuggler.XugglerJNI.Global_NO_PTS_get()J
        at com.xuggle.xuggler.XugglerJNI.Global_NO_PTS_get(Native Method)
        at com.xuggle.xuggler.Global.<clinit>(Global.java:240)
        at com.xuggle.xuggler.encode.DecodeAndCaptureFrames.<clinit>
(DecodeAndCaptureFrames.java:54)
Exception in thread "main"

thank you :)

Martin

On 3 Jun., 17:11, Art Clarke <acla...@xuggle.com> wrote:
> What OS are you on?  If windows, what's the contents of your
> %XUGGLE_HOME% and %PATH% variables?  If Linux, what's the contents of
> your $XUGGLE_HOME, and $LD_LIBRARY_PATH variables?  And when you say
> "got the error", which error did you mean?
>
> - Art
>
> On Wed, Jun 3, 2009 at 7:11 AM, Martin Müller
>
>
>
> <karottenfres...@googlemail.com> wrote:
> > Hi Art,
>
> > yes I did both. Do i have to reboot after the uninstall as well?
>
> > i did the following:
>
> > 1st step: uninstall xuggler 2.0
> > 2nd step: install xuggler 2.1
> > 3rd step: reboot
> > 4th step: try
> > 5. step: got the error :(
>
> > greets
>
> > 2009/6/3 Art Clarke <acla...@xuggle.com>
>
> >> Did you uninstall your old xuggle-xuggler before you installed the new
> >> one?  If Windows, did you reboot after the installation?  If not, try
> >> both and let me know.
>
> >> - Art
>
> >> On Wed, Jun 3, 2009 at 2:19 AM, Martin Mueller
Re: [xuggler-users] Re: VM is crashing when writing pictures in FLV Art Clarke 09-06-03 08:33
Can you tell me the full contents of %XUGGLE_HOME%\bin, and any other
error messages that showed up BEFORE the one you posted here.

- Art
Re: VM is crashing when writing pictures in FLV Martin Mueller 09-06-04 00:56
Good Morning Art,

that is whole error-message i get in the console of eclipse:

09:50:55.109 [main] ERROR com.xuggle.ferry.JNILibraryLoader - Could
not load library: xuggle-xuggler; version: 2; Visit http://www.xuggle.com/xuggler/faq/
to find common solutions to this problem
java.lang.UnsatisfiedLinkError:
com.xuggle.xuggler.XugglerJNI.Global_NO_PTS_get()J
        at com.xuggle.xuggler.XugglerJNI.Global_NO_PTS_get(Native Method)
        at com.xuggle.xuggler.Global.<clinit>(Global.java:240)
        at com.xuggle.xuggler.encode.DecodeAndCaptureFrames.<clinit>
(DecodeAndCaptureFrames.java:54)
Exception in thread "main"

the content of bin-directory is:

03.06.2009  02:12        10.944.453 avcodec-52.30.1.dll
03.06.2009  02:12        10.944.453 avcodec-52.dll
03.06.2009  02:12           270.352 avcodec-52.lib
03.06.2009  02:12        10.944.453 avcodec.dll
03.06.2009  02:12           270.352 avcodec.lib
03.06.2009  02:11           473.452 avdevice-52.2.0.dll
03.06.2009  02:11           473.452 avdevice-52.dll
03.06.2009  02:11             2.196 avdevice-52.lib
03.06.2009  02:11           473.452 avdevice.dll
03.06.2009  02:11             2.196 avdevice.lib
03.06.2009  02:11         2.704.299 avformat-52.34.0.dll
03.06.2009  02:11         2.704.299 avformat-52.dll
03.06.2009  02:11            98.568 avformat-52.lib
03.06.2009  02:11         2.704.299 avformat.dll
03.06.2009  02:11            98.568 avformat.lib
03.06.2009  02:12           192.222 avutil-50.3.0.dll
03.06.2009  02:12           192.222 avutil-50.dll
03.06.2009  02:12            17.378 avutil-50.lib
03.06.2009  02:12           192.222 avutil.dll
03.06.2009  02:12            17.378 avutil.lib
03.06.2009  02:12         1.034.913 ffmpeg.exe
03.06.2009  01:55         1.621.083 lame.exe
03.06.2009  01:55         1.123.186 libmp3lame-0.dll
03.06.2009  02:00           243.755 libspeex-1.dll
03.06.2009  02:00           185.726 libspeexdsp-1.dll
03.06.2009  01:50           579.584 libx264-66.dll
03.06.2009  02:13         2.837.434 libxuggle-ferry-2.dll
03.06.2009  02:14         4.814.165 libxuggle-xuggler-2.dll
03.06.2009  02:13         1.172.722 libxuggle-xuggler-io-2.dll
03.06.2009  02:12           672.472 swscale-0.7.1.dll
03.06.2009  02:12           672.472 swscale-0.dll
03.06.2009  02:12            18.468 swscale-0.lib
03.06.2009  02:12           672.472 swscale.dll
03.06.2009  02:12            18.468 swscale.lib
03.06.2009  01:50           584.192 x264.exe

i checked the enviroment-variables again. they are available over the
system.

regards, Martin

On 3 Jun., 17:33, Art Clarke <acla...@xuggle.com> wrote:
> Can you tell me the full contents of %XUGGLE_HOME%\bin, and any other
> error messages that showed up BEFORE the one you posted here.
>
> - Art
>
> On Wed, Jun 3, 2009 at 8:20 AM, Martin Mueller
>
>
>
> <karottenfres...@googlemail.com> wrote:
>
> > Hi Art,
>
> > i am on Windows XP SP3.
>
> > PATH: C:\Programme\Xuggle\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS
> > \System32\Wbem;C:\Programme\Gemeinsame Dateien\GTK\2.0\bin;C:\Program
> > files\MiKTex 2.7\miktex\bin
>
> > i installed xuggle in C:\programme\xuggle
>
> > XUGGLE_HOME: C:\programme\Xuggle
>
> > and the error is:
>
> > 11:18:03.185 [main] ERROR com.xuggle.ferry.JNILibraryLoader - Could
> > not load library: xuggle-xuggler; version: 2; Visithttp://www.xuggle.com/xuggler/faq/
Re: [xuggler-users] Re: VM is crashing when writing pictures in FLV Art Clarke 09-06-05 10:51
Hi Martin,

I think you resolved this on Unix, but the problem is still open on
Windows.  If you haven't already, completely uninstall Xuggler,
reboot, install xuggler, reboot, and try again.

Also, I'm curious if you're trying to run Xuggler on Windows 64-bit --
our DLLs are 32-bit only on Windows, and so will only work with the
32-bit Java JVM on Windows.

- Art
Re: VM is crashing when writing pictures in FLV Martin Mueller 09-06-08 01:57
Good Morning Art,

i resolved it on WinXP as well. I did what you said

>> completely uninstall Xuggler,
>> reboot, install xuggler, reboot, and try again

i also deleted all global variables after the uninstall before the new
installation. Now it is working fine.

I guess it failed the last time, because i didnt reboot after i
installed xuggler 2.0.

I'll stuck on 2.1.638 because im not fine with the new agpl-licence :(

but thanks a lot for your help.

Have a nice day,

Martin

On 5 Jun., 19:51, Art Clarke <acla...@xuggle.com> wrote:
> Hi Martin,
>
> I think you resolved this on Unix, but the problem is still open on
> Windows.  If you haven't already, completely uninstall Xuggler,
> reboot, install xuggler, reboot, and try again.
>
> Also, I'm curious if you're trying to run Xuggler on Windows 64-bit --
> our DLLs are 32-bit only on Windows, and so will only work with the
> 32-bit Java JVM on Windows.
>
> - Art
>
> On Thu, Jun 4, 2009 at 12:56 AM, Martin
>
> Mueller<karottenfres...@googlemail.com> wrote:
>
> > Good Morning Art,
>
> > that is whole error-message i get in the console of eclipse:
>
> > 09:50:55.109 [main] ERROR com.xuggle.ferry.JNILibraryLoader - Could
> ...
>
> Erfahren Sie mehr »
Re: [xuggler-users] Re: VM is crashing when writing pictures in FLV Art Clarke 09-06-08 04:34
>
> I'll stuck on 2.1.638 because im not fine with the new agpl-licence :(

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.

- Art

--
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.