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. |
6th July 2005, 13:48 | #161 | Link | |
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
Quote:
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
|
6th July 2005, 13:55 | #162 | Link | |
Registered User
Join Date: Apr 2005
Posts: 1,740
|
Quote:
|
|
6th July 2005, 21:26 | #163 | Link |
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
the new sources are up.. but this is more of a transitional release as certain things are still outstanding (see release note of the latest build).
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
6th July 2005, 23:56 | #165 | Link |
Registered User
Join Date: Apr 2005
Posts: 1,740
|
AR autodetection from the info file can be implemented as follows:
change VideoUtil.openVideoSource(...) to this: Code:
public bool openVideoSource(string fileName, ComboBox track1, ComboBox track2, out ArrayList trackIDs, out AspectRatio ar) { trackIDs = new ArrayList(); string infoFile = VideoUtil.getInfoFileName(fileName); bool putDummyTracks = true; // indicates whether audio tracks have been found or not ar = AspectRatio.CUSTOM; if (!infoFile.Equals("")) { AudioTrackInfo[] atis; getSourceInfo(infoFile, out atis, out ar); if (atis.Length > 0) { putDummyTracks = false; } int index = 0; foreach (AudioTrackInfo ati in atis) { trackIDs.Add(ati.trackID); track1.Items.Add(ati.language + " " + ati.type + " " + ati.nbChannels); track2.Items.Add(ati.language + " " + ati.type + " " + ati.nbChannels); if (ati.language.Equals(mainForm.Settings.DefaultLanguage1) && track1.SelectedIndex == -1) track1.SelectedIndex = index; if (ati.language.Equals(mainForm.Settings.DefaultLanguage2) && track2.SelectedIndex == -1) track2.SelectedIndex = index; index++; } } else MessageBox.Show("Could not find DVD Decrypter generated info file " + infoFile, "Missing File", MessageBoxButtons.OK); if (putDummyTracks) { track1.Items.AddRange(new string[] {"Track 1", "Track 2", "Track 3", "Track 4", "Track 5", "Track 6", "Track 7", "Track 8"}); track2.Items.AddRange(new string[] {"Track 1", "Track 2", "Track 3", "Track 4", "Track 5", "Track 6", "Track 7", "Track 8"}); } return putDummyTracks; } Code:
private void openVideo(string fileName) { input.Text = openIFODialog.FileName; track1.Items.Clear(); track2.Items.Clear(); AspectRatio ar; demuxAllTracks.Checked = vUtil.openVideoSource(openIFODialog.FileName, track1, track2, out audioTrackIDs, out ar); } Code:
private void openButton_Click(object sender, System.EventArgs e) { if (!processing) { openFileDialog.Filter = "VOB Files (*.vob)|*.vob|MPEG-1/2 Program Streams (*.mpg)|*.mpg|Transport Streams (*.ts)|*.ts"; if (openFileDialog.ShowDialog() == DialogResult.OK) { input.Text = openFileDialog.FileName; track1.Items.Clear(); track2.Items.Clear(); AspectRatio ar; vUtil.openVideoSource(openFileDialog.FileName, track1, track2, out audioTrackIDs, out ar); string chapterFile = VideoUtil.getChapterFile(openFileDialog.FileName); if (File.Exists(chapterFile)) { this.chapterFile.Text = chapterFile; } workingDirectory.Text = Path.GetDirectoryName(openFileDialog.FileName); workingName.Text = Path.GetFileNameWithoutExtension(openFileDialog.FileName); this.chooseOutputName(); this.setAspectRatio(ar); } } } Code:
private void setAspectRatio(AspectRatio ratio) { switch (ratio) { case AspectRatio.A16x9: aspectRatio.SelectedIndex = 0; aspectRatio_SelectedIndexChanged(null, null); break; case AspectRatio.A4x3: aspectRatio.SelectedIndex = 1; aspectRatio_SelectedIndexChanged(null, null); break; case AspectRatio.A1x1: aspectRatio.SelectedIndex = 2; aspectRatio_SelectedIndexChanged(null, null); break; default: aspectRatio.SelectedIndex = 4; aspectRatio_SelectedIndexChanged(null, null); break; } } Secondly, no log was being written by OneClickWindow because it was not being added to the mainForm log. To fix this, in OneClickWindow.setUpJobs(), add the following line at the end: Code:
mainForm.addToLog(logBuilder.ToString()); As in other situations, not autostarting the job queue seems to clash with the oneclick workflow, although I can understand that one may want to configure multiple jobs before starting. And another thing: I presume you limited oneclickwindow to two audio tracks to be consistent with the vobinputwindow, but the way it was before was interesting, because it was the only way in the gui to have more than two audio tracks, if anyone wants that. It also prevented having two of the same audio track (a waste of space and encoding time). There is also a problem in that oncne you have selected an audio track, you cannot deselect it (the audiotrack comboboxes need to have a 'Empty' item -- I will implement that in the next post. Last edited by berrinam; 7th July 2005 at 00:01. |
7th July 2005, 00:23 | #166 | Link | |
Registered User
Join Date: Apr 2005
Posts: 1,740
|
Quote:
Code:
track1.Items.Clear(); track2.Items.Clear(); track1.Items.Add("<No file loaded>"); track2.Items.Add("<No file loaded>"); track1.SelectedIndex = 0; track2.SelectedIndex = 0; Code:
foreach (AudioTrackInfo ati in atis) Code:
track1.Items.Add("<Empty>"); track2.Items.Add("<Empty>"); track1.SelectedIndex = 0; track2.SelectedIndex = 0; int index = 1; Code:
if (ati.language.Equals(mainForm.Settings.DefaultLanguage1) && track1.SelectedIndex == -1) Code:
if (ati.language.Equals(mainForm.Settings.DefaultLanguage1) && track1.SelectedIndex == 0) Code:
this.track1 = track1; this.track2 = track2; Code:
this.track1 = track1 - 1; this.track2 = track2 - 1; |
|
7th July 2005, 08:42 | #167 | Link | ||
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
Quote:
I'm afraid I must've eliminated some of the logging code during the rewrite such as the ar thing.. there's a method that already returns the ar but it is never propagated back to the form.. it does make sense getting it from the ifo though because the vobs sometimes have incorrect ar flags. On the other hand, if there's no info file or no ar detected, it should default to auto-detection.. in my tests I ended up with a 16:9 setting for a 4:3 source and naturally the resulting file was improperly resized. Quote:
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
||
7th July 2005, 09:28 | #168 | Link | |
Registered User
Join Date: Apr 2005
Posts: 1,740
|
Quote:
|
|
7th July 2005, 13:53 | #169 | Link |
Registered User
Join Date: Apr 2005
Posts: 1,740
|
I've made a preliminary MeGUI lite version for x264 and snow (separately). To compile for x264, add the define symbol (in the project options) X264_ONLY. Similarly, for snow, add SNOW_ONLY. Note that as of yet, they cannot be used concurrently. Attached are precompiled versions, and source code.
(Almost) Any comments are welcome. |
7th July 2005, 21:34 | #170 | Link | |
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
Quote:
So I went the lazy route and just added buttons to set the selected index back to -1. Feel free to implement a more proper solution later one when I've stopped changing everything (over the week-end.. I have a few lavc options left to test and some audio code to reconsider and proper avi support in the oneclick window). By the way, you said that csc creates much smaller executables. What commandline did you use to compile megui?
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
|
7th July 2005, 21:56 | #171 | Link |
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
about the lite versions: default priority, autostart queue, shutdown after encoding, overwrite stats file and keep second pass output should still be available.
The filetype dropdown is missing in the x264 gui and you can get rid of the codec label right away. The reset button can be moved into the groupbox. The same also goes for the Snow GUI.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
7th July 2005, 23:25 | #172 | Link | |
Registered User
Join Date: Apr 2005
Posts: 1,740
|
Quote:
Code:
csc /target:winexe /out:megui.exe /win32icon:app.ico /unsafe+ /recurse:*.cs I'll do all of those things you mentioned about the lite versions. |
|
8th July 2005, 07:21 | #173 | Link |
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
thanks for the compilation tips.
Here's an idea I've been toying around with for a couple of days, let me know what you think: switch out the source detection function (from jobutil I think) to medialib (http://forum.doom9.org/showthread.php?t=96516). It would have the following pros and cons: pro: sources that could be encoded but cannot opened because of a missing YV12 VfW codec could still be encoded. mencoder and x264.exe certainly don't use VfW (I'm not sure what they use to open the video). Naturally, video preview would still be using AviFile (the only other alternative is DirectShow which appears to be quite a bit more problematic (the "go to frame X" call is not honored by at least 50% of the DS filters out there, and that's just the beginning of the problems) pro: AC3 audio encoding would have a working progress bar even during the first pass as the exact lenght of the audio file could be detected in advance. The same goes for all the other input types of course. con: megui would no longer be self-containing. Without the medialib you would be unable to encode
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
8th July 2005, 08:09 | #174 | Link | |||
Registered User
Join Date: Apr 2005
Posts: 1,740
|
Quote:
Quote:
Quote:
So basically, I think it would be a good idea. |
|||
9th July 2005, 02:29 | #175 | Link | |
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
Quote:
I'll see what I can do with that lib. I've also upped the latest sources.. I don't have immediate plans to change form1 so I guess now would be a good time to make the official commit of the conditional compile options once you're done with the changes. I'll add a separate bitrate calculator that should also be accessible in both reduced modes. You can add the menu option and a dummy event handler for this already and I'll integrate the new class into that.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
|
9th July 2005, 03:07 | #176 | Link | |
Registered User
Join Date: Apr 2005
Posts: 1,740
|
Quote:
The code for the GUI elements is becoming rather messy, but I'm hoping that it won't be a problem because most of form1 will be staying the same. |
|
9th July 2005, 08:17 | #179 | Link |
Registered User
Join Date: Apr 2005
Posts: 1,740
|
I have completed and attached the lite versions. All of the code *should* be up-to-date with 2.1.1, but I may have left something out by using an obsolete file somewhere. Everything seems to be working, so this should probably be used as the codebase for any further additions (it is a real hassle if not, because almost every file needs to have something done to it). Like before, I have attached sources, and compiled versions. In the source version, I have only attached *.cs files; I haven't changed anything else, or added/removed files.
These sources also fix the bug mentioned above. |
9th July 2005, 11:33 | #180 | Link |
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
thank you.. I'll make sure to use this for any further work I do.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
Tags |
development, megui, not a help thread |
|
|