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

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th March 2024, 23:51   #1  |  Link
StainlessS
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].
https://www.mediafire.com/file/op94k...rive_C.7z/file

Contents of the zip, TEST directory should be copied to C:\TEST\
Code:
Contents of C:\TEST\
_SUNDRY\
    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)
x264_r3059.exe
x264_r3179.exe
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
Code:
AviSource("c:\TEST\TEST.avi",Pixel_type="YV12")
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.

Code:
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.

Thanx.

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
Code:
[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 (4.0.0.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: 1.13.138.14 (14-04-2013)
---[Information] Haali DSS2:  (14-04-2013)
---[Information] ICSharpCode.SharpZipLib: 0.85.5.452 (07-08-2008)
---[Information] MediaInfo: 18.05.0.0 (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
Old 7th March 2024, 11:57   #2  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,628
Quote:
Originally Posted by StainlessS View Post
I'm experiencing x64 MeGUI problems using x264 [latest jpsdr version], Win32threads and POSIX exe's in both TMod and Broadwell zips.
Try with StaxRip.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 7th March 2024, 16:30   #3  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,981
I dont use StaxRip,
Maybe you could try encode C:\TEST\t2.avs using Staxrip with jpsdr Broadwell::Win32threads::x264.exe
And report if some error.

EDIT:
I note that in the log it has
crf=23.000
which is what it was set as inside MeGUI, but does not exist as arg on x264.exe command line.
I'm a bit mystified as to how that crf=23.000 arg is passed
[I aint ever used command line with x264.exe, except in included bat files which were exactly as in MeGUI logfile]

Maybe I have to read x264 docs for that.
__________________
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 16:42.
StainlessS is offline   Reply With Quote
Old 7th March 2024, 17:37   #4  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,416
Quote:
Originally Posted by StainlessS View Post

EDIT:
I note that in the log it has
crf=23.000
which is what it was set as inside MeGUI, but does not exist as arg on x264.exe command line.
I'm a bit mystified as to how that crf=23.000 arg is passed
[I aint ever used command line with x264.exe, except in included bat files which were exactly as in MeGUI logfile]

Maybe I have to read x264 docs for that.
--crf 23 is the default setting for x264 (ie. If you enter no other commands, crf 23 is used)
poisondeathray is offline   Reply With Quote
Old 8th March 2024, 10:16   #5  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,628
Quote:
Originally Posted by StainlessS View Post
Maybe you could try encode C:\TEST\t2.avs using Staxrip with jpsdr Broadwell
How I wish. I have an ancient i7-2600k with no AVX2.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 8th March 2024, 14:08   #6  |  Link
Kurt.noise
Registered User
 
Join Date: Nov 2022
Posts: 32
Quote:
Originally Posted by StainlessS View Post
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
It seems the culprit is coming from the x264 executable (x264_r3179). I got the same issue as yours using it. Why do you need these exec tunings btw ?

And testing your T2.avs input script within the latest x264 binary from megui server and that works fine. So, for me its not megui fault.
Kurt.noise is offline   Reply With Quote
Old 10th March 2024, 11:40   #7  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,333
That's odd because it's the exact same source code, build with the exact same compiler's options, but just with diffent GCC...
I don't have the knowledge for explaining what happens.
__________________
My github.
jpsdr is offline   Reply With Quote
Old 11th March 2024, 14:08   #8  |  Link
Kurt.noise
Registered User
 
Join Date: Nov 2022
Posts: 32
After checking the code more deeply, I think I found where the problem comes from...and yes, it's coming from megui. Sorry. but I dont know how to fix that properly except to remove it as "error".

Last edited by Kurt.noise; 11th March 2024 at 14:24.
Kurt.noise is offline   Reply With Quote
Reply

Tags
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 12:37.


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