kevinEso / javacv

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

Mismatch of 0.7 released code class Vs 0.7 java src code files #444

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Created test program using 0.7 released jar files - the test output was not 
satisfactory as the video was getting converted without any audio.

2. While reviewing some of the latest changes by you got some Java file which 
were recently updated. So downloaded the complete Java Src code of 0.7 release 
and applied these recent changes.

3. Surprisingly the Avcodec.java file is not changed but if i review the 
Avcodec.java file in source code of 0.7 version and in the class file of 0.7 
jar the constants and variables are not matching. e.g 
AV_CODEC_ID_MPEG4 is the constant in java source but the class file doesn't 
recognize this constant.

What is the expected output? What do you see instead?
Ideally the 0.7 released jar (compiled classes) and the source code should have 
been the same. so that i can just apply the recent code fixes for audio related 
issues.

What version of the product are you using? On what operating system?
tried 0.7 release of class and source on windows and linux both

Please provide any additional information below.
I wanted to the latest code fix which was done for issues #428, 429 and 435 on 
Mar 1. I am facing issues where i am not able to open audio stream while 
converting a video. Getting exception that "could not open audio codec".

It would be great if you can help me with the fix where in i can convert/merge 
audio and video files.

Original issue reported on code.google.com by kalee...@gmail.com on 18 Mar 2014 at 5:21

GoogleCodeExporter commented 8 years ago
Have you tried to use the source code from this archive?
http://javacv.googlecode.com/files/javacv-0.7-src.zip

Original comment by samuel.a...@gmail.com on 18 Mar 2014 at 10:12

GoogleCodeExporter commented 8 years ago
Thanks for the quick response. We tried using following files from 
https://code.google.com/p/javacv/downloads/list

Working jar file from javacv-examples-0.7-src.zip because jar filr from 
javacv-0.7-bin.zip is also not working.

Java src Code from - javacv-0.7-src.zip

So we are not sure if there is any discrepancy in these files as all are tagged 
as 0.7 release.

regards

Original comment by kalee...@gmail.com on 18 Mar 2014 at 10:42

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Sorry i made a mistake while giving you the references.Actually Im trying to 
convert video files to mp4 formats,,I managed to convert videos but converted 
videos doesnt have any sound.,,when i used recent jars then the code is 
throwing exceptions..
I have written following code to convert videos...

 FFmpegFrameGrabber frameGrabber =
                    new FFmpegFrameGrabber(Environment.getExternalStorageDirectory() + "/v1.mp4");

         Frame captured_frame = null;

            FrameRecorder recorder = null;
            recorder = new FFmpegFrameRecorder(Environment.getExternalStorageDirectory() + "/converted3.mp4", frameGrabber.getImageHeight(), frameGrabber.getImageWidth(),frameGrabber.getAudioChannels());
            recorder.setVideoCodec(avcodec.AV_CODEC_ID_MPEG4);
         recorder.setAudioCodec(avcodec.AV_CODEC_ID_AAC);

            recorder.setFrameRate(frameGrabber.getFrameRate());
            recorder.setSampleFormat(frameGrabber.getSampleFormat());
            recorder.setSampleRate(frameGrabber.getSampleRate()); 

            recorder.setFormat("mp4");
            try {   
                recorder.start();
                frameGrabber.start();
                while (true) {
                    try {
                        captured_frame = frameGrabber.grabFrame();

                        if (captured_frame == null) {

                            break;
                        }
                        recorder.record(captured_frame);
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
                recorder.stop();
                recorder.release();

Plz let me know where im making mistake....
Regards 

Original comment by kalee...@gmail.com on 18 Mar 2014 at 11:54

GoogleCodeExporter commented 8 years ago
When I call "mvn clean package -Djavacpp.skip=true -Pall" on my system here, 
it's working just fine, including AV_CODEC_ID_MPEG4. Unless I can reproduce the 
problem here, I won't be able to help you, so please help me help you by 
explaining in more detail how to reproduce the issue, thank you.

Original comment by samuel.a...@gmail.com on 18 Mar 2014 at 11:55

GoogleCodeExporter commented 8 years ago
Sorry Samuel,,i have given you the code im using so that you can analyse where 
im mistaking,is der problem with my code or what,i have used recent jars 0.7 
and0.5 also..
Regards

Original comment by kalee...@gmail.com on 18 Mar 2014 at 12:02

GoogleCodeExporter commented 8 years ago
It looks fine, I think.

So, what is the issue exactly?

Original comment by samuel.a...@gmail.com on 18 Mar 2014 at 12:07

GoogleCodeExporter commented 8 years ago
When i use current jars i.e  javaCv 0.7version. It is not working means It 
shows exceptions Unsatisfied Link Error.
I have also tried the javaCv 0.5 jars but not getting the desired result,,,
So plz let me know where im making mistake,

Original comment by kalee...@gmail.com on 18 Mar 2014 at 12:19

GoogleCodeExporter commented 8 years ago
Well, simply add the missing files to satisfy the "Unsatisfied Link Error". Is 
that all?

Original comment by samuel.a...@gmail.com on 18 Mar 2014 at 12:40

GoogleCodeExporter commented 8 years ago
Thanks for your quick response,,,
Sir,when I use earlier versions it does converts video to mp4 format,but that 
video doesnt have any sound,,
So i have gone through JavaCv documentation where i came to know that this 
issue has been solved in javaCv's recent versions,
So i used the current javaCv version i.e 0.7,,but this time it doesnt give any 
output,,,
I dont know why it is happening,,,

Original comment by kalee...@gmail.com on 18 Mar 2014 at 1:10

GoogleCodeExporter commented 8 years ago
What do you mean by "it doesn't give any output"? Do you get any error 
messages? Please explain in detail what happens.

Original comment by samuel.a...@gmail.com on 18 Mar 2014 at 1:15

GoogleCodeExporter commented 8 years ago
No it doesnt give any error,
When i use javacv 0.7 jars when debugger encounters the FfmpegFrameGrabber 
class it goes out of the application,,no error no exception,,
when i use javacv 0.5 jars it shows UnsatisfiedLink exception...

The code that is giving video without sound is using jars that i have attached
with this comment.
Regards

Original comment by kalee...@gmail.com on 18 Mar 2014 at 1:24

Attachments:

GoogleCodeExporter commented 8 years ago
Ok, so it crashes. Please find the error your get from the operating system, 
and post it there, thank you.

Original comment by samuel.a...@gmail.com on 18 Mar 2014 at 1:42

GoogleCodeExporter commented 8 years ago
BTW, we can see the error message by looking at the log:
http://developer.android.com/tools/debugging/ddms.html#logcat

Original comment by samuel.a...@gmail.com on 25 Mar 2014 at 1:29

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi Samuel,
I got the desired results,those errors were becoz of missing .so files from 
ffmpeg-arm.jar and opencv-arm.jar,,,Anyway you hve done gr8 job with 
javaCv,,ffmpeg is so hard to use in android,,
regards
Kaleem

Original comment by kalee...@gmail.com on 26 Mar 2014 at 6:17

GoogleCodeExporter commented 8 years ago
Ok, good! 

And next time, please post your questions on the mailing list instead, if 
possible, thank you!

Original comment by samuel.a...@gmail.com on 26 Mar 2014 at 12:10