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

Kurtnoise
28th November 2007, 16:24
Hi,

needs to be run as administrator on vista or it shows a useless confusing error message.

it should really auto acquire admin rights if it needs it, or at least a notice that it needs to be run as admin.
Just a note about that. it can be done easily during the compilation with MSVC#2008 by adding a manifest file...

<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.

<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />

If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</asmv1:assembly>


save it with .manifest extension.

Kurtnoise
1st December 2007, 13:52
A patch (http://kurtnoise.free.fr/index.php?dir=MeGUI/&file=framework_handling.patch) for a better Framework handling or this one (http://kurtnoise.free.fr/index.php?dir=MeGUI/&file=framework_handling_v2.patch).

Deckard2019
1st December 2007, 15:00
About this (https://sourceforge.net/tracker/index.php?func=detail&aid=1667076&group_id=156112&atid=798479), do you mean I can already process H264 .m2ts using MeGUI with it ?
I was about to launch encoding process using this : demux using xport, build .dga with DGAVCIndex, create .avs with ... notepad, feed MeGUI with it.
I wonder if it's reliable now ?

As I understand, MeGUI integration will soon occur. Great news !
Thanks a lot.

Sharktooth
1st December 2007, 15:01
the v2 patch is much better.
however instead of using all those if/else if, try with "case", like on the first patch.

Kurtnoise
1st December 2007, 17:13
the v2 patch is much better.
however instead of using all those if/else if, try with "case", like on the first patch.
my bad...one "break" statement was at the wrong place in my 1st patch. That's why it returned an error. I'll fix that.

Sharktooth
3rd December 2007, 14:47
In tags/0_2_x_x
core\details\mux\MuxWindow.Designer.cs(102,28): error CS0117:
'MeGUI.core.gui.TargetSizeSCBox' does not contain a definition for
'CustomSizes'
I think you left out to update something during your last commit.

Kurtnoise
5th December 2007, 15:40
Fixed...:)

Kurtnoise
5th December 2007, 15:42
According to the webpage (http://www.microsoft.com/downloads/details.aspx?familyid=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&displaylang=en), XP or Server 2003 is required...

Anyway, my notice was for Vista users only...;)

Here is the pseudo-code:
if (OS_type == Windows Vista)
{
if (Runtime == 2.0 SP1 || Runtime == 3.0 || Runtime == 3.5)
do nothing;
else {
if (MessageBox.Show("You're running MeGUI on Windows Vista but to avoid several issues, may I ask you to upgrade your .Net Framework ?\n", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
run http://www.microsoft.com/downloads/details.aspx?familyid=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&displaylang=en;
}
}
ok to commit ?



A patch for a better Framework handling or this one.
ok to commit the 1st one ?

Sharktooth
5th December 2007, 15:45
it's ok for me.

Kurtnoise
5th December 2007, 15:46
I think also that the changelog.txt should be changed (as formal way) for the dev builds...I mean don't mix up the 0.3.xx with 0.2.xxx.

Sharktooth
5th December 2007, 15:47
the problem is... how... :)

Kurtnoise
5th December 2007, 15:53
well, all the dev builds come from the svn trunk and are tagged as 0.3.xxx from nowadays, right ?

So, creating a new changelog.txt file with only the 0.3.xxx changes should be fine. :)

Sharktooth
5th December 2007, 15:58
ill see what i can do for the next build...in the meanwhile...
stable:
0.2.6.1041
- (Kurtnoise) Refactoring the dispose functionality. Patch by Eamon.
- (Kurtnoise) [MuxWindow] Help button was at the wrong place.
- (Kurtnoise) Updated the correct MediaInfoWrapper library.
dev:
0.3.0.1002 (includes 0.2.x branch fixes)
- (Kurtnoise) added a manifest file for the UAC level required on Vista.
- (Kurtnoise) [JobQueue] changed public to internal for the JobChangeEvent (to fix the compilation within MSVC2008).
- (Kurtnoise) [MainForm] cosmetics.
- (Kurtnoise) [MainForm] added some MessageBoxIcons.
- (Kurtnoise) Expand/Collapse all for logs.
- (Kurtnoise) silent worker creation if none exists (#1837578).
- (Kurtnoise) More informative logtree names for each jobs.
- (Kurtnoise) [JobQueue] FPS columm aligned to left.

Kurtnoise
5th December 2007, 16:01
yes but just drop down to the file and you'll see changes from 0.2.6.xxx. I think it's confusing...

Sharktooth
5th December 2007, 16:09
uhm... reorganized the changelog.
should be a bit more clear now.

Kurtnoise
5th December 2007, 20:11
mmh...this is not what I thought but whatever. :D


btw, what do you think about this form for the changelog ?

http://img253.imageshack.us/img253/6238/meguichangelog051220072ky3.png

mainly a richTextBox with some highlights for each versions number.


yeah, I'm back to XP now...:D

Sharktooth
5th December 2007, 20:30
uhm.... i think a treeview (like the log) will be better.
every version collapsed except the last one.
oh btw... you know i hate vista...

berrinam
6th December 2007, 03:52
Ok, after some computer failures, I got back to work on my profiles refactor. Here's a new patch which I think is complete (except whatever bugs I've added :P). The main changes are

fixed selected profiles behavior
internal changes in ProfileManager
profileimporter/profileexporter now works (the profileporter was mostly rewritten)
can load old profile collections
removed code for reading very old profiles (from 0.2.4.1004 and below)
some new util functions: templated Delegate types to avoid declaring the delegate types, better XmlSerialization functions, and ByID function
made Profiles and a few ProfileManager internals IIDable, so they can be searched with the ByID function

Get the patch here (http://megui.org/berrinam_patches/profiles_refactor/profiles_refactor_3.patch). I've added a new folder, so you'll have to create that yourself and perhaps also add the file manually. The folder is megui/core/details/0_2_6_x_profileloader/, and the file contained in it is Loader.cs. If you need to add the file manually, you can get it from here (http://megui.org/berrinam_patches/profiles_refactor/Loader.cs).

Kurtnoise
6th December 2007, 10:07
sounds good but as I said earlier, we need to add/tweak something to check also the output file format when we select a profile.

All x264-PD and x264-SA profiles should have only MP4 as output format. I'll check the code to try to add this.


edit: in your patch, Loader.cs index is twice...

berrinam
6th December 2007, 10:18
Not sure why that is. I just let TortoiseSVN make the patch for me.

As far as the x264-PD and x264-SA profiles go, I don't think it is right for profiles to contain information about the output format. As I see it, a video profile contains information about the codec settings, and nothing else. (This is why I removed PAR from codec panels, and why I plan to remove zones from there as well).

Keeping this statement true also makes the profile code simpler. I think we should explore other ways of enforcing MP4-only output, and more generally the problem of hardware output. This is probably the wrong approach, but another way of handling the problem you suggested would be to create a new type of codec/encoder.

Anyway, I think this problem is separate from my patch and can be addressed later.

SpAwN_gUy
6th December 2007, 10:29
my idea about the "hardware" is to add something to meGUI-Options to enforce "the Whole meGUI act for Some hardware".. i guess there are some restrictions to sound also and for subtitles, but not only the output container

berrinam
6th December 2007, 10:50
I'm having a go at adding support for x264 patches to MeGUI. But I can't find all the information for some of parameters. What range of values can --thread-queue take? What range of values can --aq-strength and --aq-sensitivity take?

berrinam
6th December 2007, 10:55
my idea about the "hardware" is to add something to meGUI-Options to enforce "the Whole meGUI act for Some hardware".. i guess there are some restrictions to sound also and for subtitles, but not only the output container

Like "Validate AVC Level"? I see what you mean, although I think Validate AVC Level is currently a bit unreliable.

I guess my concern is just that I don't want hardware support to be done as an afterthought, as that kind of thing has caused troubles time and again for MeGUI.

Kurtnoise
6th December 2007, 13:20
As far as the x264-PD and x264-SA profiles go, I don't think it is right for profiles to contain information about the output format. As I see it, a video profile contains information about the codec settings, and nothing else. (This is why I removed PAR from codec panels, and why I plan to remove zones from there as well).

Keeping this statement true also makes the profile code simpler. I think we should explore other ways of enforcing MP4-only output, and more generally the problem of hardware output. This is probably the wrong approach, but another way of handling the problem you suggested would be to create a new type of codec/encoder.

ok...you're right. Sorry for the disturbance. I'll try to find a better way to do that outside profiles settings.

all in all, your patch looks ok but I need to test it more extensively.

berrinam
6th December 2007, 13:22
Rereading my post, it comes off a bit aggressive. Sorry about that.

Kurtnoise
6th December 2007, 13:24
According to the webpage (http://www.microsoft.com/downloads/details.aspx?familyid=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&displaylang=en), XP or Server 2003 is required...

Anyway, my notice was for Vista users only...;)

Here is the pseudo-code:
if (OS_type == Windows Vista)
{
if (Runtime == 2.0 SP1 || Runtime == 3.0 || Runtime == 3.5)
do nothing;
else {
if (MessageBox.Show("You're running MeGUI on Windows Vista but to avoid several issues, may I ask you to upgrade your .Net Framework ?\n", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
run http://www.microsoft.com/downloads/details.aspx?familyid=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&displaylang=en;
}
}
ok, applied. So from now, MeGUI is "Vista ready" I think. :p At least, using MSVC# 2008 as compiler...

berrinam
6th December 2007, 13:24
Oh, and back on the topic of C# 3.0: are we ready to migrate now?

Kurtnoise
6th December 2007, 13:29
I'm not aware of some issues with it...So, I'd say *yes*.

Sharktooth
6th December 2007, 14:20
where i can get aften SVN builds?

EDIT: Never mind...

mroz
6th December 2007, 14:20
@Berrinam: in post 3523 you might want to edit one word in your quote of SpAwN_gUy - I think that's a rather harsh way to descibe one of your children ;)

Sharktooth
6th December 2007, 14:48
stable:

0.2.6.1042
- (Kurtnoise) better Framework handling.
- (Kurtnoise) added a warning for Vista users when the Framework is not up-to-dated.

dev:
0.3.0.1003 (includes 0.2.6.1042 fixes)
- (Kurtnoise) use the proper command syntax for svn and stable builds concerning Aften encoder

Sharktooth
6th December 2007, 18:27
@Kurtnoise: the .NET 2.0 SP1 is ONLY for 2003/XP... :(

Kurtnoise
6th December 2007, 19:21
yeah...blame Microsoft for that. Honestly that doesn't make sense because the framework 2.0 SP1 is required for the 3.5 which is Vista compatible.

To solve this, we just need to update the link to the framework 3.5.

check
6th December 2007, 22:53
What range of values can --aq-strength and --aq-sensitivity take?
These are both in --longhelp for supported builds.
Strength is a float between 0 and 1.1
Sensitivity is an int between 0 and 21(?)

berrinam
6th December 2007, 23:18
I saw them in the --longhelp. Ok, 22 is clearly the maximum for aq-sensitivity, but how about aq-strength? Just because 1.1 is "strong", higher values could still be allowed. I think I have currently set the maximum to 5.0.

And how about --thread-queue?

Kurtnoise
7th December 2007, 08:50
And how about --thread-queue?
I don't think it's useful because this has been removed from the svn...

berrinam
7th December 2007, 09:30
Ok. I didn't know that.

check
7th December 2007, 10:01
Just because 1.1 is "strong", higher values could still be allowed. I think I have currently set the maximum to 5.0.
If you are going for 'possible' rather than 'sane' (if it does go above 1.1), can you please remove the restriction on maximum GOP size? As far as I know there's no maximum.

berrinam
7th December 2007, 13:29
I don't want MeGUI to restrict what the users can do except unless there's a very good reason to do so (like with upsizing when resizing). However, there is a problem that .NET requires you to set a for those number boxes. So the solution is just setting something that no-one would ever go higher than. I'm not sure what it currently is, but I'll look into it.

berrinam
8th December 2007, 11:45
I've done what you asked for, check.

I've got some concerns about the generated x264 commandlines:
MeGUI generates --filter 1,1 for the deblock filter. But this is what x264 --longhelp says: -f, --deblock <alpha:beta> Loop filter AlphaC0 and Beta parameters [0:0]. So, shouldn't it actually be --deblock 1:1. But why is x264 not saying "unrecognised parameter --filter"?
MeGUI generates --analyse all. But x264 --longhelp says -A, --partitions <string> Partitions to consider ["p8x8,b8x8,i8x8,i4x4"]
- p8x8, p4x4, b8x8, i8x8, i4x4
- none, all
(p4x4 requires p8x8. i8x8 requires --8x8dct.). So shouldn't it be --partitions all

Kurtnoise
8th December 2007, 12:07
But why is x264 not saying "unrecognised parameter --filter" "--analyse"?
because those switches are still valid in the internal command x264 parsing. ;)

laserfan
8th December 2007, 21:59
Might I suggest to the developers that MeGUI be changed to Not default to "Open Preview after AviSynth script selection".

Because this is checked On by default, first-time users who load a very large file e.g. >15Mb find that it takes many minutes for MeGUI to open, causing some to abort thinking MeGUI is broken. :scared:

berrinam
8th December 2007, 23:18
Who writes >15Mb Avisynth scripts?

laserfan
9th December 2007, 00:20
I'm sorry, I meant >15Gb source files, not the .avs itself. MeGUI apparently wants to scan the whole file before previewing it.

berrinam
9th December 2007, 01:18
MeGUI doesn't scan the whole file first. Depending on your avisynth script, avisynth might, although MeGUI won't generate any such scripts. Can you give me an example of a script which takes minutes to load?

berrinam
9th December 2007, 02:01
More information logged by the audio encoder: Index: AviSynthAudioEncoder.cs
===================================================================
--- AviSynthAudioEncoder.cs (revision 431)
+++ AviSynthAudioEncoder.cs (working copy)
@@ -268,11 +268,13 @@
{
try
{
-
+ _log.LogEvent("Encode thread started");
using (AviSynthScriptEnvironment env = new AviSynthScriptEnvironment())
{
+ _log.LogEvent("Avisynth script environment opened");
using (AviSynthClip a = env.ParseScript(_avisynthAudioScript))
{
+ _log.LogEvent("Script loaded");
if (0 == a.ChannelsCount)
throw new ApplicationException("Can't find audio stream");

@@ -289,6 +291,7 @@
int frameBufferTotalSize = MAX_SAMPLES_PER_ONCE * a.ChannelsCount * a.BytesPerSample;
byte[] frameBuffer = new byte[frameBufferTotalSize];
createEncoderProcess(a);
+ _log.LogEvent("Encoder process started");
try
{
using (Stream target = _encoderProcess.StandardInput.BaseStream)
@@ -879,6 +882,8 @@
);
_avisynthAudioScript = script.ToString();

+ _log.LogValue("Avisynth script", _avisynthAudioScript);
+ _log.LogValue("Commandline used", _encoderCommandLine);
}

public void start()

Kurtnoise
9th December 2007, 09:40
that's fine. ;)


btw, could you remind me why avimux_gui has been prefered to divxmux ? I'm lazy to make a search in this huge thread. :)


there are also some bugs which can be closed in the tracker.

berrinam
9th December 2007, 12:52
avimux_gui is the best avi muxer of those we have considered (mencoder, ffmpeg, divxmux) in terms of its features and support for the avi format. The main problem of divxmux is that it only muxes divx video streams; theoroetically, it should work for xvid with a changed FourCC, but that seemed to be faulty. Also, I think it, like mencoder and ffmpeg, was unable to handle multiple audio streams, and was perhaps somewhat limited in terms of ac3 support. avimux_gui simply has none of these problems, as far as I know.

berrinam
9th December 2007, 13:12
Hmmm... I just fixed the drag&drop bugs and then realised you had already done that. But I think your solution just hid (and avoided) the real problem, which is the incorrect line in SaveMode.set. As a result, I don't think we need FileBar_Load any more. So my patch below reverts your fix and fixes the line in SaveMode.set. :)
Index: core/gui/FileBar.cs
===================================================================
--- core/gui/FileBar.cs (revision 436)
+++ core/gui/FileBar.cs (working copy)
@@ -19,13 +19,14 @@
public FileBar()
{
InitializeComponent();
+ DragDropUtil.RegisterSingleFileDragDrop(filename, setFilename, delegate() { return Filter; });
}

private bool saveMode = false;
public bool SaveMode
{
get { return saveMode; }
- set { saveMode = value; filename.AllowDrop = value; }
+ set { saveMode = value; filename.AllowDrop = !value; }
}

public bool ReadOnly
@@ -117,11 +118,6 @@
setFilename(filename.Text);
triggerEvent();
}
-
- private void FileBar_Load(object sender, EventArgs e)
- {
- DragDropUtil.RegisterSingleFileDragDrop(filename, setFilename, delegate() { return Filter; });
- }
}
public class FileBarEventArgs : EventArgs
{
Index: core/gui/FileBar.Designer.cs
===================================================================
--- core/gui/FileBar.Designer.cs (revision 436)
+++ core/gui/FileBar.Designer.cs (working copy)
@@ -62,7 +62,6 @@
this.Controls.Add(this.openButton);
this.Name = "FileBar";
this.Size = new System.Drawing.Size(269, 26);
- this.Load += new System.EventHandler(this.FileBar_Load);
this.ResumeLayout(false);
this.PerformLayout();

berrinam
9th December 2007, 13:38
Here's some code to handle huge delays more friendlily for the user than an error (bug 1846758 (http://sourceforge.net/tracker/index.php?func=detail&aid=1846758&group_id=156112&atid=798476)).

Index: core/details/mux/MuxStreamControl.cs
===================================================================
--- core/details/mux/MuxStreamControl.cs (revision 436)
+++ core/details/mux/MuxStreamControl.cs (working copy)
@@ -93,7 +93,7 @@

private void input_FileSelected(FileBar sender, FileBarEventArgs args)
{
- audioDelay.Value = PrettyFormatting.getDelay(input.Filename) ?? 0;
+ audioDelay.Value = PrettyFormatting.getDelayAndCheck(input.Filename) ?? 0;
raiseEvent();
}
}
Index: core/details/mux/MuxStreamControl.Designer.cs
===================================================================
--- core/details/mux/MuxStreamControl.Designer.cs (revision 436)
+++ core/details/mux/MuxStreamControl.Designer.cs (working copy)
@@ -109,12 +109,12 @@
//
this.audioDelay.Location = new System.Drawing.Point(112, 61);
this.audioDelay.Maximum = new decimal(new int[] {
- 5000,
+ 2147483647,
0,
0,
0});
this.audioDelay.Minimum = new decimal(new int[] {
- 5000,
+ -2147483648,
0,
0,
-2147483648});
Index: core/gui/AudioEncodingTab.cs
===================================================================
--- core/gui/AudioEncodingTab.cs (revision 436)
+++ core/gui/AudioEncodingTab.cs (working copy)
@@ -221,7 +221,7 @@
{
AudioInput = fileName;

- delay.Value = PrettyFormatting.getDelay(fileName) ?? 0;
+ delay.Value = PrettyFormatting.getDelayAndCheck(fileName) ?? 0;

AudioOutput = FileUtil.AddToFileName(PrettyFormatting.ReplaceDelay(fileName, 0),
MainForm.Instance.Settings.AudioExtension);
Index: core/gui/AudioEncodingTab.Designer.cs
===================================================================
--- core/gui/AudioEncodingTab.Designer.cs (revision 436)
+++ core/gui/AudioEncodingTab.Designer.cs (working copy)
@@ -148,12 +148,12 @@
//
this.delay.Location = new System.Drawing.Point(110, 147);
this.delay.Maximum = new decimal(new int[] {
- 10000,
+ 2147483647,
0,
0,
0});
this.delay.Minimum = new decimal(new int[] {
- 10000,
+ -2147483648,
0,
0,
-2147483648});
Index: core/util/PrettyFormatting.cs
===================================================================
--- core/util/PrettyFormatting.cs (revision 436)
+++ core/util/PrettyFormatting.cs (working copy)
@@ -3,6 +3,7 @@
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
+using System.Windows.Forms;

namespace MeGUI.core.util
{
@@ -43,7 +44,30 @@
}

private static readonly Regex delayRegex = new Regex("(?<match>-?[0-9]+)ms");
+
/// <summary>
+ /// Gets the delay from the filename, but warns the user if this delay is larger than
+ /// 10 seconds.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns>The delay, or null if no valid delay was found</returns>
+ public static int? getDelayAndCheck(string filename)
+ {
+ int? delay = getDelay(filename);
+
+ if (delay.HasValue && Math.Abs(delay.Value) > 10000)
+ {
+ if (MessageBox.Show(string.Format("Your input filename suggests the delay is {0}ms ({1}s), " +
+ "which is surprisingly large. Try checking the tool used to create this file to see " +
+ "if it got the delay wrong.\n\nAre you sure this delay is correct?", delay, (delay / 1000)),
+ "Very large delay", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
+ delay = null;
+ }
+
+ return delay;
+ }
+
+ /// <summary>
/// gets the delay from an audio filename
/// </summary>
/// <param name="fileName">file name to be analyzed</param>
Index: packages/tools/oneclick/AudioConfigControl.cs
===================================================================
--- packages/tools/oneclick/AudioConfigControl.cs (revision 436)
+++ packages/tools/oneclick/AudioConfigControl.cs (working copy)
@@ -83,7 +83,7 @@

public void openAudioFile(string p)
{
- delay.Value = PrettyFormatting.getDelay(p) ?? 0;
+ delay.Value = PrettyFormatting.getDelayAndCheck(p) ?? 0;
}

public AudioConfigControl()
Index: packages/tools/oneclick/AudioConfigControl.Designer.cs
===================================================================
--- packages/tools/oneclick/AudioConfigControl.Designer.cs (revision 436)
+++ packages/tools/oneclick/AudioConfigControl.Designer.cs (working copy)
@@ -93,12 +93,12 @@
//
this.delay.Location = new System.Drawing.Point(107, 64);
this.delay.Maximum = new decimal(new int[] {
- 10000,
+ 2147483647,
0,
0,
0});
this.delay.Minimum = new decimal(new int[] {
- 10000,
+ -2147483648,
0,
0,
-2147483648});


The new ranges for the delay NumericUpDowns are [int.MinValue -> int.MaxValue].