bytedeco / javacv

Java interface to OpenCV, FFmpeg, and more
Other
7.55k stars 1.58k forks source link

set time stamp not working properly in 1.0 #238

Open john-us opened 9 years ago

john-us commented 9 years ago

Hi,

I am using javacv 1.0 for creating a video and using setTimestamp method of FFmpegGrabber class. The analysis is as:

  1. When i set timestamp in FFmpegGrabber as duration of video(which should be point to last frame) and again set as start of the video(which should be point to first frame) it returns same frame number in both cases from the method of getFrameNumber.
  2. If i set start time first and then end time the returned frame number is correct.
  3. Grabbing the frame from last by setting the frame number in reverse as n, n-1, n-2.....1st and creating the video, it seems that i am not getting all frames and created video is not smooth(its jumpy).
  4. Also tested MPEG4 codec is not working in 1.0 (it throws error in recorder like image height>0 width >0)and i have to used H264 codec.

I have tried with grab and grabImage method both. Please help.

saudet commented 9 years ago

Sure, it's not very robust functionality, so it probably doesn't work well on all formats and files. If you could look into this and figure out a way to make it better, send a pull request, and I will gladly accept it. Thank you!