View Full Version : How to change the frame rate from 60 to 30?
orion44
21st July 2017, 00:10
Before encoding with x264, I would like to change the frame rate of a game recorded video from 60 to 30, to lower the file size.
How do I change the frame rate from 60 to 30 with AviSynth?
Thanks.
poisondeathray
21st July 2017, 00:25
Before encoding with x264, I would like to change the frame rate of a game recorded video from 60 to 30, to lower the file size.
How do I change the frame rate from 60 to 30 with AviSynth?
Thanks.
Did you mean discard 1/2 the frames, and reduce the framerate by 1/2 also (to keep sync) ?
SelectEven() or SelectOdd()
shae
21st July 2017, 00:26
Skipping frames:
ChangeFPS(30)
Blending (I assume):
ConvertFPS(30)
ConvertFPS has a few extra options:
http://avisynth.nl/index.php/FPS
Try also lower quality encoding. Depending on the game, a higher framerate might look nicer even with lower quality.
raffriff42
21st July 2017, 00:53
Halving the framerate does not reduce the file size by half -- more like 20%. The reason is motion compensation (https://en.wikipedia.org/wiki/Motion_compensation).
FranceBB
21st July 2017, 01:21
Halving the framerate does not reduce the file size by half -- more like 20%. The reason is motion compensation (https://en.wikipedia.org/wiki/Motion_compensation).
Exactly. Maybe a long GOP could help to reduce filesize without necessarily have to drop or blend frames; something like -ref 16 (considering that -ref it's generally 3-4).
StainlessS
21st July 2017, 02:09
If using eg MeGUI [Video Config dialog box], with Encoding Mode=Constant Quality, I might drop quality a little by raising the CRF (Constant Rate Factor)
[given the name Quality in dialog], and/or change Preset to a slower setting than usual. Quite small adjustments to the crf can produce substantially smaller output files, and without too much degradation on reasonable sized clips (small [EDIT: low rez] clips would suffer more). A slower preset will produce smaller file size at expense of encode time, and would require some additional CPU muscle to decode.
[and you would keep original framerate and probable greater perceived quality than if just halving encoded framerate].
EDIT: You could give it a try with a couple of three or four minute tests clips.
Preset Placebo is almost pointless [compared with Preset='Very Slow'].
wonkey_monkey
21st July 2017, 19:38
Blending (I assume):
ConvertFPS(30)
ConvertFPS can't be used to reduce the frame rate by more than a factor of 2/3.
burfadel
24th July 2017, 04:26
There is no way of doing it without changing the video visually. Easiest way is to drop every second frame, but you lose half of the video! You could also use motion adaptive frame rate conversion such as MysteryX's Framerateconverter.
FranceBB
26th July 2017, 00:27
ConvertFPS can't be used to reduce the frame rate by more than a factor of 2/3.
Well, assuming that the recording has been acquired from a native 60 fps footage (the game itself, in this case), FFVideoSource("file.avi", fpsnum=30000, fpsnum=1000) would be just fine to decimate from 60 fps to 30 fps.
Assuming there aren't any dups, of course.
raffriff42
26th July 2017, 04:12
Here's a little trick Gavino (I think) showed me:Merge(SelectEven, SelectOdd)Output framerate is 1/2 of input, with frame pairs blended (0+1, 2+3, etc).
MysteryX
26th July 2017, 04:21
I doubt frame blending or interpolation will give any better result than simply discarding half of the frames. You always get higher quality by taking source frames as much as possible. You'll just get overall blurrier results, with the small benefit of preserving a few minor details that might get dropped in-between frames.
smok3
26th July 2017, 07:23
Gopro stuff going from 50p to 25p, using after effects;
A. Discard half
B. Use filter to add some fake motion blur (will help a bit with fast pans), but extremely slow and if not careful video might look synthetic.
Was the best I could get, just saying.
manono
26th July 2017, 08:29
Gopro stuff going from 50p to 25p, using after effects;
A. Discard half
B. Use filter to add some fake motion blur (will help a bit with fast pans), but extremely slow and if not careful video might look synthetic.
Was the best I could get, just saying.
AviSynth's QTGMC can do something very similar. From the doc:
Shutter Speed Motion Blur / Frame Rate
Key Points: Can output video at single or double-frame rate. For smoother playback of single-rate output there are settings to add light motion blur to simulate different shutter angles (shutter speeds)
.
.
QTGMC( Preset="Slower", FPSDivisor=2, ShutterBlur=1, ShutterAngleSrc=30, ShutterAngleOut=180 ) # Smooth single-rate output, when input has little blur
wonkey_monkey
26th July 2017, 10:10
Gopro stuff going from 50p to 25p, using after effects;
A. Discard half
B. Use filter to add some fake motion blur (will help a bit with fast pans), but extremely slow and if not careful video might look synthetic.
Was the best I could get, just saying.
If you can you should add the motion blur before discarding half the frames. The motion vectors will be better.
FranceBB
26th July 2017, 23:55
Out of curiosity, I tried QTGMC with the settings provided, but it seems that it creates some nasty artifacts on scene changes.
I mean, it's not just normal blending which blends two frames to make a new one, it's more like luma of the first frame overlayed to the next frame? O_o
QTGMC( Preset="Slower", FPSDivisor=2, ShutterBlur=1, ShutterAngleSrc=30, ShutterAngleOut=180 ) # Smooth single-rate output, when input has little blur
Frame 1 (Clean)
http://i.imgur.com/g9chB9i.jpg
Frame 2 (Luma overlayed?)
http://i.imgur.com/Z7qGh4i.jpg
Frame 3 (Clean)
http://i.imgur.com/aVtelG0.png
smok3
27th July 2017, 11:53
If you can you should add the motion blur before discarding half the frames. The motion vectors will be better.
That didn't work due to software limitations (guess), terms like motion blur shutter seems to be connected to actual frame-rate.
hello_hello
27th July 2017, 20:20
Out of curiosity, I tried QTGMC with the settings provided, but it seems that it creates some nasty artifacts on scene changes.
I mean, it's not just normal blending which blends two frames to make a new one, it's more like luma of the first frame overlayed to the next frame?
QTGMC doesn't always work well with animation.
https://forum.doom9.org/showthread.php?p=1713474#post1713474
That aside, normal interlaced video (59.94i or 50i) doesn't have the same motion blur as film, so if you deinterlace to 29.970fps or 25fps progressive (rather than 59.94fps or 50fps) the motion blur settings can help improve the smoothness of motion.
If your source is progressive, QTGMC's progressive mode might work better. You could try replacing FPSDivisor=2 with InputType=1, but in my experience QTGMC can be hit and miss for animation even without enabling the motion blur options.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.