Log in

View Full Version : MeGUI development


Pages : 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92

Doom9
21st November 2005, 18:34
what commandline do you use when using the csc 2.0 compiler to compile binaries against the 1.1 runtime?

charleski
21st November 2005, 19:09
I wrote up the method I used to compile using .NET 2.0 csc and .NET 1.1 libs and includes here (http://homepages.nildram.co.uk/~cajking/CompilingFor1.1.zip).
Both my machines have been upgraded to shiny new .NET 2.0, so I can't test this to be sure it works though. The binary I created is here (http://homepages.nildram.co.uk/~cajking/meguiLevelPatch_NET1.1libs.exe). Could you test that and make sure it works?

Sharktooth
21st November 2005, 19:55
what commandline do you use when using the csc 2.0 compiler to compile binaries against the 1.1 runtime?
i use your .bat.

Sharktooth
21st November 2005, 19:57
Reported on IRC:
(18:25:29) X_plode: http://putfile.com/pic.php?pic=11/32411242663.png&s=x12
18:29
(18:31:27) X_plode: http://s47.yousendit.com/d.aspx?id=3VPEUXA3MJFMR21HIHIJ5VDZDT
18:34
(18:37:28) X_plode: the error comes when i try to open the config after loading the avs file...opening the config before opening the avs there is no error

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: '0' is not a valid value for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'.
at System.Windows.Forms.NumericUpDown.set_Value(Decimal value)
at MeGUI.x264ConfigurationDialog.set_CodecSettings(x264Settings value)
at MeGUI.x264ConfigurationDialog.EnforceLevel(x264Settings inputSettings)
at MeGUI.x264ConfigurationDialog.showCommandLine()
at MeGUI.x264ConfigurationDialog.avcLevel_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
at MeGUI.x264ConfigurationDialog.set_CodecSettings(x264Settings value)
at MeGUI.MeGUI.videoConfigButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
megui-x264
Assembly Version: 1.0.2151.32470
Win32 Version: 1.0.2151.32470
CodeBase: file:///C:/x264/megui-x264.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.

Doom9
21st November 2005, 20:00
i use your .bat.But you have to modify it, won't you? After all in my box the bat creates 1.1 binaries.

charleski
21st November 2005, 21:15
@Sharktooth: Ok, I'll take a look at that. I also noticed on scanning the code again that the levels validation misses the width and height restrictions, so I'm putting that in and altering the function call a bit (I think I was trying to be too clever at one point).
@doom9: You need to change a few environment variables. I modified the vsvars32 batch file so it should set them correctly for you, see my post above. The actual compile.bat stays the same.

Sharktooth
21st November 2005, 21:50
yeah. i kept your .bat unmodified and once you set the vars in the right way everything works as it should.

EDIT: i'll ask bobor if he can setup an SVN server for MeGUI... working with diffs is much easier.

charleski
21st November 2005, 23:42
Ok, I fixed a silly error and made a few other changes to the logic - all detailed in the changelog. I also added in the dimension restrictions.
Full project dump is here (http://homepages.nildram.co.uk/~cajking/MeGUI-src.0.2.3.1b-Levels0.3.rar)
Modified files are here (http://homepages.nildram.co.uk/~cajking/MeGUI-src.0.2.3.1b-LevelModFiles0.3.rar)
Version compiled for .Net 1.1 is here (http://homepages.nildram.co.uk/~cajking/meguiLevelPatch0.3_NET1.1libs.exe).


EDIT: i'll ask bobor if he can setup an SVN server for MeGUI... working with diffs is much easier.That would be nice.

falcon2000eg
22nd November 2005, 01:59
Version compiled for .Net 1.1 is here (http://homepages.nildram.co.uk/~cajking/meguiLevelPatch0.3_NET1.1libs.exe).



i downloaded it and it ask me to install .net 2

falcon2000eg
22nd November 2005, 02:12
The new build of sharktooth crashed when I press config button after loadindg the movie not before that.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: '0' is not a valid value for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'.
at System.Windows.Forms.NumericUpDown.set_Value(Decimal value)
at MeGUI.x264ConfigurationDialog.set_CodecSettings(x264Settings value)
at MeGUI.x264ConfigurationDialog.EnforceLevel(x264Settings inputSettings)
at MeGUI.x264ConfigurationDialog.showCommandLine()
at MeGUI.x264ConfigurationDialog.avcLevel_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
at MeGUI.x264ConfigurationDialog.set_CodecSettings(x264Settings value)
at MeGUI.MeGUI.videoConfigButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///d:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
megui-x264
Assembly Version: 1.0.2151.32470
Win32 Version: 1.0.2151.32470
CodeBase: file:///D:/Program%20Files/x264/megui-x264.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///d:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///d:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///d:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///d:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.

charleski
22nd November 2005, 02:20
i downloaded it and it ask me to install .net 2
Gah, I probably missed something in the environment, i'll take another look.
The new build of sharktooth crashed when I press config button after loadindg the movie not before that.Yes, this bug should be fixed now.

[Edit: Ok, I altered some of the environment variables that were probably pointing to the wrong place and re-complied. Can you try downloading the program again and running it? The link remains the same (http://homepages.nildram.co.uk/~cajking/meguiLevelPatch0.3_NET1.1libs.exe)

Sharktooth
22nd November 2005, 03:54
x264_only conditional compiling is still broken... please add the fix i posted above (and check if there are other broken things due to conditional compiling)

Form1.cs(2420,43): error CS0103: The name 'hres' does not exist in the class or
namespace 'MeGUI.MeGUI'
Form1.cs(2420,49): error CS0103: The name 'vres' does not exist in the class or
namespace 'MeGUI.MeGUI'

Files moved here: http://forum.doom9.org/showthread.php?p=741271#post741271

falcon2000eg
22nd November 2005, 03:58
same problem charleski

Sharktooth
22nd November 2005, 04:01
my bins should work (they're in my previous post).

falcon2000eg
22nd November 2005, 04:08
Thanks, it worked i will try it now with your new build rev.368c

i will wait there changes in the SVN

waw :cool: 0 time wait

Sharktooth
22nd November 2005, 04:16
372 is up, it already includes the patched MeGUI-x264.

Doom9
22nd November 2005, 10:55
hmm... I never gave you guys the "c" code.. it contains some improvements in the job-moving functions. I guess now I have to hack that into the latest sources instead.

charleski
22nd November 2005, 15:04
x264_only conditional compiling is still broken... please add the fix i posted above (and check if there are other broken things due to conditional compiling)Grr, I'm an idiot, sorry, I only copied half the relevant lines instead of the full set. I've been through all the modified files, and that's the only spot where there's a call to the new functions outside an #ifdef FULL... block.

same problem charleskiSeems like I'll have to build a VM and try to work out what I'm doing wrong with the libraries, sorry.

Doom9
22nd November 2005, 17:31
Here's the fix for the up/down crash. Replace the code inside upButton_Click with the following:

if (queueListView.SelectedItems.Count > 0)
{
MoveListViewItem(ref this.queueListView, true);
updateJobPositions();
}

likewise, replace the code inside downButton_Click with the following:

if (queueListView.SelectedItems.Count > 0)
{
MoveListViewItem(ref this.queueListView, false);
updateJobPositions();
}

This doesn't take care of the weird activity when you select multiple jobs and press up/down, but at least there are no crashes anymore.

Chainmax
22nd November 2005, 18:58
Sharktooth, is automated 3-pass with turbo fixed in this latest release?

Sharktooth
22nd November 2005, 19:15
not yet and btw it's auto 3 pass that's b0rked even without turbo.

Sharktooth
22nd November 2005, 19:48
The following files include the doom9 patch ( http://forum.doom9.org/showthread.php?p=741234#post741234 )
moved here: http://forum.doom9.org/showthread.php?p=742099#post742099

Chainmax
22nd November 2005, 21:18
not yet and btw it's auto 3 pass that's b0rked even without turbo.

I see. Any idea what is causing the flaw?

charleski
22nd November 2005, 21:21
I can take a look into automated 3-pass, though I only use 2-pass and after searching the forum I see that no-one's specified exactly what problem they're having. It seems to be a flaw in the command-line generation, though.

Chainmax
22nd November 2005, 23:12
Sharktooth made a post somewhere explaining the problem. I used to use 2-pass as well, but seeing how fast first pass is a lot faster than a regular pass and doesn't result in a noticeable quality drop, it's like getting 2.9-pass quality at 2.1-pass encoding time, so to speak. That's why I switched to that mode.

charleski
23rd November 2005, 00:21
Yeah, the commandline shown in the interface isn't right when in 3-pass mode, but I generated some jobs and looked at the XML - it seems fine to me, so the actual commandlines passed to x264 appear correct.

foxyshadis
23rd November 2005, 02:08
Sharktooth made a post somewhere explaining the problem. I used to use 2-pass as well, but seeing how fast first pass is a lot faster than a regular pass and doesn't result in a noticeable quality drop, it's like getting 2.9-pass quality at 2.1-pass encoding time, so to speak. That's why I switched to that mode.
Vaguely related: Fast first pass doesn't seem to disable some of the newer options. (I have no idea which could be appropriately disabled.) A recent encode with b-rdo, trellis, adaptive quant, and b-adaptive, seemed to have almost exactly the same framerate (from a pre-filtered lossless video) between passes.

It might be worth going back now that so many new options are available and testing again for minimum lossage.

charleski
23rd November 2005, 02:20
That's interesting. can you recreate the job that caused this behaviour and post the XML? (If you close MeGUI before executing the jobs they'll be saved in the jobs folder)
Certainly I've always found 1st-pass turbo to run about 4 times faster than the 2nd pass.

foxyshadis
23rd November 2005, 05:47
I keep all old jobs around (no particular reason) so I just pulled the xml. The settings all show up there, but that depends on if b-rdo is even activated for subme 1 and whether trillis is activating.

<?xml version="1.0"?>
<Job xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="VideoJob">
<Input>C:\video\work\mark3.avs</Input>
<Output />
<Name>job33</Name>
<Priority>0</Priority>
<Status>5</Status>
<Position>32</Position>
<Start>2005-11-21T10:36:29.7118750-08:00</Start>
<End>2005-11-21T10:49:19.3056250-08:00</End>
<FPS>9.98636964703489</FPS>
<Commandline>"x264.exe" --pass 1 --bitrate 700 --stats "C:\video\work\x264.log" --aq-strength 0.7 --bframes 3 --b-pyramid --filter 1,1 --subme 1 --b-rdo --weightb --trellis 1 --analyse none --me dia --merange 20 --progress --no-psnr --output NUL "C:\video\work\mark3.avs" </Commandline>
<Settings xsi:type="x264Settings">
<EncodingMode>2</EncodingMode>
<BitrateQuantizer>700</BitrateQuantizer>
<KeyframeInterval>250</KeyframeInterval>
<NbBframes>3</NbBframes>
<MinQuantizer>10</MinQuantizer>
<MaxQuantizer>51</MaxQuantizer>
<SARX>0</SARX>
<SARY>0</SARY>
<Turbo>true</Turbo>
<V4MV>false</V4MV>
<QPel>false</QPel>
<Trellis>false</Trellis>
<CreditsQuantizer>40</CreditsQuantizer>
<FourCCs>
<string>VSSH</string>
<string>x264</string>
<string>avc1</string>
</FourCCs>
<Logfile>C:\video\work\x264.log</Logfile>
<CustomEncoderOptions />
<FourCC>1</FourCC>
<Zones />
<AQStrength>0.7</AQStrength>
<AQSensitivity>15.0</AQSensitivity>
<MixedRefs>false</MixedRefs>
<X264Trellis>1</X264Trellis>
<NbRefFrames>1</NbRefFrames>
<AlphaDeblock>1</AlphaDeblock>
<BetaDeblock>1</BetaDeblock>
<SubPelRefinement>0</SubPelRefinement>
<MaxQuantDelta>4</MaxQuantDelta>
<TempQuantBlur>0</TempQuantBlur>
<BframePredictionMode>2</BframePredictionMode>
<VBVBufferSize>-1</VBVBufferSize>
<VBVMaxBitrate>-1</VBVMaxBitrate>
<METype>0</METype>
<MERange>20</MERange>
<NbThreads>1</NbThreads>
<MinGOPSize>25</MinGOPSize>
<Profile>2</Profile>
<Level>15</Level>
<IPFactor>1.4</IPFactor>
<PBFactor>1.3</PBFactor>
<ChromaQPOffset>0</ChromaQPOffset>
<VBVInitialBuffer>0.9</VBVInitialBuffer>
<BitrateVariance>1.0</BitrateVariance>
<QuantCompression>0.6</QuantCompression>
<TempComplexityBlur>20</TempComplexityBlur>
<TempQuanBlurCC>0.5</TempQuanBlurCC>
<SCDSensitivity>40</SCDSensitivity>
<BframeBias>0</BframeBias>
<Deblock>true</Deblock>
<Cabac>true</Cabac>
<WeightedBPrediction>true</WeightedBPrediction>
<AdaptiveBFrames>true</AdaptiveBFrames>
<BFramePyramid>true</BFramePyramid>
<BRDO>true</BRDO>
<ChromaME>true</ChromaME>
<P8x8mv>false</P8x8mv>
<B8x8mv>false</B8x8mv>
<I4x4mv>false</I4x4mv>
<I8x8mv>false</I8x8mv>
<P4x4mv>false</P4x4mv>
<AdaptiveDCT>false</AdaptiveDCT>
<Lossless>false</Lossless>
<QuantizerMatrix>C:\Program Files\music-video\x264\eqm_avc_hr.cfg</QuantizerMatrix>
<QuantizerMatrixType>0</QuantizerMatrixType>
</Settings>
<OutputType>0</OutputType>
<DesiredSize>0</DesiredSize>
<NumberOfFrames>7670</NumberOfFrames>
<Framerate>23.976043137696813</Framerate>
</Job>

Sharktooth
23rd November 2005, 13:28
for what concerns turbo mode the (in theory) b-rdo can be "disabled" as well as mixed-refs (not sure about trellis).

charleski
23rd November 2005, 19:32
I'm still struggling to get MeGUI compiled for .NET 1.1. Could you take a look at this environment Sharktooth and see what I'm doing wrong?
Here are the environment variables in the command shell I use to compile:
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\******\Application Data
CLASSPATH=C:\Program Files\Java\jre1.5.0_05\lib\ext\QTJava.zip
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=******
ComSpec=C:\WINDOWS\system32\cmd.exe
DevEnvDir=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE
FP_NO_HOST_CHECK=NO
FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
FrameworkSDKDir=C:\Program Files\Microsoft Visual Studio 8\SDK\v1.1
FrameworkVersion=v1.1.4322
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\******
INCLUDE=C:\Program Files\Microsoft Visual Studio 8\SDK\v1.1\INCLUDE;
LIB=C:\Program Files\Microsoft Visual Studio 8\SDK\v1.1\LIB;
LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
LOGONSERVER=\\*******
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\VC\BIN;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322;C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\AviApps\YAMB;C:\Program Files\AviApps\x264;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Visual Studio 2005 SDK\2005.10\VisualStudioIntegration\Tools\Bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0209
ProgramFiles=C:\Program Files
PROMPT=$P$G
QTJAVA=C:\Program Files\Java\jre1.5.0_05\lib\ext\QTJava.zip
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\******\LOCALS~1\Temp
TMP=C:\DOCUME~1\******\LOCALS~1\Temp
USERDOMAIN=******
USERNAME=******
USERPROFILE=C:\Documents and Settings\******
VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8\VC
VS80COMNTOOLS=C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\
VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
windir=C:\WINDOWS

Or just post the environment variables you use so i can compare them.
Thanks.

acidsex
23rd November 2005, 21:51
Any chance that the Avisynth creator to support more than just DGIndex files? My reasoning is I have some DV-avi files I would like to encode using MeGUI and sometimes I have a rather large batch of them and it is very tedious having to create an avs by typing. Even if we could get a generic "Direct Show Source" template would save me a great deal of time. Would this be difficult to implement Doom9?

charleski
23rd November 2005, 22:40
Yeah, I was thinking of adding in more functionality for the avs creator along with a couple of other enhancements I've written. Give me a couple of days.

Kostarum Rex Persia
23rd November 2005, 23:24
Question for MeGUI developers: is it possible(in next builds) to introduce AVI and MPEG2 input in MeGUI? (curently,only AVS input)
I don't have knowledge,nor time to learn Avisynth scripting,so I be very delighted if you,guys,make MeGUI more friendship for use.

charleski
23rd November 2005, 23:58
Well the best way to do that is to modify the avs creator as acidsex described so that it can accept avis and modify the DGindexer so that it will accept mpeg2s. It would be a mistake to remove avisynth from the input stream.

Kostarum Rex Persia
24th November 2005, 00:03
Great,but when I may expect new revision of MeGUI with MPEG2 and AVI input.Until new year,or perhaps sooner?

Sirber
24th November 2005, 00:10
Invest the asking time to some coding ;) Shouldn't be hard adding that to MeGUI...

Kostarum Rex Persia
24th November 2005, 00:19
Ok,but from where to start.Can you advice me,Sirber.

Sirber
24th November 2005, 00:33
1) http://msdn.microsoft.com/vstudio/express/visualcsharp/
2) http://www.rarlab.com/rar/wrar351.exe
3) http://forum.doom9.org/MeGUI-src.0.2.3.1b.rar
3) Extract the sources
4) Open the sources with C#
5) Find the input manager class and add your stuff
6) Post your modifications

charleski
24th November 2005, 00:41
I'm writing the code right now actually :p, but I have a few other bits i want to add as well, so give it a day or two.

[edit] BTW, I'm blind, MeGUI can already import MPeg2 files in the d2v creator and automatically pass them to the avisynth module.

Doom9
24th November 2005, 09:17
BTW, I'm blind, MeGUI can already import MPeg2 files in the d2v creator and automatically pass them to the avisynth module.No you're not blind, that's the way it works. It would be nice if people actually tried first before asking for anything.. makes them look rather sillyif they don't.

It would be a mistake to remove avisynth from the input stream.Absolutely, especially since x264.exe only supports AviSynth and raw .yuv input.

I see a few issues with AVI input though: the first one is audio. There are only so many audio types BeSweet can handle with the vobinput plugin, and then you have those with multiple audio tracks (not sure BeSweet supports that at all and even if it did, it would mean a lot of overhead in somehow figuring out what tracks there are and the user has no help in selecting the right one), then there's the issue of missing filters (directshow versus vfw... avisource versus directshowsource, movies may play just fine but are uneditable because of a lack of VfW filters). Those are just a few issues that come along when you consider AVI. And the main problem may not even the technical side but the user side as people will throw the crap they download from P2P networks at MeGUI.. at least with DVDs you have some kind of regularity in the input.

Sharktooth
24th November 2005, 15:09
I'm still struggling to get MeGUI compiled for .NET 1.1. Could you take a look at this environment Sharktooth and see what I'm doing wrong?
Here are the environment variables in the command shell I use to compile:
...
Or just post the environment variables you use so i can compare them.
Thanks.
I use the SDK compiler (csc.exe). here's my sdkvars.bat:
Set Path=C:\Program Files\Microsoft.NET\SDK\v1.1\Bin\;C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\;%PATH%
Set LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\;"C:\Program Files\Microsoft.NET\SDK\v1.1\Lib\";%LIB%
Set INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\;"C:\Program Files\Microsoft.NET\SDK\v1.1\include\";%INCLUDE%
Set NetSamplePath=C:\PROGRA~1\MICROS~1.NET\SDK\v1.1\

Sharktooth
24th November 2005, 16:08
switch (xs.EncodingMode)
{
case 0: // ABR
sb.Append("--bitrate " + xs.BitrateQuantizer + " ");
break;
case 1: // CQ
sb.Append("--qp " + xs.BitrateQuantizer + " ");
break;
case 2: // 2 pass first pass
sb.Append("--pass 1 --bitrate " + xs.BitrateQuantizer + " --stats " + "\"" + xs.Logfile + "\" ");
break;
case 3: // 2 pass second pass
case 4: // automated twopass
sb.Append("--pass 2 --bitrate " + xs.BitrateQuantizer + " --stats " + "\"" + xs.Logfile + "\" ");
break;
case 5: // 3 pass first pass
sb.Append("--pass 1 --bitrate " + xs.BitrateQuantizer + " --stats " + "\"" + xs.Logfile + "\" ");
break;
case 6: // 3 pass 2nd pass
sb.Append("--pass 3 --bitrate " + xs.BitrateQuantizer + " --stats " + "\"" + xs.Logfile + "\" ");
break;
case 7: // 3 pass 3rd pass
sb.Append("--pass 3 --bitrate " + xs.BitrateQuantizer + " --stats " + "\"" + xs.Logfile + "\" ");
break;
case 9: // constant quality
sb.Append("--crf " + xs.BitrateQuantizer + " ");
break;
} // now add the rest of the x264 encoder options
Case 8 is missing (that's the 3 pass auto!). the code for 3 pass auto is missing from both full and x264_only.

Doom9
24th November 2005, 17:12
I guess I need to have a look personally.. you're still looking in the wrong place. case 8 and case 4 are virtual cases.. they never happen because in job generation, when a job has either of these states, it'll be changed to 2 / 5 respectively, and another (or two) jobs are created having values 3 and whatever your settings say it should in case of a three pass (note that in 3 pass it can be 1-3-2 or 1-3-3, where the former means the stats are not being overwritten by the third pass).
So, this switch never gets a 4 or an 8, but when I initially wrote it, I didn't quote know that yet but figured case 3 and 4 would be the same, hence 3 falls through to 4. If you got rid of case 4 and put the code from case 4 to case 3, the software would work just the same).

Also, the latest patch still has problems. activate b-rdo, set nb of b-frames back to 0, press OK, press config again and b-rdo is on again..

Doom9
24th November 2005, 17:24
hmm.. I don't see the problem. Created an automated 3 pass, here are the 3 commandlines:

<Commandline>"x264.exe" --pass 1 --bitrate 700 --stats "D:\DVDs\DVDVolume\VIDEO_TS\re-trailer.stats" --bframes 2 --no-b-adapt --subme 1 --b-rdo --analyse none --me dia --threads 2 --progress --no-psnr --output NUL "D:\DVDs\DVDVolume\VIDEO_TS\re-trailer.avs" </Commandline>
<Commandline>"x264.exe" --pass 3 --bitrate 700 --stats "D:\DVDs\DVDVolume\VIDEO_TS\re-trailer.stats" --bframes 2 --no-b-adapt --subme 6 --b-rdo --analyse p8x8,b8x8,i4x4 --threads 2 --progress --no-psnr --output "D:\DVDs\DVDVolume\VIDEO_TS\re-trailer.mp4" "D:\DVDs\DVDVolume\VIDEO_TS\re-trailer.avs" </Commandline>
<Commandline>"x264.exe" --pass 3 --bitrate 700 --stats "D:\DVDs\DVDVolume\VIDEO_TS\re-trailer.stats" --bframes 2 --no-b-adapt --subme 6 --b-rdo --analyse p8x8,b8x8,i4x4 --threads 2 --progress --no-psnr --output "D:\DVDs\DVDVolume\VIDEO_TS\re-trailer.mp4" "D:\DVDs\DVDVolume\VIDEO_TS\re-trailer.avs" </Commandline>

build: 0.2.3.1b-CK_LevelsPatch_0.3

bottom line: trust the commandline in the jobs, not the preview because you cannot preview an automated 3 pass intelligently without a serious rewrite.

Sirber
24th November 2005, 17:26
The last 2 uses "-- pass 3".

Should be:

--pass 1
--pass 3
--pass 2

:confused:

Doom9
24th November 2005, 17:29
aargh.. another one not getting it.. there's an option in the settings "overwrite stats file in 3rd pass".. if it's checked, it's 1-3-3, if not, 1-3-2.. but I already posted that in this very page..

Sharktooth
24th November 2005, 17:30
bug no.1 : When clicking "show commandline" checkbox in the config dialog the wrong commandline is displayed (1st pass) and if you select "turbo" it will display the turbo speedups.

Sharktooth
24th November 2005, 17:31
bug no.2: Im still looking HOW to reproduce the commandline b0rking...
ill restore the 3rd pass in my megui video profiles hoping someone will catch that bug again.

Doom9
24th November 2005, 17:43
if you absolutely must see the 3rd pass commandline in preview when selecting automated 3 pass (keep in mind this is a virtual mode.. there cannot be a Job object having encodingMode == 8 (automated 3 pass), or == 4 (automated 2 pass). And unless somebody is messing around in jobUtil, this has worked properly for ages. The whole tri-state thing never touched jobUtil, only the GUI class and CommandlineGenerator, and in the latter it's only generateVideoCommandline that has been touched.

alright and here's the change to be made to

if (xs.EncodingMode != 2 && xs.EncodingMode != 4 && xs.EncodingMode != 5 && xs.EncodingMode != 8) and replace it with

if (!(xs.EncodingMode == 2 || xs.EncodingMode == 5))

and then add the darned case 8 in the switch:

case 7: // 3 pass 3rd pass
case 8: // automated threepass, show third pass options
sb.Append("--pass 3 --bitrate " + xs.BitrateQuantizer + " --stats " + "\"" + xs.Logfile + "\" ");
break;

you should have the preview you so crave.. it changes absolutely nothing in job generation though.. this is purely cosmetical since encodingmode = 8 doesn't exist when it comes to jobs. But I have a feeling this is where people go wrong.. commandline preview isn't WYSIWYG.. it's WYSINQWYG.. where NQ = not quite.

to further speed up turbo, you can also add the following to

if (xs.Turbo)

in generateX264CLICommandline()

add
xs.MixedRefs = false;
xs.BRDO = false;