haider2087 / javacv

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

seeking audio (mp3) file #417

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.setTimestamp() of sound grabber.
2.does not set to that seek position

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

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

Please provide any additional information below.

Hi, can any one tell me how i can seek my mp3 file to a particular position 
using time stamp.
 i used soundGrabber.setTimestamp(startTime); and want to grab frame till the end of file but it seems soundGrabber.grabFrame() does't move to next frame, not a single time.

while(soundGrabber.getTimestamp()<=soundGrabber.getLengthInTime()){
                    try {

                        recorder.record(soundGrabber.grabFrame());

                        //Log.v("sound time stamp", ""+soundGrabber.getTimestamp()/1000000);
                    } catch (com.googlecode.javacv.FrameRecorder.Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    } catch (com.googlecode.javacv.FrameGrabber.Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                    catch(java.lang.Exception e){}
                }

Original issue reported on code.google.com by shubham....@appzcloud.com on 31 Jan 2014 at 2:29

GoogleCodeExporter commented 8 years ago
I've added support for that in this revision FFmpegFrameGrabber:
http://code.google.com/p/javacv/source/detail?r=badc3b3b7d85028a457542e71acfdb72
1d83bc8d
Let me know if that works as expected, and thanks for reporting!

Original comment by samuel.a...@gmail.com on 2 Feb 2014 at 2:11

GoogleCodeExporter commented 8 years ago
Hi samuel,
Thanks for your help, now i can seek audio file on a timestamp.
Thank you very much... 

Original comment by shubham....@appzcloud.com on 3 Feb 2014 at 10:08

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
The fix has been included in the latest release of JavaCV 0.8. There are a lot 
of other changes with this release, so please make sure to read the news 
release here:
    http://bytedeco.org/release/2014/04/28/first-release.html

Incidentally, the project is now hosted on GitHub:
    https://github.com/bytedeco/javacv

Thanks once again for reporting!

Original comment by samuel.a...@gmail.com on 29 Apr 2014 at 1:16