Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.


Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 6th March 2024, 23:51   #1  |  Link
HeartlessS Usurer
StainlessS's Avatar
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,981
MeGUI / x264.exe weirdness ??? (Number of encoded frames does not match)

This is a very peculiar problem.

I'm experiencing x64 MeGUI problems using x264 [latest jpsdr version], Win32threads and POSIX exe's in both TMod and Broadwell zips.
But, the MCF exe's dont produce problems [both TMod and Broadwell zips]
jpsdr/x264 on GitHub:- https://github.com/jpsdr/x264/releases

Here is a zip containing test files [~221MB].

Contents of the zip, TEST directory should be copied to C:\TEST\
Contents of C:\TEST\
    BAD_MEGUI_logfile.log   # error log showing "Number of encoded frames does not match the source: 236/1000"
    MAKE____TEST.mp4.avs    # Script that created TEST.mp4 file via MeGUI.

TEST.mp4                    # Source test file created by MAKE____TEST.mp4.avs and MeGUI. Test to show  T1.avs LSmash source filter OK.
TEST.AVI                    # Bug test file, TEST.mp4 converted to AVI via ffmpeg. [VDub2 TEST.mp4 save to UtVideo avi dont produce errors]

                            # Scripts to test MeGUI x264.exe
T1.avs                      # Entire Script for MeGUI, to load TEST.mp4, "LSmashVideoSource("c:\TEST\TEST.mp4")"
T2.avs                      # !!! ERROR !!! : Entire Script for MeGUI, to load TEST.avi, "AviSource("c:\TEST\TEST.avi",Pixel_type="YV12")"
                            #   After r3059, Both TMod and Broadwell, WinThread & Posix have problems (in MeGUI).

# Below just to test BAT files, which dont produce any errors with any versions that were tried.

# BAT files to test x264 executables, NONE of them produce errors from BAT files.

# BAT files to check out exe's for Broadwell:WinThread, r3059
T1_Tox264_r3059.Bat         # Test for mp4 LSmashVideoSource source filter
T2_Tox264_r3059.Bat         # Test for avi AviSource source filter

# BAT files to check out exe's for Broadwell:WinThread, r3179
T1_Tox264_r3179.Bat         # Test for mp4 LSmashVideoSource source filter
T2_Tox264_r3179.Bat         # Test for avi AviSource source filter

# x264 executables (Broadwell, Win32Threads)
To Produce error in MeGUI with r3179 x264.exe in tools/x264,
Try use the T2.avs script, and encode to x264, will stop with error [at least it does for me].

the T2.Script is simply
For some reason, it is difficult to find a script/source/filter combo to exhibit the problem.
I ended up having to create a test clip (TEST.mp4), and converted that via ffmpeg to an AVI file (TEST.avi) that produces the error,
other sources using BlankClip/ColorBars did not produce the error in MeGUI/x264.exe.

When creating a .264 file via the T2_Tox264_r3179.Bat BAT file (which does not produce the error), and comparing with MeGUI .264 error producing .264,
both .264 files are binary identical. [even though MeGUI shows error, but BAT file encode does not].

So, maybe the problem resides in MeGUI itself, maybe somehow it thinks endoded frames dont equal source frames because of some x264.exe weirdness,
but only happens with some x264.exe's and only where AviSource, the only ones I have managed to create with errors were via ffmpeg conversion.

I've tried with several versions of ffmpeg, and an older version of AviSynth, no difference.
Its well weird and was driving me nuts until I found that the MCF versions x264.exe work ok, for both TMod and Broadwell zip exe's [x86 exe's not tried].

I had not done any x264 encodes for quite a long time, so have never experienced any problems, but it would seem that there are maybe about 7 error producing version exe sets.

r3059       May 10, 2021 : OK [All versions from r3065 -> r3179, have MeGUI problems in WinThread & Posix exe, both for TMod and Broadwell exe's]

r3065       FAILS for WinThread & Posix dll's in both TMod & Broadwell zips.
# ...
r3179       FAIL for WinThread & Posix dll's in both TMod & Broadwell zips.
Anyway, I've spent about a week screwing around with this, and am unlikely to spend much more time on it because mcf x264.exe r3179 works just fine.
So far, suspects have been Avisynth, ffmpeg, MeGUI, and the mentioned x264 flavours,
if anybody does manage to figure out what the problem is/was, then let us know please.


EDIT: The T2.264 file produced during error, plays just fine, so is probably some kind of problem where MeGUI mis-identified how many frames were encoded.

From log file
[Error] Log
-[Information] Versions
--[Information] MeGUI: 2924 x64
--[Information] Update Check: Disabled
--[Information] System Information
---[Information] Operating System: Windows 10 Home 2009 x64 (10.0.19045.4046)
---[Information] .NET Framework: 4.0 (
---[Information] .NET Framework: 4.8 (4.8.09037)
---[Information] Redistributables
----[Information] Microsoft Visual C++ 2010 x64:  10.0.40219
----[Information] Microsoft Visual C++ 2010 x86:  10.0.40219
----[Information] Microsoft Visual C++ 2015 x64:  14.0.23026
---[Information] DPI: 100% (96/96)
---[Information] Monitor 1
----[Information] Resolution: 1280x1024
----[Information] Primary Screen: True
---[Information] Monitor 2
----[Information] Resolution: 2560x1440
----[Information] Primary Screen: False
--[Information] Component Information
---[Information] Haali Media Splitter: (14-04-2013)
---[Information] Haali DSS2:  (14-04-2013)
---[Information] ICSharpCode.SharpZipLib: (07-08-2008)
---[Information] MediaInfo: (08-05-2018)
---[Information] SevenZipSharp: 0.64.3890.29348 (02-01-2011)
---[Information] 7z: 9.20 (18-11-2010)
--[Information] AviSynth Information
---[Information] AviSynth Wrapper
----[Information] Version: 1.0.2717.2
----[Information] Date: 22-05-2020
----[Information] Interface: 6
---[Information] AviSynth
----[Information] File Version: 3.7.3
----[Information] File Date: 31-01-2024
----[Information] File Name: AviSynth+ 3.7.3 (r4066, master, x86_64)
----[Information] File Path: c:\windows\system32\avisynth.dll
----[Information] AviSynth Version: AviSynth+ 3.7.3 (r4066, master, x86_64)
----[Information] AviSynth+: true
----[Information] AviSynth MT: true
-[Information] Update detection
--[Information] [06/03/2024 21:05:53] Automatic update is disabled
--[Information] [06/03/2024 21:05:53] Using cached update config and server: http://megui.tmebi.de/test/
--[Information] [06/03/2024 21:05:53] redist files copied: 2017_x64
--[Information] [06/03/2024 21:05:53] No package requires an update
--[Information] [06/03/2024 21:05:53] redist files copied: 2019_x64
-[Error] Log for job1 (video, T2.avs -> T2.264)
--[Information] [06/03/2024 21:06:31] Started handling job
--[Information] [06/03/2024 21:06:31] Preprocessing
--[Information] [06/03/2024 21:06:31] AviSynth input script: AviSource("c:\TEST\TEST.avi",Pixel_type="YV12")
--[Information] [06/03/2024 21:06:32] resolution: 640x480
--[Information] [06/03/2024 21:06:32] frame rate: 2997/100
--[Information] [06/03/2024 21:06:32] frames: 1000
--[Information] [06/03/2024 21:06:32] length: 00:00:33.367
--[Information] [06/03/2024 21:06:32] aspect ratio: 4:3 (1.333)
--[Information] [06/03/2024 21:06:32] color space: YV12
--[Information] [06/03/2024 21:06:33] Job command line: "C:\NON-INSTALL\MeGUI_x64\tools\x264\x264.exe" --preset ultrafast --keyint 300 --sar 1:1 --frames 1000 --output "C:\Z\T2.264" "C:\TEST\T2.avs" 
--[Information] [06/03/2024 21:06:33] Process started
--[Information] [06/03/2024 21:06:33] Standard output stream
--[Information] [06/03/2024 21:06:33] Standard error stream
---[Information] [06/03/2024 21:06:33] avs [info]: 640x480p 1:1 @ 30000/1001 fps (cfr)
---[Information] [06/03/2024 21:06:33] avs [info]: color matrix: undef
---[Information] [06/03/2024 21:06:33] x264 [info]: using SAR=1/1
---[Information] [06/03/2024 21:06:33] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
---[Information] [06/03/2024 21:06:33] x264 [info]: profile Constrained Baseline, level 3.0, 4:2:0, 8-bit
---[Information] [06/03/2024 21:06:33] x264 [info]: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 fade_compensate=0.00 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=15 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 fgo=0 bframes=0 weightp=0 keyint=300 keyint_min=29 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0000 qcomp=0.60 qpmin=0:0:0 qpmax=69:69:69 qpstep=4 ip_ratio=1.40 aq=0 aq2=0 aq3=0
---[Information] [06/03/2024 21:06:33] x264 [info]: started at Wed Mar 06 21:06:33 2024
--[Error] [06/03/2024 21:06:34] Final statistics
---[Information] [06/03/2024 21:06:34] Constant Quality Mode: Quality 23 computed...
---[Information] [06/03/2024 21:06:34] Video Bitrate Obtained (approximate): 3810 kbit/s
---[Error] [06/03/2024 21:06:34] Number of encoded frames does not match the source: 236/1000
--[Information] [06/03/2024 21:06:34] Job completed
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 7th March 2024 at 01:10.
StainlessS is offline   Reply With Quote

error, megui, x264

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 21:10.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.