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 > Video Encoding > MPEG-4 Encoder GUIs

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th June 2018, 17:35   #6201  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by Zathor View Post
Could you please try these two builds?
http://megui.org/debug.7z

fix: may fix the change intended with 2863
force: force portable avisynth (will not try to detect system installed one)
Fix: Exactly the same. Even when encoding, Avisynth 2.6 is used.

Force: The portable Avisynth+ is used and the log file says Avisynth is not installed.

I have no idea why having Avisynth 2.6 installed should make a difference, but the problem seems to be MeGUI is failing to copy Avisynth.dll to the MeGUI folder. The same for devil.dll. I'm pretty sure it's just those two dlls. If either are in the MeGUI folder, the "fix" version deletes them when it runs (if the installed Avisynth is 2.6).

For the "force" version, the dlls are copied to the MeGUI folder. All the required runtime files are in the MeGUI folder either way. Actually, when the "installed" Avisynth is used they were removed by a previous MeGUI, but currently they always remain in the MeGUI folder. I don't know if that's by design.

The log file for the "fix" version says avisynth.dll is in the MeGUI folder, but it's not.

Quote:
--[Warning] AviSynth Information
---[Information] AviSynth Wrapper
----[Information] Version: 1.0.2847.0
----[Information] Date: 06-05-2018
----[Information] Interface: 3
---[Information] AviSynth
----[Information] File Version: 2.6.0.6
----[Information] File Date: 31-03-2015
----[Information] File Name: Avisynth 2.6
----[Information] File Path: c:\windows\system32\avisynth.dll
----[Information] AviSynth Version: AviSynth 2.60, build:Mar 31 2015 [16:38:54]
----[Information] AviSynth+: false
----[Information] AviSynth MT: false
----[Information] AviSynth Status: active
---[Warning] AviSynth portable
----[Information] File Version: 0.1
----[Information] File Date: 28-03-2018
----[Information] File Name: AviSynth+ 0.1 (r2664, MT, i386)
----[Information] File Path: c:\megui\avisynth.dll
----[Warning] AviSynth Status: inactive - portable AviSynth build cannot be used. The loaded DLL is: c:\windows\system32\avisynth.dll
-[Information] Update detection
--[Information] [25/06/18 2:20:17 AM] Connected to server: http://megui.tmebi.de/test/
--[Information] [25/06/18 2:20:17 AM] No package requires an update
I'm pretty sure this is different to the problem I originally reported because I'm sure a few versions ago MeGUI was copying Avisynth.dll to the MeGUI folder, but it wasn't using it, so something there must have changed recently. Hopefully the problem now is simply the absence of Avisynth.dll

From memory, LouieChuckyMerry is using a 64 bit version of Windows. Maybe MeGUI is behaving differently on 32 bit Windows. Or XP.....

Thank you!
hello_hello is offline   Reply With Quote
Old 24th June 2018, 18:00   #6202  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Zathor,

I tried the "fix" version of MeGUI after manually copying avisynth.dll & devil.dll to the MeGUI folder while MeGUI was running, so it couldn't delete them, but it still used the installed Avisynth 2.6 for both previewing and encoding.

Is that expected behavior? Should MeGUI simply use the dll in the MeGUI folder if it's present, regardless of the setting in Options? From what you posted previously I assumed the avisynth wrapper would first look for Avisynth.dll in the MeGUI folder and use it if it's found there.

PS, If I'm the only one with this problem maybe it's time to give up. I can always swap Avisynth.dll in the system32 folder if I want to use Avisynth+ for some reason.

Cheers.
hello_hello is offline   Reply With Quote
Old 24th June 2018, 19:03   #6203  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,405
The process during startup is:
- delete avisynth.dll if found in the MeGUI folder
- run a avs script to check if a system installed avisynth is found (+ log output)
- if no, no suitable version or if "always use portable" is checked, the avisynth.dll will be copied to the MeGUI root folder (from tools\avs)
- run a avs script to check if this portable avisynth can be used (+ log output)
- if the portable version cannot be used, delete the avisynth.dll from MeGUI root

So if you do not find it there, it has already been deleted.

Did the "force" version work or not? It does not do the steps with the system avisynth. Could you post a log of that?

What happens if you copy the tools\avs avisynth.dll and devil.dll to e.g. x264 folder and start the encode? Is it then using it?
EDIT: the avisynth.dll in an encoder folder cannot be influenced at all by MeGUI. So either it does work or not. During program start I can do a few changes for the detection and usage e.g. in AVS Creator, but not for the encoders. There the encoder has to call the proper dllbased on the search rules. Therefore it would be good to know e.g. when you run the x264.exe (without MeGUI) on a command line if the avisynth.dll in that folder will be used or not.

Last edited by Zathor; 24th June 2018 at 19:08.
Zathor is offline   Reply With Quote
Old 24th June 2018, 21:31   #6204  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
It still seems to me that MeGUI is failing to copy Avisynth.dll to the MeGUI folder when Avisynth 2.6 is installed, for some inexplicable reason.

Quote:
Originally Posted by Zathor View Post
Did the "force" version work or not? It does not do the steps with the system avisynth. Could you post a log of that?
Yes it did. The log file really only says the same as I did in my earlier post, but here it is:

Quote:
[Information] AviSynth Information
-[Information] AviSynth Wrapper
--[Information] Version: 1.0.2847.0
--[Information] Date: 06-05-2018
--[Information] Interface: 3
-[Information] AviSynth
--[Information] AviSynth Status: not installed
-[Information] AviSynth portable
--[Information] File Version: 0.1
--[Information] File Date: 28-03-2018
--[Information] File Name: AviSynth+ 0.1 (r2664, MT, i386)
--[Information] File Path: c:\megui\avisynth.dll
--[Information] AviSynth Version: AviSynth+ 0.1 (r2664, MT, i386)
--[Information] AviSynth+: true
--[Information] AviSynth MT: true
--[Information] AviSynth Status: active
Quote:
Originally Posted by Zathor View Post
What happens if you copy the tools\avs avisynth.dll and devil.dll to e.g. x264 folder and start the encode? Is it then using it?
"Fix" deletes them from the x264 folder when it runs, but if I start "fix" and then manually copy the dlls to the x264 folder, it previews scripts with Avisynth 2.6 and encodes them with Avisynth+.

For "Force" it's the other way round. If I run "force" and then delete Avisynth.dll and devil.dll from the x264 folder, MeGUI still previews scripts using Avisynth+ but it encodes them with Avisynth 2.6.

Quote:
Originally Posted by Zathor View Post
EDIT: the avisynth.dll in an encoder folder cannot be influenced at all by MeGUI. So either it does work or not. During program start I can do a few changes for the detection and usage e.g. in AVS Creator, but not for the encoders. There the encoder has to call the proper dllbased on the search rules. Therefore it would be good to know e.g. when you run the x264.exe (without MeGUI) on a command line if the avisynth.dll in that folder will be used or not.
With the dlls in the x264 folder, I used the same command line as MeGUI via a command prompt and the script encoded successfully with Avisynth+.

"C:\MeGUI\tools\x264\x264.exe" --keyint 240 --sar 1:1 --frames 240 --output "D:\version.mkv" "D:\version.avs"

Full disclosure: Each time I started an encode via the command line I had to dismiss the following message before the encode would start, but it always ran successfully. I have seen the same message on a few occasions when starting MeGUI (I'm pretty sure it pops up as an MeGUI.exe message and not an x264 message), but it only happens occasionally. I've never seen the error when starting an encode with MeGUI or mention of it in the log file. The same error popped up when encoding via the command line with both Avisynth 2.6 and Avisynth+.

Cheers.



PS After all that testing, the error message popped up just now when I restarted MeGUI. It looks like this:


Last edited by hello_hello; 24th June 2018 at 22:02.
hello_hello is offline   Reply With Quote
Old 24th June 2018, 21:51   #6205  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,405
So bottom line is that only MeGUI itself has the problem. It seems that when using first the system installed AviSynth it cannot switch back to portable one. The encoders are always fine. Is that summary correct?
I will change it in the way that if "always use portable" is ticked I will not do any checks with the system installed one (same as "forced" version).
There will be still the issue if "always use portable" is not ticked and the system installed one cannot be used (outdated).

EDIT: regarding the opencl.dll error - it seems your graphics driver does not support it.

Last edited by Zathor; 24th June 2018 at 21:56.
Zathor is offline   Reply With Quote
Old 25th June 2018, 07:06   #6206  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by Zathor View Post
So bottom line is that only MeGUI itself has the problem. It seems that when using first the system installed AviSynth it cannot switch back to portable one. The encoders are always fine. Is that summary correct?
That's correct.
I'd still be interested to know if anyone else running 32 bit Windows has the same problem, or if it's just me.

Quote:
Originally Posted by Zathor View Post
EDIT: regarding the opencl.dll error - it seems your graphics driver does not support it.
I guess it's unrelated then. I'm still using graphics drivers from 2013, because there were two driver updates that made a mess so I stopped updating them (I'm not a gamer so driver updates don't do much for me). I probably should look at updating the drivers now to see if it fixes that problem.

Thanks for your help.
hello_hello is offline   Reply With Quote
Old 26th June 2018, 00:23   #6207  |  Link
LouieChuckyMerry
Registered User
 
LouieChuckyMerry's Avatar
 
Join Date: Feb 2014
Posts: 355
Quote:
Originally Posted by Zathor View Post
The fix in 2863 was intended for the issue LouieChuckyMerry had. He conformed that it was working when "show debug information" was enabled so I have enabled that now by default for that part. However I noticed that I changed it a bit and I do not know if it therefore still works as expected
I checked Version 2865. "Log debug information" needs to be ticked for the log to indicate AviSynth+ true, otherwise the log shows false.
LouieChuckyMerry is offline   Reply With Quote
Old 26th June 2018, 00:32   #6208  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by LouieChuckyMerry View Post
Code:
--[Information] MeGUI: 2860 x86
--[Information] Update Check: development update server
-[Information] Operating System: Windows 7 Premium x64 SP1 (6.1.65536.7601)
...
-[Information] File Version: 2.6.0.5
-[Information] File Date: 20-02-2015
-[Information] File Name: Avisynth 2.6
-[Information] File Path: c:\windows\system32\avisynth.dll
A 32 bit avisynth.dll must be in SysWoW64 on a 64 bit OS, not Sytem32. My guess is that it's in the right place but megui can't properly detect the SysWoW64 directory.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 26th June 2018, 07:30   #6209  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Because MeGUI x86 is a 32 bit process, a 64 bit Windows will have mapped SysWoW64 as fake "system32"; only a 64 bit process can actually see SysWoW64.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 26th June 2018, 08:05   #6210  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by LigH View Post
only a 64 bit process can actually see SysWoW64.


I spent quite a bit of time to determine the "real" SysWoW64 directory in my programs without getting Windows file redirection involved.

If you're interested, here is the code I use nowadays:
Code:
BOOL GetSysWoW64Directory(string &s_syswow64dir, string &s_errormsg)
{
  s_syswow64dir = "";
  s_errormsg = "";

  HMODULE hKernel32 = GetModuleHandle("kernel32.dll");
  if (hKernel32 == NULL)
  {
    s_errormsg = "Cannot obtain module handle to kernel32.dll";
    return FALSE;
  }

  BOOL bIs64BitProcess = FALSE;
  BOOL bIsWoW64Process = FALSE;

  if (sizeof(void*) == 8) // Test 64 on 64
    bIs64BitProcess = TRUE;
  else // Test WOW64
  {
    BOOL bWoW64Process = FALSE;
    typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
    LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(hKernel32, "IsWow64Process");
    if (fnIsWow64Process != NULL)
      fnIsWow64Process(GetCurrentProcess(), &bWoW64Process);
    if (bWoW64Process)
      bIsWoW64Process = TRUE;
  }

  if ((bIs64BitProcess) || (bIsWoW64Process))
  {
    char szSysWOW64Directory[MAX_PATH];
    typedef UINT (WINAPI *LPFN_GETSYSTEMWOW64DIRECTORY)(LPTSTR, UINT);
    LPFN_GETSYSTEMWOW64DIRECTORY getSystemWow64Directory = (LPFN_GETSYSTEMWOW64DIRECTORY)GetProcAddress(hKernel32, "GetSystemWow64DirectoryA");

    if (getSystemWow64Directory(szSysWOW64Directory, sizeof(szSysWOW64Directory)) > 3)
      s_syswow64dir.assign(szSysWOW64Directory);
  }
  else
  {
    s_errormsg = "Not running on 64 Bit OS";
    return FALSE;
  }

  return TRUE;
}
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 28th June 2018 at 10:31.
Groucho2004 is offline   Reply With Quote
Old 26th June 2018, 08:40   #6211  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
And this code works when you compile it as 32 bit application? Interesting. But also quite complex, I doubt many "leisure time programmers" will know all the involved system functions. It may not even be necessary.

I mean ... in general, most applications only need access to the system DLL's in the directory matching their own bitness. If you have a 32 bit application, simply use "system32" and trust in Windows mapping it to SysWoW64 if it is a 64 bit Windows. The application may not even need to know that the mapping happened at all. It is not interested in DLL's of the opposite bitness, anyway.

For MeGUI specifically, the main reason to report the path is to tell apart "the system directory" from "the application directory". When MeGUI x86, as a 32 bit process, tries to copy from "the system directory", Windows will ensure that "the 32 bit system directory" will be accessed (no choice in a 32 bit Windows, and mapped SysWoW64 in a 64 bit Windows). The reported directory may be not "physically" correct from the scope of a 64 bit system, but virtually correct from the scope of a 32 bit application running in a "Windows on Windows64" subsystem. Scope matters.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 26th June 2018, 09:04   #6212  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by LigH View Post
And this code works when you compile it as 32 bit application?
Works in 32 and 64 bit programs on 32 and 64 bit OS.

Quote:
Originally Posted by LigH View Post
The reported directory may be not "physically" correct from the scope of a 64 bit system, but virtually correct from the scope of a 32 bit application running in a "Windows on Windows64" subsystem. Scope matters.
I like to know the real directory, not a "virtual" one.

The whole reason why I wrote this function is because the Win32 API file/folder redirection functions do not work consistently across Windows versions and I needed something reliable.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 26th June 2018, 09:17   #6213  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Alright. Zathor will know whether this is relevant and useful for MeGUI.

The access error reported by hello_hello appears to be somewhat dependent on the last used AviSynth installer. So I wonder if there is e.g. a file sharing mode issue due to the avisynth.dll being used by additional processes (and may it just be a Windows Explorer file type hook or similar) when the legacy AviSynth 2.6 installer was used... that seems to be a quite specific issue, not much related to just detecting the location of the system path in either scope.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 26th June 2018, 21:02   #6214  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,405
Thanks, Groucho2004, for the code. I know that the shown path is not correct because of redirection, however that is the path which is shown when I check for running modules and their path. To see if it is the same as when using the portable one this is sufficient and not worth additional efforts. I may change my mind in the future
Zathor is offline   Reply With Quote
Old 26th June 2018, 23:39   #6215  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Zather,
thanks for the hard work! All is good now.

Quote:
-[Information] Versions
--[Information] MeGUI: 2867 x86
--[Information] Update Check: development update server
--[Information] System Information
---[Information] Operating System: Windows XP Professional x86 SP3 (5.1.196608.2600)
---[Information] .NET Framework: 4.0 (4.0.30319)
---[Information] Redistributables
----[Information] Microsoft Visual C++ 2010 x86: 10.0.40219
----[Information] Microsoft Visual C++ 2013 x86: 12.0.30501
----[Information] Microsoft Visual C++ 2017 x86: 14.13.26020
---[Information] DPI: 100% (96/96)
---[Information] Monitor 1
----[Information] Resolution: 1152x864
----[Information] Primary Screen: True
---[Information] Monitor 2
----[Information] Resolution: 1920x1080
----[Information] Primary Screen: False
--[Information] Component Information
---[Information] Haali Media Splitter: 1.11.96.14 (03-03-2011)
---[Information] Haali DSS2: (03-03-2011)
---[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.2847.0
----[Information] Date: 06-05-2018
----[Information] Interface: 3
---[Information] AviSynth
----[Information] AviSynth Status: ignored as portable build is forced
---[Information] AviSynth portable
----[Information] File Version: 0.1
----[Information] File Date: 28-03-2018
----[Information] File Name: AviSynth+ 0.1 (r2664, MT, i386)
----[Information] File Path: c:\program files\megui\avisynth.dll
----[Information] AviSynth Version: AviSynth+ 0.1 (r2664, MT, i386)
----[Information] AviSynth+: true
----[Information] AviSynth MT: true
----[Information] AviSynth Status: active
hello_hello is offline   Reply With Quote
Old 27th June 2018, 03:40   #6216  |  Link
imsrk48
Registered User
 
imsrk48's Avatar
 
Join Date: Nov 2017
Posts: 154
Hey Dear MeGui's Developers
Please add option for burn subtitles on video in mkv file like handbrake

Sent from my P4 using Tapatalk
imsrk48 is offline   Reply With Quote
Old 27th June 2018, 07:23   #6217  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
It already exists in the "AVS Script Creator" tool ("Filters" tab), because to "burn in" subtitles (make them video content), they have to be processed by an AviSynth plugin.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 28th June 2018, 11:44   #6218  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 556
MeGUI 2836 says that x264 L4.1 is "--vbv-bufsize 78125 --vbv-maxrate 62500", while x264 says that L4.1 is "--vbv-bufsize 62500 --vbv-maxrate 50000". So which is the correct H264 L4.1?

Example when using MeGUI:
Quote:
---[Warning] [02/10/2015 09:48:29] x264 [warning]: VBV bitrate (62500) > level limit (50000)
---[Warning] [02/10/2015 09:48:30] x264 [warning]: VBV buffer (78125) > level limit (62500)
EDIT: OK then I understand, I had MeGUI set on High Profile, not Main Profile. Thanks tebasuna51!

Last edited by Forteen88; 28th June 2018 at 12:40.
Forteen88 is offline   Reply With Quote
Old 28th June 2018, 12:34   #6219  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
From https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC

Quote:
Level 4.1 max video coding layer kbit/s (Baseline, Extended and Main Profiles) = 50000
The maximum bit rate for High Profile is 1.25 times that of the Base/Extended/Main Profiles -> 62500
Change the 'AVC Profile' from 'High' to 'Main' in MeGUI x264 config dialog and you obtain:
--vbv-bufsize 62500 --vbv-maxrate 50000

You can let --vbv-bufsize 78125 --vbv-maxrate 62500 if you know than your player support Level 4.1 High Profile.

Or change to --vbv-bufsize 62500 --vbv-maxrate 50000
if you want make your encode more compatible with players.

You can low until: --level 4.0 --vbv-bufsize 25000 --vbv-maxrate 20000
for DivX Plus HD certified players (some TV's or standalone players)
It is your choice.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 29th June 2018, 10:36   #6220  |  Link
DS2902
Registered User
 
Join Date: Feb 2018
Posts: 3
After upgrading to 2867, it stopped running
Attached Files
File Type: zip logs.zip (3.4 KB, 44 views)
DS2902 is offline   Reply With Quote
Reply

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 23:11.


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