Open ZeroOneZeroR opened 5 years ago
It looks like there is a filter for this, yes: https://ffmpeg.org/ffmpeg-filters.html#minterpolate
I want to move an object from 0 to 700 pixel position and capture the bitmap and record video with 30 frame rate. But moving seems so jerky with 30 fps. But it is so smooth with 60 fps. But i want 30. How to overcome this situation?
Motion blur seems like a fine way to achieve that, yes.
Will i have to use FFmpegFrameFilter to use mininterpolate?
Yes, something like that:
https://github.com/bytedeco/javacv/blob/master/samples/DeinterlacedVideoPlayer.java
If you just need to process files though, the ffmpeg
program is probably easier to use:
http://bytedeco.org/javacpp-presets/ffmpeg/apidocs/org/bytedeco/ffmpeg/ffmpeg.html
I want first kind.
I use like this . But app crash while pushing and for the 3rd time without giving error message `FFmpegFrameFilter filter = new FFmpegFrameFilter("minterpolate=60,tblend=all_mode=average,framestep=2", videoWidth, videoHeight); filter.setPixelFormat(avutil.AV_PIX_FMT_YUV420P); filter.start();
filter.push( videoFrame );
videoFrame = filter.pull();`
It gives "Changing frame properties on the fly is not supported by all filters." after FFmpegLogCallback.set();
That means you'll need to set the pixel format of your frames before calling start().
i have set filter.setPixelFormat(avutil.AV_PIX_FMT_YUV420P) before starting
Your frames have a different pixel format, but if you're sure that's correct, pass it to push() as well.
if i set frame rate 60 to recorder and set "minterpolate=60,tblend=all_mode=average,framestep=2" fas filter then no crash occurs but video is only green frame and video size is half of expected... i think i am not getting how the filter should be used. Could you please explain to me?
You'll need to set the pixel format of your frames, or it won't work properly!
after setting pixel format when pushing crash disappears but output video is scewed and so far from my expectation.....
i think i am not using the filters in correct way....
Now there is no crash .You just tell why the video is skewed and many lines of different colours are on the video.
using AV_PIX_FMT_BGR24 video content becomes triple.
Is there any way to do this?