sawpawan / javacv

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

Images to movie conversion is not supported for multiple images . #224

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. i have used cvLoadImage to load the images 
2.
3.

What is the expected output? What do you see instead?

need to all of my images in the out put video file . 
can you give the .png images to video conversion support ?

What version of the product are you using? On what operating system?

I am working on the windows 7 system. have latest version of your product have 
downloaded from your site.
Please provide any additional information below.

My code : 

opencv_core.IplImage[] image = {    
                cvLoadImage("/sdcard/test/gh/1.jpg"),               
                cvLoadImage("/sdcard/test/gh/2.jpg"),
                cvLoadImage("/sdcard/test/gh/3.jpg"),
                cvLoadImage("/sdcard/test/gh/4.jpg"),
                cvLoadImage("/sdcard/test/gh/5.jpg"),
                cvLoadImage("/sdcard/test/gh/6.jpg"),
                cvLoadImage("/sdcard/test/gh/7.jpg"),
                cvLoadImage("/sdcard/test/gh/8.jpg"),
                cvLoadImage("/sdcard/test/gh/9.jpg"),
                cvLoadImage("/sdcard/test/gh/10.jpg"),
                cvLoadImage("/sdcard/test/gh/11.jpg"),              
                cvLoadImage("/sdcard/test/gh/12.jpg"),
                cvLoadImage("/sdcard/test/gh/13.jpg"),
                cvLoadImage("/sdcard/test/gh/14.jpg"),
                cvLoadImage("/sdcard/test/gh/15.jpg"),
                cvLoadImage("/sdcard/test/gh/16.jpg")

                };*/

        newFFmpegFrameRecord recorder = new newFFmpegFrameRecord("/sdcard/test/rajeshnewABcd.mp4",320,480);

        try {
            recorder.setCodecID( CODEC_ID_MPEG4); //CODEC_ID_MPEG4 //CODEC_ID_MPEG1VIDEO
            recorder.setFrameRate(30);
            recorder.setPixelFormat(  PIX_FMT_YUV420P); //PIX_FMT_YUV420P
            recorder.start();
            int x = 1;
            int y = 0;
            for (int i=0;i<300;i++)
              {
                recorder.record(image[x]);
                if ( y > 10 ){
                    x++;
                    y = 0;
                }
                y++;
                if (x>8){
                    x=1;
                }
              }
            recorder.stop();
           }
        catch (Exception e){
            e.printStackTrace();
          }

Original issue reported on code.google.com by itsrajes...@gmail.com on 23 Jul 2012 at 9:21

GoogleCodeExporter commented 8 years ago
We need to call record() a few more times before calling stop(). FFmpeg doesn't 
let us know how many frames the codec is buffering, so we need to record(null) 
a few times before calling stop().

Original comment by samuel.a...@gmail.com on 23 Jul 2012 at 10:02