View Full Version : Converting from Irregular framerates
andrewk1719
2nd January 2006, 17:01
I have an AVI with an irregular framerate. How do I convert it to a standard NTSC framerate while keeping the audio in sync and keeping the file the same size? I attempted this using virtualdub but the file size was about 80gb. How do I do this properly?
jggimi
2nd January 2006, 20:41
Hello, and welcome to the forum.
1) Could you enlighten us by what you mean by "irregular" ?? For playback on a PC, framerate should not be an issue, for playback on a standalone, some limitations may apply.
2) The reason your output went to 80GB is because you were encoding into uncompressed video. WIth RGB color, every pixel is 24 bits -- in other words, 3 bytes. Multiply width x height x frames x 3, and that's why you had 80 billion bytes.
3) Reencoding into an MPEG codec -- DivX, I assume? -- will lessen the quality, likely below acceptable levels. There are methods for changing framerate without reencoding the video -- they reencode the audio instead.
Let us know more details -- the current framerate and format (DivX, I assume?), and what your eventual playback environment will be. You may not need to do anything at all.
andrewk1719
2nd January 2006, 21:49
Irregular as in 20.000 FPS encoded with Divx. I want to convert this *.avi file to a DVD iso using DIKO, however the freeware version only accepts standard framerates. So basically I want to burn this avi file on to a DVD to watch on a standalone player without a loss in quality.
setarip_old
2nd January 2006, 22:10
@andrewk1719
Hi!
One method would be to use "TMPGEnc" or "TMPGEncPlus" (Different than "TMPGEnc DVD Author") and simply select the (NTSC) DVD "wizard"/template to convert the DivX-compressed .AVI into DVD-compliant MPEG-2 format...
jggimi
2nd January 2006, 22:18
Are you familiar with AviSynth? If not, here's a brief level-set: It's not an application, its "frameserving middleware." AviSynth (.avs) files are text files that contain video (and sometimes audio) commands. When played in most players (or fed through most encoders), they appear to be uncompressed video.
If DIKO -- which I'm not familiar with -- can accept .avs files as if they were .avi files, then the process of adjusting framerate via AviSynth is doable.
Assuming your input is 20fps progressive, you can adjust the framerate without adjusting the framecount, using a two-line .avs text file, e.g.:AviSource("c:\path\to\file.avi")
AssumeFPS(23.976)Audio can be pitch adjusted with the AssumeFPS() filter as well, but only if the audio format in the .avi is Linear PCM (.wav) format.
The ChangeFPS() filter and the ConvertFPS() filter can also be used. These will blend fields to add frames. For more info, see www.avisynth.org.
If you don't have AviSynth already installed with other video encoding tools, it's available separately from Doom9's download pages.
-----
EDIT: Setarip jumped in with an alternative while I was typing. He's right, there are other DVD encoding tools. For even more encoding tool options, including step-by-step instructions, take a look at Doom9's Format Conversion guides. These don't cover framerate conversion, however.
My advice about using AviSynth is specific to changing framerates while continuing the DVD creation tool(s) you're familiar with, assuming they will work with AviSynth.
andrewk1719
3rd January 2006, 21:13
Here is the *.avs that DIKO uses in part of its conversion:
converttoyv12()
Blockbuster(method="noise",detail_min=1,detail_max=3,variance=0.1,seed=1)
Deen("c2d",2,4,6,4,6,0.5,9,"")
asharp(1,4)
UnDot()
DivXResize(WIDTH, HEIGHT, 0, "LanczosResize",WIDESCREEN)
Blockbuster(method="noise",detail_min=1,detail_max=10,variance=0.3,seed=2)
DivXBorders(HEIGHT,OVERSCAN)
AddAudio()
So simply by including
AviSource("c:\path\to\file.avi")
AssumeFPS(23.976)
in my *.avs file, AviSynth will automatically adjust the audio and video to 23.976 fps and maintain synchronization?
jggimi
4th January 2006, 00:37
Unless the audio track in your 20fps clip is in .wav format (Linear PCM), AviSynth's FPS changing filters will not deal with it.
You would have to convert your audio to wav for AviSynth to be able to manage the audio, or handle it separately. BeSweet GUI can adjust audio time based on input and output video framerates, and may be a better choice.
That DIKO script, as shown, does not include the source video in it, but I can tell that the source is without audio. That's because the AddAudio() filter adds a fake audio track for use with the CCE MPEG-2 encoder. See http://www.avisynth.org/AddAudio for more info.
I'm moving this the the DVD authoring forum, since the framerate transition you want to make has nothing to do with DivX encoding, -- you're planning on MPEG-2 for DVD.
andrewk1719
4th January 2006, 03:31
So is there a tool that can convert this AVI into MPEG-2 with appropriate framerates?
I tryed tmpgenc but it erred halfway through. I'm going to attempt it again tonight, but if that fails, what can I do?
setarip_old
4th January 2006, 08:39
I tryed tmpgenc but it erred halfway through.That being the case, there is probably a flaw in your .AVI file. What was the exact error message generated by TMPGEnc?
manono
4th January 2006, 16:53
I encode 20fps files (silent films) in CCE all the time with no problem. I assume TMPGEnc can do the same. I'm positive it can if you feed it an .avs. Then when done, use DGPulldown set for 20->29.97 to get 29.97fps output and author normally. You won't have to adjust the audio, although you may have to convert it if it's MP3.
By the way, are you sure it's 20fps and not 19.98fps? And does this thing play smoothly at 20fps? If it's really 20fps, it sounds to me like someone created it from a PAL DVD with Force Film set. If so, it should play noticeably jerky.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.