kanolas / javacv

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

FFmpegFrameGrabber getFrameRate #391

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Using FFmpegFrameGrabber and FFmpegFrameRecorder
FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(ORIGINAL_PATH);
FFmpegFrameRecorder recorder = new 
FFmpegFrameRecorder(OUT_PUT,grabber.getImageWidth(),              
grabber.getImageHeight(),grabber.getAudioChannels());

2. recoder.setFrameRate(grabber.getFrameRate()) is equal to 34.08
3.

What is the expected output? What do you see instead?
In output it`s showing that the actual value of the frames per second is 16.2, 
instead of 34.08 which is value of 'tbr'. 
In many videos the tbr is very close or equal to fps, but on some devices it`s 
not, that is where it makes the video faster or slower. 
In my case in the properties of the input is the frequency 16 frames per second 
and in the created output 30 frames. That makes the video twice as fast as it 
was, eventhough the length is same. 

What version of the product are you using? On what operating system?
Windows 7 proff, javaCv 0.6 with OpenCV 2.4.6 and FFmpeg 2.0

Please provide any additional information below.
https://groups.google.com/forum/#!topic/javacv/rTGHoj278GI

Original issue reported on code.google.com by p...@seznam.cz on 6 Dec 2013 at 11:28

Attachments:

GoogleCodeExporter commented 8 years ago
Would it be possible to check what `ffmpeg` on the command line does? If the 
approach it is using works with your data, we could take the same approach. 
Thanks!

Original comment by samuel.a...@gmail.com on 15 Dec 2013 at 6:45

GoogleCodeExporter commented 8 years ago

Original comment by samuel.a...@gmail.com on 4 Jan 2014 at 2:15