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 21st June 2005, 10:51   #61  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
I have a few updates prepared here:

Firstly, a bugfix for crashes in the Avisynth Window (see this thread). This is done by adding
Code:
			suggestResolution.Enabled = false;
			autoCropButton.Enabled = false;
			previewButton.Enabled = false;
to AviSynthWindow.AviSynthWindow (constructor)
and adding
Code:
			suggestResolution.Enabled = true;
			autoCropButton.Enabled = true;
			previewButton.Enabled = true;
before player.Show() in AviSynthWindow.openVideo(string)

Next is a bugfix for autocropping. Autocropping previously undercropped on the left and on the top if the amount to be cropped was odd, i.e. it rounded down instead of up, leaving one line of black bars. This is now changed to overcrop by one line in this situation. To apply, go to AviSynthWindow.getAutoCropValues(Bitmap). Change
Code:
						retval.left = i - 1;
(in the first loop) to
Code:
						retval.left = i;
and change
Code:
						retval.top = i - 1;
(in the second loop) to
Code:
						retval.top = i;
.

Finally, audio files will now be copied from VobinputWindow to mainForm by the following:
turn VobinputWindow.projectCreationFinished(bool) into
Code:
			this.processing = false;
			if (loadOnSave.Checked && !error)
			{
				string[] files = Directory.GetFiles(Path.GetDirectoryName(projectName.Text) + @"\",
													Path.GetFileNameWithoutExtension(projectName.Text)+"*");
				int counter = 0;
				foreach (int index in audioTracks.CheckedIndices)
				{
					if (counter >= 2)
					{
						// More than two tracks is not supported
						break;
					}
					else
					{
						string trackNumber = "T" + ((counter+1).ToString()).PadLeft(2, '0');
						string filename = "";
						foreach (string file in files)
						{
							if (file.IndexOf(trackNumber) != -1) // It is the right track
							{
								filename = file;
							}
						}
						if (filename.Length != 0)
						{
							mainForm.setAudioTrack(counter, filename,
								Path.GetDirectoryName(projectName.Text) + @"\" + 
								Path.GetFileNameWithoutExtension(filename) + ".mp4");
						}
					}
					counter++;
				}
				AviSynthWindow asw = new AviSynthWindow(projectName.Text);
				asw.OpenScript += new OpenScriptCallback(mainForm.asw_OpenScript);
				asw.Show();
				this.Close();
			}
and in the MeGUI class, add the following function (I treat it as a helper function, but your choice, of course):
Code:
		public void setAudioTrack(int trackNumber, string input, string output) 
		{
			// Change view to other track
			if (trackNumber == 1) 
			{
				audioTrack1.Checked = true;
				audioTrack2.Checked = false;
			} 
			else 
			{
				audioTrack1.Checked = false;
				audioTrack2.Checked = true;
			}
			audioTrack_CheckedChanged(null, null);

			this.audioStreams[trackNumber].path = input;
			this.audioStreams[trackNumber].output = output;
			
			if (audioStreams[trackNumber].isInputMP4Muxable())
				audioStreams[trackNumber].settings = null;
			else if (audioStreams[trackNumber].isOutputMP4Muxable())
				audioStreams[trackNumber].settings = this.currentAACSettings;
			else
				audioStreams[trackNumber].settings = null;

			audioOutput.Enabled = true;
		}
Enjoy!

EDIT: If there is a better way to communicate changes, please tell me. These long posts seem quite cumbersome.

EDIT2: Changed first bugfix per MeteorRain's request.

Last edited by berrinam; 21st June 2005 at 13:58.
berrinam is offline   Reply With Quote
Old 21st June 2005, 11:26   #62  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
Maybe the Ok and Cancel buttons should be put on each tab for the video config settings?
berrinam is offline   Reply With Quote
Old 21st June 2005, 12:18   #63  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 635
Quote:
Originally Posted by berrinam
Maybe the Ok and Cancel buttons should be put on each tab for the video config settings?
a better idea is to catch the 2 buttons out of the tab control ^ ^
MeteorRain is offline   Reply With Quote
Old 21st June 2005, 13:23   #64  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
Quote:
Maybe the Ok and Cancel buttons should be put on each tab for the video config settings?
I was considering that too... just strikes me as bad having multiple buttons for the same purpose. I've never had any formal training on what is good or bad GUI design so I guess I'll just add them. Normally I'd try to have a bottom area with just the buttons, independent of the tabs, but that would mean an even bigger window.

Though those things are part of what I put as a todo point... reorganize dialogs.. perhaps the way I've ordered the options could be improved, and then I think it would be nice to have a dropdown for the profile.. like simple profile, main profile and high profile. high profile would enable 8x8i and 8x8dct, allow quant 0 and allow custom matrices (currently working on that). For the difference between simple and main profile I'd have to look at bond's sticky but I'm sure something could be worked out for this as well.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 21st June 2005, 22:22   #65  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
@xtknight: certain split and raw video input scenarios. I have them ironed out though but not doing everything very properly right now.. in raw video input, certainly .264, the percentage can reset.. you take this as a grounds to increase the track number.. that is wrong.. I did it the way I had planned using my existing code.. it takes care of that but you still have the resetting percentage.. it's no big deal to fix that though.. I have it mapped out just need to code it.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 22nd June 2005, 04:29   #66  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 635
@doom9
could you have a modify at the encoding status window to make it similar to the status window of the VDM that can minimize to the startmenubar instead of at the bottomleft of the screen like the style in windows 3.2 now?
MeteorRain is offline   Reply With Quote
Old 23rd June 2005, 10:44   #67  |  Link
azsd
6502 fan
 
azsd's Avatar
 
Join Date: Sep 2004
Location: forest
Posts: 131
this may called Taskbar as usually.

in ProgressWindow.cs form,set the "Window Style -> ShowInTaskBar" to True.

and by the way modify the form font to Tahoma or It will changed to different fonts in runtime in different os because unchanged(defaut) fonts havn't store in form.

or you can uncheck "TopMost" field
now It goes yuanman shimashita like VDM status dialog.

mmm,but is there MeGUI 1.9.9.9 src availble for download at somewhere?
azsd is offline   Reply With Quote
Old 23rd June 2005, 12:04   #68  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
Quote:
but is there MeGUI 1.9.9.9 src availble for download at somewhere?
I wish, I had those, too But if you're refering to 0.1.9.9 then no and they won't because I've already started working on the next revision so the code has been changed.

I started making dialogs not appear in the status window because I ended up having a lot of entries there... main gui, dialog 1, preview window from that dialog and a quantizer matrix editor at the same time.. that seemed a bit excessive.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 23rd June 2005, 22:31   #69  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
the latest sources are out now.

If anybody has an idea about category1 (mentioned here: http://forum.doom9.org/showpost.php?...&postcount=114 - inability to redirect stderr from commandline and .net) don't hesitate..
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 24th June 2005, 10:30   #70  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
Quote:
Originally Posted by Doom9
I have added a few design study screenshots for these features. In case you want to start implementing one, please give me a heads-up, because the design will require some changes.
I'm planning to work on the OneClick Encode. Is there some way for me to get your design files for it?
berrinam is offline   Reply With Quote
Old 24th June 2005, 10:57   #71  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
There are none. I only got that screenshot from North101. There's no need for the container dropdown right now and certainly not the PSP thing (you need a special non specs compliant MP4 muxer for the PSP anyway.. and it's seriously limited in terms of what resolutions and framerates it can support, too).

I'd appreciate it though if you could give the whole x264.exe status bar issue a look cos I'm stumped.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 24th June 2005, 18:10   #72  |  Link
xtknight
Registered User
 
Join Date: May 2005
Posts: 33
Quote:
Originally Posted by Doom9
There are none. I only got that screenshot from North101. There's no need for the container dropdown right now and certainly not the PSP thing (you need a special non specs compliant MP4 muxer for the PSP anyway.. and it's seriously limited in terms of what resolutions and framerates it can support, too).

I'd appreciate it though if you could give the whole x264.exe status bar issue a look cos I'm stumped.
If you model an x264 progress bar off that program I made which uses the CodeProject stdout reader class, does it work? I think it uses different functions than the stdout reader in MeGUI. For me, that CodeProject class read every single thing in stdout with no issues. What is x264clireader?

Last edited by xtknight; 24th June 2005 at 18:13.
xtknight is offline   Reply With Quote
Old 24th June 2005, 18:20   #73  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
Quote:
What is x264clireader?
A simple stdout stderr reader for x264.exe based on the muxer you sent me.. it uses exactly the same mechanisms to read stdout/stderr (as does the updated mp4 muxer.. which works fine for all parties involved).

This isn't so much about not reading things incorrectly.. this is about figuring out why for some people (a small minority) it doesn't work whereas the large majority has no problems at all with x264.exe. I suppose you'll start guessing soon enough, too because it'll work just fine on your machine. It's hard to fix issues you cannot reproduce and where you cannot go to the affected machine and start the debugger, isn't it?
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 26th June 2005, 02:12   #74  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
Another bug and bugfix:

In any codec configuration dialog, if you delete the last profile and then select a different one, it will crash. The following line needs to be added to the deleteVideoProfileButton_Click function, at the end of the if block:
Code:
				this.oldVideoProfileIndex = -1;
berrinam is offline   Reply With Quote
Old 26th June 2005, 23:39   #75  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
Quote:
Another bug and bugfix:
It also applies to the audio dialogues
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 27th June 2005, 20:14   #76  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
btw, in case you haven't noticed, as admin my edits are now shown but I'm constantly updating the 3rd post in this thread as development progresses. The todo list is getting shorter.

I just finished AVI bitrate calculation.. once mencoder is up to the level, the AVI feature should be a walk in the park. Same goes for the still open mp4box issue, where I also have to adapt the stream info part a bit. But it almost seems to me the major bits are done.. except for the one click mode.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 27th June 2005, 23:10   #77  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
Quote:
Originally Posted by Doom9
But it almost seems to me the major bits are done.. except for the one click mode.
Well, good news: I have a preliminary version of the One Click encoder attached. If all the options have been configured (languages and codec profiles), then all you need to do is select the input file, and it will fill in the rest. I built it on v2.0.0 sources, so I'll just list the changes I made. Here goes:

I made a new form and class called OneClickWindow, which I have attached.
I added a menubutton to it from the main form. It has this event handler:
Code:
			OneClickWindow oneClick = new OneClickWindow(this, videoProfiles, audioProfiles, videoProfile.SelectedIndex, audioProfile.SelectedIndex);
			oneClick.ShowDialog();
I also added the following properties to MeGUI:
Code:
		public JobUtil JobUtil
		{
			get {return this.jobUtil;}
		}
		public NeroAACSettings CurrentAACSettings
		{
			get {return this.currentAACSettings;}
			set {this.currentAACSettings = value;}
		}
		public xvidSettings CurrentXvidSettings
		{
			get {return this.currentXvidSettings;}
			set {this.currentXvidSettings = value;}
		}
		public x264Settings CurrentX264Settings
		{
			get {return this.currentX264Settings;}
			set {this.currentX264Settings = value;}
		}
		public lavcSettings CurrentLavcSettings
		{
			get {return this.currentLavcSettings;}
			set {this.currentLavcSettings = value;}
		}
		public snowSettings CurrentSnowSettings
		{
			get {return this.currentSnowSettings;}
			set {this.currentSnowSettings = value;}
		}
		
		public string StartPath
		{
			get {return path;}
		}
. And that is all for the One Click Window.
But I also have a bug and bugfix I found in the development: The AutoEncodeWindow was showing the wrong filesizes for the various DVD options. The fix is here:
sizeSelection_SelectedIndexChanged needs to be replaced by
Code:
			if (sizeSelection.SelectedIndex == 0) // 1/4 CD
				this.muxedSize.Text = "179200";
			if (sizeSelection.SelectedIndex == 1) // 1/2 CD
				this.muxedSize.Text = "358400";
			if (sizeSelection.SelectedIndex == 2) // 1 CD
				this.muxedSize.Text = "716800";
			if (sizeSelection.SelectedIndex == 3) // 2 CDs
				this.muxedSize.Text = "1433600";
			if (sizeSelection.SelectedIndex == 4) // 3 CDs
				this.muxedSize.Text = "2150400";
			if (sizeSelection.SelectedIndex == 5) // 1/3 DVD
				this.muxedSize.Text = "1501184";
			if (sizeSelection.SelectedIndex == 6) // 1/4 DVD
				this.muxedSize.Text = "1126400";
			if (sizeSelection.SelectedIndex == 7) // 1/5 DVD
				this.muxedSize.Text = "901120";
			if (sizeSelection.SelectedIndex == 8) // 1 DVD
				this.muxedSize.Text = "4586496";
EDIT: Newer AutoEncodeWindow code

Last edited by berrinam; 28th June 2005 at 08:06.
berrinam is offline   Reply With Quote
Old 27th June 2005, 23:37   #78  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
There are some problems/limitations with what I have done so far with the one click window. They are as follows:
-it is not possible to select the working directory (the button is disabled). The reason is that I haven't found a folderdialog class.
-I'm not sure what the situation is with MP4 overhead, so I've just copied the code from the AutoEncodeWindow
-custom filesizes are not enabled. I know how to do this, but at the moment I am too busy to implement it. EDIT: done
-nothing happens if you change the project name. As above, this is simply a matter of catching the valuechanged event, but I haven't done it yet. EDIT: done
-the code in general needs to be cleaned up. EDIT: done

Also, would it be worth turning DGIndex jobs into jobs that can be queued?

Last edited by berrinam; 28th June 2005 at 08:06.
berrinam is offline   Reply With Quote
Old 27th June 2005, 23:49   #79  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: 36 Chambers
Posts: 5,926
Quote:
-it is not possible to select the working directory (the button is disabled). The reason is that I haven't found a folderdialog class.
enter folder in the search of Visual Studio and restrict the search on .NET Framework. If you look for stuff in .NET, you can also search with Google, Google Groups and at CodeProject. For Google Groups you can use this link:

http://groups.google.de/groups?ie=UT...net*&lr=&hl=de

it searches only dotnet groups, I've used this a lot and still have to from time to time

Last edited by stax76; 27th June 2005 at 23:59.
stax76 is offline   Reply With Quote
Old 28th June 2005, 08:03   #80  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
@stax: Thanks, I'll look into it.

Anyway, I've fixed up everything else that I can, which includes a basic code cleanup of the OneClickWindow class, and I have uploaded a new version to replace the old one.
berrinam is offline   Reply With Quote
Reply

Tags
development, megui, not a help thread

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 17:29.


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