View Full Version : Convert 60.00 fps video to 59.94
TCmullet
26th September 2019, 15:34
I have a file open. I don't want to change what tool I use to open the file. It is 60.000 fps. I don't want to do audio stretching. Is there an easy way to decimate this properly to get to 59.94 fps? (Some of the Avisynth functions are very hard to understand.)
poisondeathray
26th September 2019, 15:49
ChangeFPS(60000,1001)
This means you get a dropped frame every 1001 frames
Or use AssumeFPS(60000,1001) and fix the audio
StainlessS
26th September 2019, 15:57
I would go with
O=Last
AssumeFPS(60000,1001,sync_audio=true) # adjust audio to match video
ReSampleAudio(O.AudioRate) # restore original samplerate
TCmullet
26th September 2019, 16:34
ChangeFPS(60000,1001)
This means you get a dropped frame every 1001 frames
Or use AssumeFPS(60000,1001) and fix the audio
According to the docs, ChangeFPS(60000,1001) should work as it does not touch the audio. Yet it's very off. What could be wrong? We're not dealing with a short clip. It's 48 min. and my testing for sync is near the end.
I've been of the belief that I merely need to decimate the video but NOT touch the audio. Duration of audio would not change; duration (timewise) of video would not change, just the number of frames and the frame rate.
sneaker_ger
26th September 2019, 16:37
If it's async with ChangeFPS() then it's also async without ChangeFPS(), i.e. the issue is something else (delay, audio gaps, broken source, variable framerate ...). Without knowing more about the source and your workflow it is not really possible to tell.
TCmullet
26th September 2019, 16:49
If it's async with ChangeFPS() then it's also async without ChangeFPS(), i.e. the issue is something else (delay, audio gaps, broken source, variable framerate ...). Without knowing more about the source and your workflow it is not really possible to tell.
Ah you replied while I was coming to realize that. Even without any mod, the sync was OFF. I only thought it was on as there's no dialog (voices are off camera) and the only sudden sounds are occasionally. And it was mere coincidence that a sound aligned with the visual of what could have caused the sound. I checked my source with MediaInfo and it's that darn VFR! (Variable framerate.) So I need to get the sync right to begin with before any adjustments. (And it may be that the fix of VFR will solve this.)
TCmullet
26th September 2019, 17:10
This is what solved the VFR:
video=ffvideosource("myfile.mp4",fpsnum=60000,fpsden=1001)
Had the same sync whether 59.94 or 60.00 (via the num and den).
It's still a bit off, but that will take a stretch to do, as the original is imperfect.
But I'm still glad I asked. Now, if I or anyone gets a CFR video at 60.00 fps and wants to change it, we'll have this thread. Thanks to all for your input.
TCmullet
12th May 2020, 01:53
I've done Stanless's solution a few times. (Again, thanks to all for contributing.)
Is there a way to do it by DECIMATING appropriately? I believe the methods described here do not decimate. would it be a huge hairy SELECT statement?
hello_hello
12th May 2020, 12:01
Add Info() to the script and check the frame rate and frame count. Then try ChangeFPS(60000,1001).Info() and check again. If the total frame count is lower - decimation.
The same applies when converting VFR to CFR with something like ffvideosource("myfile.mp4",fpsnum=60000,fpsden=1001).
Without the frame rate conversion it's decoded at the average frame rate, but you'll still be able to use Info() to check how much the frame count changes, with and without it.
Maybe there's gaps in the audio. How are you combining it with the video? I know nothing about MP4 muxing, but if you open the encoded video with MKVToolNixGUI, add the original MP4, de-select the original video stream and mux, the A/V sync shouldn't change for the output MKV.
Katie Boundary
16th May 2020, 03:49
http://avisynth.nl/index.php/TIVTC/TDecimate
Script:
blahblahblah().tdecimate(cycle=1001)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.