JenyaKirmiza / javacv

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

HI,guys,please help #374

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have been messing around with FFMpegFrameGrabber with android for a few days 
and I have run into some problems. First off here is what some of my testing 
code looks like:

 File fmp3 = new File(rooturl+"movie/222.mp3"); 
       File fmp4 = new File(rooturl+"movie/test.mp4"); 
       FrameGrabber grabber1;
       FrameGrabber grabber2; 
         try {
            Log.i("ScreenRecorderService", "file3="+fmp3.getAbsolutePath());
            Log.i("ScreenRecorderService", "file4="+fmp4.getAbsolutePath());
            grabber1 = new FFmpegFrameGrabber(fmp4);
            grabber1.setFormat("mp4");
            grabber2 =new FFmpegFrameGrabber(fmp3); 
            grabber2.setFormat("mp3");
            grabber1.start(); 
            grabber2.start(); 
            Log.i("ScreenRecorderService", "start");
            FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(new FileUtils().getSDCardRoot()+"movie"+File.separator+"testfinal.mp4", 
                    grabber1.getImageWidth(), grabber1.getImageHeight(), 
                    grabber2.getAudioChannels()); 
            recorder.setFrameRate(grabber1.getFrameRate()); 
            recorder.setSampleFormat(grabber2.getSampleFormat()); 
            recorder.setSampleRate(grabber2.getSampleRate()); 

            recorder.start(); 
            com.googlecode.javacv.Frame frame1;
            com.googlecode.javacv.Frame  frame2 = null; 
            while ((frame1 = grabber1.grabFrame()) != null || 
                   (frame2 = grabber2.grabFrame()) != null) { 
                recorder.record(frame1); 
                recorder.record(frame2); 
            } 
            recorder.stop(); 
            grabber1.stop(); 
            grabber2.stop(); 
            Log.i("ScreenRecorderService", "over");
         } catch (Exception e) {
            // TODO: handle exception
         }

"grabber1 = new FFmpegFrameGrabber(fmp4);" This line of code errors.
 here is Error infomation:
    10-14 16:06:51.114: E/AndroidRuntime(26141): FATAL EXCEPTION: Thread-525
10-14 16:06:51.114: E/AndroidRuntime(26141): 
java.lang.ExceptionInInitializerError
10-14 16:06:51.114: E/AndroidRuntime(26141):    at 
com.googlecode.javacv.FFmpegFrameGrabber.<init>(FFmpegFrameGrabber.java:106)
10-14 16:06:51.114: E/AndroidRuntime(26141):    at 
com.guanyue.screenrecorder.ScreenRecorderService.mergeVedioAndAudio(ScreenRecord
erService.java:304)
10-14 16:06:51.114: E/AndroidRuntime(26141):    at 
com.guanyue.screenrecorder.ScreenRecorderService.access$0(ScreenRecorderService.
java:285)
10-14 16:06:51.114: E/AndroidRuntime(26141):    at 
com.guanyue.screenrecorder.ScreenRecorderService$saveFileThread.run(ScreenRecord
erService.java:200)
10-14 16:06:51.114: E/AndroidRuntime(26141): Caused by: 
java.util.MissingResourceException: Could not even get generic properties: null
10-14 16:06:51.114: E/AndroidRuntime(26141):    at 
com.googlecode.javacpp.Loader.loadProperties(Loader.java:133)
10-14 16:06:51.114: E/AndroidRuntime(26141):    at 
com.googlecode.javacpp.Loader.loadProperties(Loader.java:104)
10-14 16:06:51.114: E/AndroidRuntime(26141):    at 
com.googlecode.javacpp.Loader.load(Loader.java:561)
10-14 16:06:51.114: E/AndroidRuntime(26141):    at 
com.googlecode.javacpp.Loader.load(Loader.java:532)
10-14 16:06:51.114: E/AndroidRuntime(26141):    at 
com.googlecode.javacv.cpp.avcodec.<clinit>(avcodec.java:39)

please help me Thanks.

Original issue reported on code.google.com by kaven...@gmail.com on 14 Oct 2013 at 8:13

GoogleCodeExporter commented 9 years ago
Can you explain exactly who you installed everything?

Original comment by samuel.a...@gmail.com on 14 Oct 2013 at 9:20

GoogleCodeExporter commented 9 years ago
Installation Error?Thank you for the prompt

Original comment by kaven...@gmail.com on 15 Oct 2013 at 3:00

GoogleCodeExporter commented 9 years ago
Yes, it looks like you didn't include javacpp.jar in your project libraries, 
but maybe you did, and you are simply not following the instructions in the 
README.txt file. So if you could explain how you created your project files, it 
might become clear why it isn't working properly.

Original comment by samuel.a...@gmail.com on 24 Oct 2013 at 12:05

GoogleCodeExporter commented 9 years ago
I'm guessing that following the instructions in the README.txt file fixed your 
installation, but please feel free to ask on the mailing list if you still have 
some problems with that, thanks!

Original comment by samuel.a...@gmail.com on 7 Jan 2014 at 1:04