View Full Version : I have a 60fps file...can I convert to 30fps and chop the filesize in half?
Grandy
12th August 2009, 08:44
Captured from an ESPN broadcast....
If possible, how do I do this? I used "source rate adjustment" at 30fps but it just made the playback slow.
So I tried "Frame rate conversion," and set it to 30, and it changes it to 30, but the file remains the same size!
Doesn't make sense to me.
Grandy
12th August 2009, 12:06
ChangeFPS (clip, float fps, bool "linear")
ChangeFPS (clip, int numerator [, int denominator], bool "linear")
ChangeFPS (clip1, clip2, bool "linear")
ChangeFPS (clip, string preset, bool "linear")
ChangeFPS changes the frame rate by deleting or duplicating frames.
Up to v2.05, the video gets truncated or filled up to preserve playback speed and play time (the number of frames was not changed). In later versions, the behaviour has been changed and the number of frames is increased or decreased like in ConvertFPS.
In v2.54, an option linear = true/false is added to ChangeFPS. This will make AviSynth request frames in a linear fashion, when skipping frames. Default is true.
In v2.56, if clip2 is present, the framerate of clip1 will be adjusted to match that of clip2.
In v2.57, the behaviour with respect to the framerate is a bit changed. See AssumeFPS.
This doesn't seem to work at all in Virtualdubmod. I just get script errors. Can someone give me an example script?
netmask
12th August 2009, 12:09
Run the file through MediaInfo and post the results. Resolution is a much bigger factor in file size.
Grandy
12th August 2009, 12:12
Run the file through MediaInfo and post the results. Resolution is a much bigger factor in file size.
General
Complete name : C:\Users\bfett81\Desktop\dtespn2.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 963 MiB
Duration : 31mn 48s
Overall bit rate : 4 231 Kbps
Writing application : VirtualDubMod 1.5.10.2 (build 2540/release)
Writing library : VirtualDubMod build 2540/release
Video
ID : 0
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 1 frame
Codec ID : H264
Duration : 31mn 48s
Bit rate : 3 824 Kbps
Nominal bit rate : 3 800 Kbps
Width : 760 pixels
Height : 380 pixels
Display aspect ratio : 2.000
Frame rate : 59.940 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.221
Stream size : 870 MiB (90%)
Writing library : x264 core 809371052Jul 5 2009
Encoding settings : cabac=1 / ref=1 / deblock=0:0:0 / analyse=0x3:0x113 / me=hex / subme=5 / psy_rd=0.0:0.0 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=1 / nr=0 / decimate=1 / mbaff=0 / bframes=0 / keyint=250 / keyint_min=1 / scenecut=40 / rc=abr / bitrate=3800 / ratetol=1.0 / qcomp=0.50 / qpmin=2 / qpmax=31 / qpstep=4 / ip_ratio=1.40 / aq=1:0.30
Audio
ID : 1
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : 2000
Duration : 31mn 48s
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Surround: L R, LFE
Sampling rate : 48.0 KHz
Resolution : 16 bits
Video delay : 9ms
Stream size : 87.4 MiB (9%)
Alignment : Split accross interleaves
Interleave, duration : 17 ms (1.00 video frame)
Interleave, preload duration : 500 ms
CWR03
12th August 2009, 12:22
Use VirtualDubMod, click Video > Framerate, under Framerate conversion select "Process every other frame (Decimate by 2) and click Ok, click File > Save As..., select Direct stream copy at the bottom and save with a new, unique filename. It won't cut the file size in half, but it will reduce it significantly and without loss from re-encoding.
Grandy
12th August 2009, 12:27
Use VirtualDubMod, click Video > Framerate, under Framerate conversion select "Process every other frame (Decimate by 2) and click Ok, click File > Save As..., select Direct stream copy at the bottom and save with a new, unique filename. It won't cut the file size in half, but it will reduce it significantly and without loss from re-encoding.
All this does is make the file run at half-speed.
It did shave off about 400 MB.
Interestingly enough if I re-encode instead of using direct stream copy it changes it to 30fps, and it plays back fine, but the file remains the same size.
Grandy
12th August 2009, 13:14
OK, I guess I had the wrong script information for ChangeFPS. Now it loads the file.
Of course, it doesn't work. It just makes the video run slower, instead of ACTUALLY CHANGING the fps. grrrr
This is the script I used:
DirectShowSource("C:\Users\bfett81\Desktop\dtespn2.avi")
ChangeFPS(30)
Am I a complete dumbass? I've used AviSynth in the past and everything worked logically.
Guest
12th August 2009, 13:25
Just use:
SelectEven()
Grandy
12th August 2009, 13:29
Just use:
SelectEven()
Same thing. Just slows it down.
Guest
12th August 2009, 13:49
Make the script with SelectEven() and just open it in VirtualDub. Then do File Information. It should say 29.97 fps. Then hit F5. You say that the video appears in slow motion?
You can also try using AVISource() instead of DirectShowSource():
AVISource("C:\Users\bfett81\Desktop\dtespn2.avi")
SelectEven()
If you re-encode, the file size is going to be affected by the bitrate you select.
Grandy
12th August 2009, 13:57
Make the script with SelectEven() and just open it in VirtualDub. Then do File Information. It should say 29.97 fps. Then hit F5. You say that the video appears in slow motion?
You can also try using AVISource() instead of DirectShowSource():
AVISource("C:\Users\bfett81\Desktop\dtespn2.avi")
SelectEven()
If you re-encode, the file size is going to be affected by the bitrate you select.
Yeah I know. I'm using the original bitrate so it shouldn't be any bigger.
OK, using AVISource fixed the motion problem but the file size ISN'T changing.
Guest
12th August 2009, 14:07
If you use the original bitrate, the file size will be the same, BY DEFINITION. Think about it. If you throw away half the frames, you will have half the information to encode, and so you should set the bitrate to one-half the original rate.
Grandy
12th August 2009, 14:10
If you use the original bitrate, the file size will be the same, BY DEFINITION. Think about it. If you throw away half the frames, you will have half the information to encode, and so you should set the bitrate to one-half the original rate.
OH.
Well. That explains it.
I was thinking:
X numbers of frames at X bitrate = X size
so
.5X number of frames at X bitrate = .5X quality
Keiyakusha
12th August 2009, 14:22
I guess it will be something like this:
X numbers of frames at X bitrate = X size = X quality
.5X number of frames at X bitrate = X size = 0.5X quality or slightly higher
.5X number of frames at 0.5X bitrate = 0.5X size = less then 0.5X quality (because of loss half of the frames + re-encoding)
Grandy
12th August 2009, 14:26
Uh, theoretically half the frames at half the bitrate should equal the SAME quality as full frames at full bitrate?
At least that's the way neuron2 is talking, and that's what I'm seeing now as I re-encode at half bitrate with half the frames.
Guest
12th August 2009, 14:33
quality = function of {size / original information amount}
So if you have 1000 bits of original information and you put it into 10 bits that is less "quality" than putting it into 100 bits.
Therefore, if you halve the amount of original information (by throwing away frames), then you can halve the size while keeping the same quality.
Keiyakusha
12th August 2009, 14:34
Due to some encoding techniques when the difference between frames is coded, for example by increasing framerate twice we can increase bitrate less then twice to achieve the same subjective quality.
Sorry my English is bad :(
Guest
12th August 2009, 14:42
Possibly true, but irrelevant.
The point is that if you code less original information then you can have a lower bitrate to get equivalent quality. That it may not be an exact halving is not important.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.