Everytime i slow down a video it ends up being in low frames, even when recording in 30 - 60 fps, could any one help?
You want to add frames that aren’t there?
Yeah, like make the video not choppy, and make it smooth
Shotcut doesn’t interpolate (also known as tweening = New inbetween frames) so if your footage is 30 fps and you slow it down by 50% then the footage will obviously become 15fps not remain at 30fps.
If your footage is 60fps, then changing speed to 50% will give a 30fps result and be acceptable, any slower will result in human sight detecting frame changes, ie; choppy.
There are some commercial programs such as ReSpeedr which can interpolate.
Non commercial like SlowmoVideo http://slowmovideo.granjow.net/ideo
There is an AviSynth frame server that I studied for two years. It has free libraries for determining the motion vectors of pixels in adjacent frames and the ability to build an intermediate frame.
For the main developer of ShotCut:
if it was possible to run scripts asking AviSynth for individual frames and sound, then the problem with restoring intermediate frames when moving from 30 to 60 FPS would be solved. There are interesting solutions, for example, for fast reverse video playback.
Follow the link to see a sample of removing duplicates and restoring intermediate frames.
This beta has a new feature to allow frame-interpolation rate conversion using the “Convert” feature:
When converting a clip, there is now an advanced option to Override frame rate and set Frame rate conversion = Motion Compensation.
The process to use this could be:
- Set the video mode to have frame rate of 60fps
- Open a source file with 30fps frame rate
- Observe that every other frame is duplicated by stepping frame-by-frame in the source viewer
- Select “Convert” and choose frame rate of 60fps and conversion mode = motion compensation
- Open the converted file when the conversion is complete
- Observe that every frame is unique by stepping frame-by-frame in the source viewer
The interpolation uses the ffmpeg minterpolate filter. Fair warning: the process is slow. I get about 2fps on my computer during the export. Also, the interpolation is not perfect and sometimes results in artifacts. The conversion feature also offers a “blend” mode which is much faster might be preferred by some people.
Testing/feedback on this would be welcome.
Could the speed of processing and rendering out this ffmpeg filter in Shotcut be improved with development of slice threading, frame threading, etc…?
I do not know. I did not examine the FFmpeg code nor profile it to look for optimizations. There are no extra options I can pass to FFmpeg to make it use more threads, if that is what you are asking.
This is relevant:
ffmpeg -h filter=minterpolate tells you if it supports slice threading, and it does not in our version. I just checked the git master branch, and it is not yet added.
It is clear that slice threading (cutting a frame into parts for simultaneous processing of these parts) will only worsen the definition of motion vectors between frames.
If you use FFMPEG, then there is a simple solution for this situation - cutting a sub-clip (not the original clip) into segments of 10-40 frames with overlapping and generating intermediate smoothed frames on these segments simultaneously. Then merge, deleting unnecessary frames at the beginning and at the end of each segment. This will greatly improve execution speed. Additional frames will help to avoid errors in determining motion vectors at the edges of the sequence of frames. With this, I mean running multiple copies of the FFMPEG.EXE process.
If you use other software, then you should pay attention to butterflow https://github.com/dthpham/butterflow, which can use OpenCL for acceleration.
Can ffmpeg use OpenCL for this? I do not know.
PS. Perhaps I misapplied the word ‘segment’ to the situation. It should be replaced with ‘sequence of frames’.
PPS. I accidentally found a useful string for FFMPEG. Can it still be possible to implement dynamically assigned sections with ‘optical flow’?
Sorry, but no one answered the question at the link indicated. At least there is no clear answer.