shaileshmulange / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

JavaCV crashes when using FFmpeg on Windows #291

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.download javacv 0.4
2.Try to create an FFmpegframegrabber
3.

What is the expected output? What do you see instead?
import static com.googlecode.javacv.cpp.avformat.*;

import java.awt.image.BufferedImage;

import com.google.sites.lvgeeks.deepthought.utils.img_displayer;
import com.googlecode.javacv.FFmpegFrameGrabber;
import com.googlecode.javacv.FFmpegFrameRecorder;
import com.googlecode.javacv.FrameGrabber.Exception;
import com.googlecode.javacv.cpp.avformat.AVFormatContext;

public class ffmpegtest {

    public static void main(String[] args) throws Exception
    {

        img_displayer win = new img_displayer(640,480);

            System.out.println("create grabber");
    FFmpegFrameGrabber grabber = new FFmpegFrameGrabber("drop.avi");
    System.out.println("start grabber");
    grabber.start();

    while(true)
    {
        BufferedImage buf = grabber.grab().getBufferedImage();
        win.img=buf;
    }
    }

}

Img_displayer is a class that simply displays a bufferedimage in a JFrame

i get the error

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000300905a4d, pid=5912, 
tid=3560
#
# JRE version: 7.0_10-b18
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.6-b04 mixed mode windows-amd64 
compressed oops)
# Problematic frame:
# C  0x0000000300905a4d
#
# Failed to write core dump. Minidumps are not enabled by default on client 
versions of Windows
#
# An error report file with more information is saved as:
# C:\programming_stuff\projects\javacv_demos\hs_err_pid5912.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

What version of the product are you using? On what operating system?
javacv 0.4 with the javacv-0.4-cppjars.
Windows 7 64 bit.

Please provide any additional information below.

Original issue reported on code.google.com by spacehit...@gmail.com on 7 Mar 2013 at 7:23

GoogleCodeExporter commented 9 years ago
Yes, it seems like those newer Windows builds of FFmpeg don't work.. I'll have 
to check out why.

Original comment by samuel.a...@gmail.com on 8 Mar 2013 at 8:40

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'm pretty sure FFmpeg 1.0 worked with JavaCV 0.3

Original comment by samuel.a...@gmail.com on 8 Mar 2013 at 2:13

GoogleCodeExporter commented 9 years ago
how would I package the libraries?
just jar the directory?

Original comment by spacehit...@gmail.com on 8 Mar 2013 at 2:23

GoogleCodeExporter commented 9 years ago
Yes, as per the build scripts in the archive. But it turns out is isn't the 
DLLs of FFmpeg that are the problem, but the way we need to link to them:
http://ffmpeg.org/platform.html#Linking-to-FFmpeg-with-Microsoft-Visual-C_002b_0
02b
I'm attaching updated javacv-windows JAR files. Let me know if you still have 
problems with those (they work fine here), thanks.

Original comment by samuel.a...@gmail.com on 9 Mar 2013 at 5:48

Attachments:

GoogleCodeExporter commented 9 years ago
It's working now, thanks.

Original comment by cwstudio...@gmail.com on 9 Mar 2013 at 6:34

GoogleCodeExporter commented 9 years ago
Thank you!
it's working now.

Original comment by spacehit...@gmail.com on 9 Mar 2013 at 3:07

GoogleCodeExporter commented 9 years ago
Issue 293 has been merged into this issue.

Original comment by samuel.a...@gmail.com on 11 Mar 2013 at 7:47

GoogleCodeExporter commented 9 years ago
Issue 293 has been merged into this issue.

Original comment by samuel.a...@gmail.com on 11 Mar 2013 at 7:54

GoogleCodeExporter commented 9 years ago
Hi, can these Jars please be deployed into the repository at 
http://maven2.javacpp.googlecode.com/git

since using maven things will not work out of the box

Original comment by sagioto on 16 Mar 2013 at 5:15

GoogleCodeExporter commented 9 years ago
Sure, ok, it won't do much damage to update the binaries there I suppose :) 
Done:
http://code.google.com/p/javacv/source/detail?r=89b29538040c94d255337946d404c9e0
561cbf66&repo=maven2

Original comment by samuel.a...@gmail.com on 17 Mar 2013 at 3:10

GoogleCodeExporter commented 9 years ago
Fix included in JavaCV 0.5. Thanks for reporting! And if you have other issues, 
please let me know.

Original comment by samuel.a...@gmail.com on 7 Apr 2013 at 12:59