sawpawan / javacv

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

While Adding A Custom Audio File mp3 To Video Created By FFmpegFrameRecorder Audio Finish in 1/4 time . #348

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
//Audio Frame To Be Captured While Recording
Frame ff = f;
/* get video data */
if (yuvIplimage != null && recording)
{
//Image From Bitmap Will Be Copied To IplImage And Used In Video Recording
                            bmp.copyPixelsToBuffer(yuvIplimage.getByteBuffer());            
try
 {                                  //Calculation Time Stamp To Be Applied On Video
                                    long t = 1000 * (timestampList.get(i) - startTime);
if (t > recorder.getTimestamp())                                        {                                           //Setting Time Stamp In 
Video                                           recorder.setTimestamp(t);                           }
                                    //Adding Image To Video
                                    recorder.record(yuvIplimage);
                                    Log.e(LOG_TAG, "Image Grabed");
                                    recorder.record(ff);
Log.e(LOG_TAG, "Audio Grabed");

Javacv Version 0.5 Operating System Ubuntu 12.04 LTS

Please provide any additional information below.

Original issue reported on code.google.com by praveen....@gmail.com on 6 Aug 2013 at 8:24

GoogleCodeExporter commented 8 years ago
https://code.google.com/p/javacv/issues/attachmentText?id=341&aid=3410002000&nam
e=MainActivity.java&token=3vYEJezOklMYu5kAnBDsz778xI0%3A1375778495496

Original comment by praveen....@gmail.com on 6 Aug 2013 at 8:44

GoogleCodeExporter commented 8 years ago
How long is your audio file? and your video file? They must be of the same 
length.

Original comment by samuel.a...@gmail.com on 15 Aug 2013 at 2:51

GoogleCodeExporter commented 8 years ago
They Are Of Same Length But While Grabbing Frame MP3 Has 749 Frames While Video 
Has Only 200 Frames  Grabbing File Through FrameGrabber

https://code.google.com/p/javacv/issues/attachmentText?id=341&aid=3410002000&nam
e=MainActivity.java&token=3vYEJezOklMYu5kAnBDsz778xI0%3A1375778495496

Original comment by praveen....@gmail.com on 16 Aug 2013 at 6:41

GoogleCodeExporter commented 8 years ago
So what happens if you call record() 749 times for audio and 200 times for 
video?

Original comment by samuel.a...@gmail.com on 18 Aug 2013 at 2:11

GoogleCodeExporter commented 8 years ago
Given the lack of feedback, I'm assuming my suggestion above produces the 
desired results, but please let me know if it's still not working correctly, 
thanks!

Original comment by samuel.a...@gmail.com on 16 Sep 2013 at 11:28

GoogleCodeExporter commented 8 years ago
yup its working fyn now..........

Original comment by praveen....@gmail.com on 17 Sep 2013 at 8:54

GoogleCodeExporter commented 8 years ago
thanx for reply.........

On Tue, Sep 17, 2013 at 2:24 PM, Praveen Kanwar
<praveen.kanwar05@gmail.com>wrote:

Original comment by praveen....@gmail.com on 17 Sep 2013 at 8:54