![]() |
|
[BUG] [AviSynth] - "Overwrite Input Frame rate" not working! - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html) +--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html) +--- Thread: [BUG] [AviSynth] - "Overwrite Input Frame rate" not working! (/thread-4510.html) |
[AviSynth] - "Overwrite Input Frame rate" not working! - The_Tinkerer - 09.10.2026 I have some old wmv/asf videos from 2005 that I am converting. They have a problem with dropping frames when converting. The resulting files have lesser frame counts than the sources, causing the audio to go out of sync. This is most likely caused by these stupid old Windows WMV encoders skipping frames that they drop as static or duplicate (still openings, short low-change sections, etc.). Windows Media encoders commonly did this to save bits on an Internet where many people still used dial up and it could make a significant difference in loading times. The problem is that AviSynth drops these frames (there's usually only 1-3 seconds worth) and stacks the remaining ones in order, but, there's slightly less frames, and the audio will go out of sync. (To be fair, FFprobe also drops these frames when scanning the file with "-count_frames" and reports the exact same lower total for the frame count.) The fix for a .mp4 re-encode would be to go to Misc -> Overwrite Input -> Frame rate, and enter 29.970030 (30,000/1001, the video's input frame rate). The expected result would then be to see in the AviSynth script preview: LWLibavVideoSource("F:\cj\fix\Test.wmv",fpsnum=30000,fpsden=1001,cache=false,dr=true,format="YUV420P8", prefer_hw=0,repeat=true)That should fix it, however, currently, Hybrid does not insert ",fpsnum=30000,fpsden=1001" into the line, leaving it like this: LWLibavVideoSource("F:\cj\fix\Test.wmv",cache=false,dr=true,format="YUV420P8", prefer_hw=0,repeat=true)So, Hybrid's AviSynth scripting code needs to be fixed so that when Misc -> Overwrite Input -> Frame rate has something entered, it should be inserting the correct corresponding ",fpsnum=x,fpsden=x" frame rate info the "LWLibavVideoSource" line in the AviSynth script. (I do believe that Hybrid is currently doing this correctly in Vapoursynth.) If the user has something specified in Misc -> Overwrite Output -> Frame rate to for some reason, then that frame rate should be entered into the AviSynth script in the "AssumeFPS(x,x)" line towards the end. Just for quick reference in case it might be helpful, common rational values for standard video frame rates:
For now, a quick fix would be to enter the "LWLibavVideoSource("F:\cj\fix\Test.wmv",fpsnum=30000,fpsden=1001,cache=false,dr=true,format="YUV420P8", prefer_hw=0,repeat=true)" line into a filter on the Custom tab, inserting it at the very top by putting it in Insert before -> ColorMatrix. There will then be two "LWLibavVideoSource" lines in the script, but since the Custom one comes after the first one generated by Hybrid, the Custom one will override it. RE: [AviSynth] - "Overwrite Input Frame rate" not working! - Selur - 09.10.2026 The intention of "Misc -> Overwrite Input -> Frame rate" was to tell Hybrid to add an AssumeFPS after the decoding and thus not change normal decoding. What you seem to want and what adding "fpsnum=30,fpsden=1" (or similar) does is tell the decoder to produce a specified frame rate from the source. To do this, in Hybrid, one can: 1. enabled Config->Input->Decoding->CFR output 2. set a frame rate using Filtering->Misc->Overwrite Input->Frame rate" Vapoursynth will then add something like: clip = core.lsmas.LWLibavSource(source="G:/TestClips&Co/files/test.avi", format="YUV420P8", stream_index=0, cache=0, fpsnum=70, prefer_hw=0)=> I'll add it to my todo list. (shouldn't be hard) Cu Selur RE: [AviSynth] - "Overwrite Input Frame rate" not working! - Selur - 10.10.2026 Uploaded a new dev under experimental->R81 which should fix this. so with: 1. enabling "Config->Input->Decoding->CFR output" in combination with 2. setting a frame rate using "Filtering->Misc->Overwrite Input->Frame rate" you should get what you wanted. Cu Selur Ps.: going to bed now,.. n8 PPs.: Hybrid_dev_2026.10.10-01513 hopefully fixes it (under experimental->R81) |