-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FPS filters can cause some problems #2121
Comments
Please try again with JavaCV 1.5.9. |
Also we may also need to call |
Duplicate of #1315 |
Thank you for your reply
But i got an error: "av_buffersrc_add_frame_flags() error -22: Error while feeding the filtergraph. (For more details, make sure FFmpegLogCallback.set() has been called.)"
The program result is:
Compared with before, the last frame pushed into the filter is indeed pulled out, but the result of this filter is still inconsistent with the result of the ffmpeg command execution, and the video duration is still shorter than the original video. |
I want to use the fps filter in FFmpegFrameFilter to convert a 25fps video to a 30fps video, like this:
Even though I ended up with a 30fps video, it was a few seconds shorter.
I printed the number of pushes and the number of records, and they turned out to be like this when 25fps to 30fps
It looks like the filter isn't generating extra frames to fill the video.
When I use this code to convert the same video from 25 fps to 60 fps, the result of the program running becomes something like this:
This time the filter successfully filled in the extra frames, but not enough frames. My video is about 36 seconds, the original video has 916 frames, but the recordI is only 1832 frames. Theoretically there should be about 36*60=2160 frames, which is about 360 frames less, resulting in my final recorded video being about 6 seconds less than the original video.
In addition, I tried it again using the ffmpeg command ffmpeg -i input.mp4 -filter "fps=60" -y 60fps.mp4, and the result was correct, the frame rate was 60fps and the video duration was the same.
So I'm wondering, is there some problem with the implementation of fps filters in JavaCV? Or maybe there's something wrong with my code.
Thank you for reading and look forward to your reply
The text was updated successfully, but these errors were encountered: