PDA

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

mroz
6th November 2007, 17:56
For my immediate needs this is probably more than I need, most of the movies I want to convert tend to be from the same source (digi cam) and I intended to use x264 in const. quality mode. The most I really need is to rotate by 90 degrees some of the movies, not sure how to automate a test for that though if it is even possible.
That's an interesting problem. I wonder if average orientation of motion vectors would tend to show more movement in the horizontal plane? If I wanted to pursue that I'd look into avisynth & mvtools - it might be possible to get that info out of mvtools; I'm not sure.
In some ways it also goes against what I am hoping to achieve here as well by making the process more complex . This could be largely mitigated through good UI design and well thought out defaults.
I certainly appreciate the desire to keep the interface clean.
As I said earlier, part of my motivation here to create a new tool is the fact that the "One Click Encode" tool is not even close to one click and far too complex for a simple transcode operation.
I didn't explore Megui's one click encode much as it didn't seem to meet my needs for any of my own use cases, but that's perhaps not surprising as a one click solution is ambitious if it's to cover more than a very restrictive set of sources & do a decent job.
While MeGUI is quite powerful and I like the concept, it is not a very clean design and not very user friendly.
That was my initial impression too but perhaps through a few months familiarity I've lost that perspective. Certainly I'd say it feels like a tool set which has evolved, rather than an integrated whole designed with consistent aims. Not that I'm criticising Megui, should it come across that way; I find it highly functional or I'd not be bothering posting in these threads. It's also harder obviously to achieve unification when underlying tools are third party.
I think this holds it back a great deal and as such I want to keep the transcode tool as "clean" and easy to use a possible.
Fair point. As it happens I like clean too.
Having said that, I certainly wouldn't rule out what you are after though I am not sure how it would work. It seems like it might be a very niche requirement and so might be better implemented in some scripting way, possible AVISynth? I'm not very familiar with the power of the AVISynth scripting language, but if what you are after was possible (in some part at least) in AVISynth then it would effectively work right in with what I am planning as I will take my input from an AVISynth template which could (possibly) contain your custom preprocessing.

I don't think the preprocessing could be done at encode time - typically it would need an initial pass to assess the entire source. That said, it would be AVISynth based.

I'm no AVISynth guru, but yes, AVISynth is very powerful & would be used to perform most of the tests (via Megui's Analysis job type - which runs a script via Mencoder with null output; analysis results are written to a log file as the script proceeds via WriteFile (http://avisynth.org/mediawiki/WriteFile).

Writing generic template g(i) to mean {audio profile(i), video profile(i), containor type(i), avs template(i)} (where by (i) I mean depending on i, not merely indexed by i)

Your model currently looks like:
transcode template <-> g

Essentially the additional functionality needed of your user interface would be

transcode template <-> { analysis script, {g(i) for a small range of i}}

A transcode job would then consist of one (optional) analysis job, the output of which selects which g(i) to appy for the main transcode.

Personally I'd like to see a special case of g(i) which doesn't perform an encode but instead outputs a log in place of the encode, explaining that the user needs to intervene as the analysis stage couldn't reach an automated conclusion.

As you say, with a well designed user interface & default settings, the necessary gui could be virtually indistinguishable from one providing your original functionality. All that needs to be visible is the option, when defining a transcode template to add an analysis script (from a drop down list of predefined scripts); as soon as this is selected, the gui modifies slightly to allow the transcode template to define multiple g(i) rather than a single g(i) - perhaps via multiple tabs (I'm getting ahead of myself here, but the tabs could take meaningful names from suitable comments in the analysis script).

Does that make sense at all?

Eamon21
6th November 2007, 18:10
@mroz: Ok, I see what you are getting at. I doubt it will be in the initial version of the tool, but I will keep it in mind for the design with a view for possible addition later.

mroz
6th November 2007, 18:17
@Eamon, regarding detecting orientation, are you able to restrict the choices to one horizontal & one vertical? For example, I doubt you shoot much material with the camera upside down, but when it's on its side, is it always orientated the same way?

I'm guessing it might be possible to tell horizontal from vertical, but up from down is probably much harder.

Eamon21
6th November 2007, 19:22
@Eamon, regarding detecting orientation, are you able to restrict the choices to one horizontal & one vertical? For example, I doubt you shoot much material with the camera upside down, but when it's on its side, is it always orientated the same way?

I'm guessing it might be possible to tell horizontal from vertical, but up from down is probably much harder.
Unfortunately not, while it is possible that I have, I am not certain. I can't really see how it would be possible for a computer to tell which way the video was shot without some freakishly complex algorithms and horsepower. Even then I wouldn't bet on it getting it right all the time.

Given how much easier it would be for me to just look at the thumbnail for each movie and decide which ones to rotate, I don't think it is worth pursuing an auto rotate. Happy to use one though if someone else comes up with a reliable method :)

berrinam
7th November 2007, 03:13
3 bugs left... :)
the 120dpi font issue can be postponed after the "stable" release though...

just a curiosity... yesterday MeGUI surpassed the 600 downloads/day (sourceforge statistics (http://sourceforge.net/project/stats/?group_id=156112&ugn=megui)). keeping that pace, it generates about 18Gigz/month of traffic on the SF mirrors... plus the near 3000 project page views...
i wonder how much traffic is generated monthly on the autoupdate server...

The update_cache seems to cause problems with people who attempt a "clean reinstall" of MeGUI, since I think they often leave the update cache behind. Would it be possible for the MeGUI uninstaller to delete (or give the option of deleting) the update_cache registry key?

Also, about autoupdate bandwidth: we may be able to transfer some of this load to Sourceforge if we additionally distribute "offline installs" -- these installs would have to set the update_cache registry key and which fill the update_cache folder with the files off the server. I don't know any installer scripting, so I can't do this, but I think the option of this could be good for some people, and it could result in fewer downloads from the autoupdate server.

berrinam
7th November 2007, 03:50
via Megui's Analysis job type - which runs a script via Mencoder with null output; analysis results are written to a log file as the script proceeds via WriteFile (http://avisynth.org/mediawiki/WriteFile)Just to clarify a point on this: MeGUI achieves the same result as this without the mencoder dependence: MeGUI just plays through the script directly, since it already can interface with Avisynth

mroz
7th November 2007, 03:51
Unfortunately not, while it is possible that I have, I am not certain. I can't really see how it would be possible for a computer to tell which way the video was shot without some freakishly complex algorithms and horsepower. Even then I wouldn't bet on it getting it right all the time.

Given how much easier it would be for me to just look at the thumbnail for each movie and decide which ones to rotate, I don't think it is worth pursuing an auto rotate. Happy to use one though if someone else comes up with a reliable method :)

It just seems like an interesting challenge. I want to test my idea that typical material will have more horizontal motion than vertical.

MVTools (an AVISynth plugin) already has a depan function which will generate some stats on global motion in each frame. If I can get it to spit these into a log file I'll run a few checks to see if there are such patterns.

If it works at all I'd still not want to bet on reliability though ;)

And that still doesn't begin to address how one tells up from down.

mroz
7th November 2007, 03:54
Just to clarify a point on this: MeGUI achieves the same result as this without the mencoder dependence: MeGUI just plays through the script directly, since it already can interface with Avisynth

Thanks, that's important to know. How does it open the script? Does it suffer from the same problems as MEncoder requiring the hack of appending a call to Distributor() to the end of the script in order to allow SetMTMode() to be effective?

Edit: /checks

Yup, it does. An analysis pass for this scriptSetMTMode(2,0)
leaf1="noSetMT-md5-A6D1176F8C46CA800278D64FCA94C160"
leaf2="SetMT-t1-tsp1-md5-64920A02A02CB3332F27D88797B3DBC1"
global c1=AVISource("E:\Work\test\hfyu_MVMT-longtest-"+leaf1+".avi")
global c2=AVISource("F:\Michael\My Documents\VideoCompilations\hfyu_MVMT-longtest-"+leaf2+".avi")
global total=0
global file="E:\Work\test\compare-"+leaf1+"-"+leaf2+".log"
BlankClip(c1, width=16, height=16) # maybe 15% faster than using c1 as our 'dummy' clip (& 100% faster than using subtract(c1,c2) with variation subtitled)
WriteFileStart(file, """ "vim:tabstop=6"+chr(10) """, """ Time("%#c")+chr(10) """, """ "Frame"+chr(9)+"Total"+chr(9)+"Variation" """, append=true)
WriteFileEnd(file, """ "Test complete."+chr(10) """)
ScriptClip( """
variation = LumaDifference(c1,c2)+ChromaUDifference(c1,c2)+ChromaVDifference(c1,c2)
# nb1 keeping writefile inside here allows us to store variation as local, reducing problems with running in MTMode 2
# nb2 aside: writefile doesn't want to when called inside FrameEvaluate; anyone know why?
# nb3 sometimes the running total is reported incorrectly in MTMode 2 as another thread updates the total before code writes out data to log;
# this isn't terribly important & can be corrected as is implicit in data set
# nb4 compare against 0.0001 instead of 0 to allow for rounding errors - 2 identical files will report a variation of 0.000022
WriteFileIf(file, "variation>0.0001", "current_frame", "chr(9)", "thistotal", "chr(9)", "variation")
global total = total + ((variation>0.0001) ? 1 : 0)
thistotal = total # massively reduce chance of MTMode 2 screwing up logging of total
return last
""" )
#Distributor()

gives me 44fps & 23% cpu load without Distributor & 137fps around 80% cpu load with it.

This is the same situation one faces when doing a prerender pass in Megui via MEncoder.

I don't know how much I've posted in Megui threads about this before, so I'll summarise the conclusions reached with the help of MT's dev tsp & AVISynth dev IanB. When a script is opened as an AVIfile with an MT aware AVISynth, & the script is seen to invoke SetMTMode, it is able to append to the filter chain a call to Distributor; when however the script is imported or otherwise fed into a dynamic AVISynth environment, AVISynth has no easy way to know when the script is complete & Distributor is not invoked resulting in single threaded performance.

The fix has to be within the program invoking the script - in this case both MEncoder & Megui: After the script is imported, call GetMTMode to read the current mode. If there's an error/exception (typically as GetMTMode doesn't exist), proceed as normal, otherwise, if the mode is between 1 & 4 invoke Distributor().

There's most of an untested suggested patch to mencoder here (http://forum.doom9.org/showthread.php?p=1052022&highlight=distributor#post1052022) which is probably close to what's needed in Megui (though MEncoder uses the C API to interact with AVISynth). Also some info on MT (http://avisynth.org/mediawiki/MT_modes_explained).

I'd file a proper bug report, but it's nearly 4am here & I want to go to sleep. Also I lost steam over this issue as I was hoping a MEncoder dev would care enough to fix the problem their end but I guess they have a lot of problems judging from their mailing lists.

Sharktooth
7th November 2007, 03:58
The update_cache seems to cause problems with people who attempt a "clean reinstall" of MeGUI, since I think they often leave the update cache behind. Would it be possible for the MeGUI uninstaller to delete (or give the option of deleting) the update_cache registry key?

Also, about autoupdate bandwidth: we may be able to transfer some of this load to Sourceforge if we additionally distribute "offline installs" -- these installs would have to set the update_cache registry key and which fill the update_cache folder with the files off the server. I don't know any installer scripting, so I can't do this, but I think the option of this could be good for some people, and it could result in fewer downloads from the autoupdate server.
ill do that (both things) as soon as i have some time.

berrinam
7th November 2007, 04:03
This page may be useful for those interesting in contributing code to MeGUI: http://mewiki.project357.com/index.php/MeGUI:Helping_with_MeGUI

In some ways it also goes against what I am hoping to achieve here as well by making the process more complex . This could be largely mitigated through good UI design and well thought out defaults.

I haven't actually used any encoding GUIs other than Gordian Knot and Nero for any extended period of time, so I don't know how they approach this, but it seems like setting up an encode of a video is actually a hard problem. Particularly with DVD/TV/Digicam captures, a number of things need to be configured: cropping, input AR, resizing, deinterlacing, which audio/subtitle tracks to keep, and potentially editing of the video and denoising. I don't specifically know what you refer to when you discuss "cleanliness", but many of these things are important even for automated encodes, so the best that an automated encoder can do is automate as much of this as possible (which can potentially be all of it except editing), allowing the advanced user to configure the automation at the start while hiding these options from the novice user so as not to scare them.

I believe that the One click encoder mostly does this already. For starters, the General tab contains only Input, Output, audio track selection, profile name, and filesize; I would expect even a novice to understand what all of them mean (except perhaps the profile). And there is a clear distinction between General and Advanced, as you have to click "Show Advanced Options" to get to the advanced options. I agree that resolution selection could be made more flexible, and the ability to add an Avisynth pre-render job now seems out of place, but I believe the rest of the options important.

However, this large number of options does not prevent it still being a one click approach. For me, I can simply open the input file, and press go, since I have my options already configured in a oneclick profile.

This all started with me wanting to convert a lot of MOV files from my digital camera from MJPEG into H264 to save space, there are hundreds and i certainly don't want to have to do them one at a time.Indeed, MeGUI doesn't handle this kind of encoding well.

I also agree with the criticism that the tools in MeGUI are not well integrated. I would be interested in discussing how this could be improved.

berrinam
7th November 2007, 04:06
Thanks, that's important to know. How does it open the script? Does it suffer from the same problems as MEncoder requiring the hack of appending a call to Distributor() to the end of the script in order to allow SetMTMode() to be effective?

MeGUI does nothing explicit to support MT Avisynth, so no, it doesn't call Distributor(). I don't know whether this actually results in it running multi-threaded or not, since I haven't used MT Avisynth.

mroz
7th November 2007, 04:50
MeGUI does nothing explicit to support MT Avisynth, so no, it doesn't call Distributor(). I don't know whether this actually results in it running multi-threaded or not, since I haven't used MT Avisynth.

I started editing the post you replied to before reading your response, so if you have a moment please look back at that for some comments on this issue. Thanks.

berrinam
7th November 2007, 04:59
I don't know how much I've posted in Megui threads about this before, so I'll summarise the conclusions reached with the help of MT's dev tsp & AVISynth dev IanB. When a script is opened as an AVIfile with an MT aware AVISynth, & the script is seen to invoke SetMTMode, it is able to append to the filter chain a call to Distributor; when however the script is imported or otherwise fed into a dynamic AVISynth environment, AVISynth has no easy way to know when the script is complete & Distributor is not invoked resulting in single threaded performance.If MeGUI uses the AVIFile interface, then I presume this problem will be solved? (although we lose the niceties of better error handling, darx/dary reading)

mroz
7th November 2007, 05:07
If MeGUI uses the AVIFile interface, then I presume this problem will be solved? (although we lose the niceties of better error handling, darx/dary reading)
AIUI Yes. A shame to lose any benefits though. Is dar reading involved in the analysis pass? Now I really am going to sleep. I ought to schedule a task to kill my damned email client around 2am :)

check
7th November 2007, 10:15
just a note letting you know my update cache's mirror automatic update procedure died about 4 days ago. It won't be fixed until I have moved to a new server, which is looking to happen in the next fortnight.

berrinam
7th November 2007, 11:30
I'm getting a bit impatient with this stable release, as we keep waiting to fix all the bugs, as more and more are still found. I say we branch now, continuing to commit bug fixes (but nothing else) to the stable version, and committing new code to the development version.

If no-one objects, I'm happy to go ahead and perform the SVN branch. I would bump the development version number up into the 0.3.x.x series, and leave the version number of the stable version alone. Then I would rearrange the SVN folders to look like this:


root
|-branches
|-tags
|-0_2_x_x
|-trunk // this has the development version
|-bautodeint
|-MediaInfoWrapper
|-...
|-MeGUI

What do you think?

berrinam
7th November 2007, 11:50
Also, since we're having a discussion about GUI design now, one thing I've been thinking about doing is moving audio and video encoding off the main page, and just putting them in another dialog box, like muxing, autoencode, etc. This can potentially free up the main page for a more intuitive UI, perhaps one where you just dump your files (via drag-and-drop, or opening files manually for Vista) and MeGUI gives you options of what you can do with them. I haven't really given the replacement much thought, but I have felt it would be nice to entirely separate video/audio encoding from the main window.

Thoughts?

Kurtnoise
7th November 2007, 13:17
What do you think?
ok for me...:)

Eamon21
7th November 2007, 13:24
Indeed, MeGUI does handle this kind of encoding well.Is that supposed to be "doesn't"?

If not then I can't agree, a minimum requirement would be a batch process where the same settings are applied to each file. Secondly you can't use One Click with *.MOV files.

I realise that the One Click tool reduces configuration each time using the profile approach to store settings and I intend to do something very similar, but the One Click encode is totally geared towards DVD encodes as far as I can tell and can only encode a single file at a time, two things that mean it is not appropriate for me.

As for the branch idea, I like the idea as I don't want to add any new code into a release that is trying to become stable.

Finally with regard to UI re-design, I agree that something needs to be done, probably even looking at changing some of the tools to run in the main window (as usercontrols) rather than spawning new dialogs. Really need some stats though as to how people mainly use MeGUI though to come up with a good UI. I know how I use it though I am also sure that a lot of other people would use it for different reasons. Maybe have some sort of anonymous stats collector that people can agree to that uploads to a webservice info about how they use it e.g. what tools they use, what codecs etc.

Eamon

berrinam
7th November 2007, 13:48
Is that supposed to be "doesn't"?Fixed :P

I realise that the One Click tool reduces configuration each time using the profile approach to store settings and I intend to do something very similar, but the One Click encode is totally geared towards DVD encodes as far as I can tell and can only encode a single file at a time, two things that mean it is not appropriate for me.Yes, it is geared towards DVD encoding. What kind of encoding are you considering? Specifically, do you apply any further cropping, resizing, or deinterlacing, or do you simply want to put the video in a different codec but otherwise the same? If this is the case, then this is easier, since there is less the tool must take care of.

Sharktooth
7th November 2007, 14:18
I'm getting a bit impatient with this stable release, as we keep waiting to fix all the bugs, as more and more are still found. I say we branch now, continuing to commit bug fixes (but nothing else) to the stable version, and committing new code to the development version.

If no-one objects, I'm happy to go ahead and perform the SVN branch. I would bump the development version number up into the 0.3.x.x series, and leave the version number of the stable version alone. Then I would rearrange the SVN folders to look like this:


root
|-branches
|-tags
|-0_2_x_x
|-trunk // this has the development version
|-bautodeint
|-MediaInfoWrapper
|-...
|-MeGUI

What do you think?
ok, but i have to say i have not much time to spend on megui right now. maybe something will change in december.
Also, since we're having a discussion about GUI design now, one thing I've been thinking about doing is moving audio and video encoding off the main page, and just putting them in another dialog box, like muxing, autoencode, etc. This can potentially free up the main page for a more intuitive UI, perhaps one where you just dump your files (via drag-and-drop, or opening files manually for Vista) and MeGUI gives you options of what you can do with them. I haven't really given the replacement much thought, but I have felt it would be nice to entirely separate video/audio encoding from the main window.

Thoughts?
That's ok for me. I always thought the main window should be a sort of "wizard". that will also make megui easier for the first-time user.

mroz
7th November 2007, 14:26
As for the branch idea, I like the idea as I don't want to add any new code into a release that is trying to become stable.
One caveat in the form of a question: do the devs have sufficient resources & willpower to keep bug fixing a stable release when there's a nice juicy new dev branch to work on? :)

Regarding design comments, do the devs want comments from any interested parties or just devs? For now I'll assume all welcome...
Finally with regard to UI re-design, I agree that something needs to be done, probably even looking at changing some of the tools to run in the main window (as usercontrols) rather than spawning new dialogs.
Agreed, though after a little thought I also agree with Berrinam that video & audio encoding set up should be treated on a par with the other tasks & not have a higher status within the UI layout, with the main Megui window being used to control access to other features & possibly for dumping files into.

Certainly I'd want to get away from patterns where the location the user has to drop their source file depends on what the source file is - eg atm if you have an avs it would go in the main window, while an avi requires the avs creator & if you start from a vob you also need to find & open the d2v creator.

Of course processing some types requires extra steps, but this should be made apparent to the user /after/ they've followed a consistent method to get the files into Megui.

Really need some stats though as to how people mainly use MeGUI though to come up with a good UI. I know how I use it though I am also sure that a lot of other people would use it for different reasons. Maybe have some sort of anonymous stats collector that people can agree to that uploads to a webservice info about how they use it e.g. what tools they use, what codecs etc.

Funnily enough I was thinking this last night. It's very important if one is serious about designing an effective gui for widespread use, rather than just an interface to meet the devs own needs or those of vociferous users.

mroz
7th November 2007, 14:41
I always thought the main window should be a sort of "wizard". that will also make megui easier for the first-time user.

That horrid word went through my head as well while thinking about this.

Wizards tend to do two things ime, reduce user choices & linearise whatever process they conduct. Both these help guide users, but are also horribly limiting.

Here's how I see the situation. If you offer a wizard in addition to more flexible controls, you can afford the wizard to be quite restrictive. OTOH if it is your only interface to the task in hand you need to be very clever & very careful otherwise you risk vastly crippling your application & your users.

GUIs are potentially lovely, agreed? You'd not want to go back to an interface comprising a sequence of choices from menus.

All I'm asking is to not throw the baby out with the bath water :)

My aim in UI design is to offer the user subtle hints to allow them to naturally follow a linear path through the gui in order to get their task done, if that's both possible & appropriate, without forcing them to take a particular path. Thus they can be productive immediately, yet still free to grow their usage patterns as they develop familiarity & expertise.

Not that I mean to suggest you're likely to get this wrong. It's just that damned term Wizard which sets off alarm bells in my head.

Sharktooth
7th November 2007, 14:41
The installer changes im going to commit will create the update_cache registry key and will delete it when running the uninstall.
I will make a new MeGUI dev release, so please test the installer/uninstaller behaviour and report eventual bugs.

Sharktooth
7th November 2007, 15:04
0.2.6.1035
- (Sharktooth) [Installer] Creates (and removes during uninstall) update_cache reg key, also creates update_cache, logs and tools folders.
- (berrinam) At startup, jobs marked as "processing" are marked as "aborted". Should help #1826981.
- (berrinam) Fix autocrop crash in AVS creator after reopening original video window.
- (berrinam) Fixed #1825958 (Audio track tab numbering issue)
- (berrinam) Fixed #1825182 (Nero AAC settings not saved)
- (Kurtnoise) [Mencoder Encoder] force to set up only video command (fixed #1824505 & #1825708)
- (Sharktooth) [Installer] Added links to Tools, Logs and Auto-update cache folders.
- (Kurtnoise) [Settings Form] English as 1st Language (#1822098)
A new dev release is available on SF: http://sourceforge.net/project/showfiles.php?group_id=156112&package_id=244469

Kurtnoise
7th November 2007, 21:18
Wizards tend to do two things ime, reduce user choices & linearise whatever process they conduct. Both these help guide users, but are also horribly limiting.
I disagree with you about limitations...Wizzards are created to simplify the normal uses and are mainly dedicated to people whose know nothing about A/V compression or anything else. Keep in mind that for newbies, the less there are, the more there are happy. :) Honestly I don't think that the main goal of a wizzard is to let multiples choices for people concerning customatization or tuning the settings. So, it means that maybe we need to rethink the goals of MeGUI (tend to be "newbies only", "geeks only"...).

Eamon21
7th November 2007, 23:04
Just uploaded a patch that addresses bugs 1827268 and 1822000.

Eamon21
7th November 2007, 23:30
and a patch for 1827919

berrinam
8th November 2007, 00:19
0.2.6.1035
- (Sharktooth) [Installer] Creates (and removes during uninstall) update_cache reg key, also creates update_cache, logs and tools folders.
- (berrinam) At startup, jobs marked as "processing" are marked as "aborted". Should help #1826981.
- (berrinam) Fix autocrop crash in AVS creator after reopening original video window.
- (berrinam) Fixed #1825958 (Audio track tab numbering issue)
- (berrinam) Fixed #1825182 (Nero AAC settings not saved)
- (Kurtnoise) [Mencoder Encoder] force to set up only video command (fixed #1824505 & #1825708)
- (Sharktooth) [Installer] Added links to Tools, Logs and Auto-update cache folders.
- (Kurtnoise) [Settings Form] English as 1st Language (#1822098)
A new dev release is available on SF: http://sourceforge.net/project/showfiles.php?group_id=156112&package_id=244469

Is this supposed to be a development release? Most of the commits seem to be bug fixes.

berrinam
8th November 2007, 01:42
I've performed the stable/dev split. The directory structure is now as I posted before. The stable version is still 0.2.6.1035, and I have increased the dev version to 0.3.0.0000 (although I haven't committed any code to it yet).

saint-francis
8th November 2007, 01:44
Wizzards are created to simplify the normal uses and are mainly dedicated to people whose know nothing about A/V compression or anything else. Keep in mind that for newbies, the less there are, the more there are happy. :) Honestly I don't think that the main goal of a wizzard is to let multiples choices for people concerning customatization or tuning the settings. So, it means that maybe we need to rethink the goals of MeGUI (tend to be "newbies only", "geeks only"...).

As a rule of thumb I don't participate in this thread (although I follow it religiously) becauese I don't in any way "speak C#" so this is clearly the "wrong thread" for me to post in, but, I must express my opinion here. To me MeGUI is fantastic because it is a tool for the n00b and the more advanced user. Almost every step I make in my journey to becoming more competent in the world of video encoding MeGUI can so far match. Of course as I venture into the world of more complicated tasks MeGUI falls behind. Remember that since MeGUI is a work in progress the "so far" should be noted. My hopes are that in the future MeGUI will help me automate even the most complicated tasks I ask of it. Yet MeGUI does make the process easier. This I assume is the entire purpose of the project. I personally think a "wizard" like interface option could greatly increase the usefulness of MeGUI. At the same time I would like to see more technical or "geeks only" functionality from MeGUI; such as more filtering options, options for more source types, etc. There is already a very good complete N00b tool, AGK, and it has worked very well for me in the past, so I see no reason to make MeGUI a new AGK and rob the more advanced users of the potential benefits of more options in the AVS creator, etc, etc. If that is the kind of tool that people want then AGK should be further developed. I think the flexibility to use more advanced functionality is excellent because one who knows how can gain more control; hence producing a higher quality product for themselves. Hopefully. But x264 encoding and encoding video in general can be a daunting proposal for some who haven't spent hours and hours of their lives reading, experimenting and learning so I heartily agree that (accurate) automation is a priceless quality for any video encoding tool.

To sum my statement up, I think that further long term development of MeGUI which is beyond bug fixes should contain both automation functionality and more advanced options in the AVS creator. If the combination seems daunting to the dev's then they should just remember that this is an opensource project and there is absolutely no pressure on them from any force that may hinder their wellbeing to even continue with the project as it is. I am happy right now with MeGUI. With every update I feel like it's Christmas in Las Vegas. MeGUI is very mature and any update only makes a good thing better. If it takes time to make MeGUI what the community/dev's want it to be......so be it. No rush is needed. I use the latest dev releases several times a week and I have been for over a year. And essentially without suffering from bugs.

My hat is off to all fo the MeGUI dev's and everyone in the past and present who has made this possible.

berrinam
8th November 2007, 02:13
It's very nice to hear such words of praise for MeGUI. Thank you.

What kind of more advanced options for the source creator do you mean? More source types, more deinterlacers, more resizers? Or is there a whole other class of filters that have been ignored by the AVS creator?

berrinam
8th November 2007, 02:22
@Kurtnoise: What did you decide about an IFO parser? I remember you linked to C# IFO parser. If you've got something working, could you commit it soon, please, because there are some features I want to do that rely on IFO parsing. (I don't want to rush you though)

berrinam
8th November 2007, 03:59
@devs: You probably know this, but I'm just warning you that, since I have moved the folder where megui sources were kept, if you try updating your working copy, your changes will be deleted. The only way I know of updating my working copies is to create a patch of them against their revision, and then apply that to the most recent revision.

Just warning you, so that you don't lose your work, and also asking if there's a better way to do this.

saint-francis
8th November 2007, 05:02
.

What kind of more advanced options for the source creator do you mean? More source types, more deinterlacers, more resizers? Or is there a whole other class of filters that have been ignored by the AVS creator?

As far as sources go I would like to be able to plug HD DVD's in just like I can a regular DVD. I am fully aware that at this time such a desire is wishful thinking as there is no tool such as the awesome DGIndex for HD sources. Given the current limitations of that field all I need to work around with in MeGUI is selecting "all file types" when browsing for my graph with the AVS creator and inserting the framecount, etc. in the edit tab. Which is understandable since there will hopefully be tools in the future that will render such operations unnecessary. As far as other functionality is concerned I would like the ability to automate tools like seesaw, MT, fft3dfilter and other less used filters. Now I have to add such commands manually. Which is also understandable as these aren't in the realm of conventional DVD ripping and take a modicum of knowhow to operate. Also it would be difficult to create a gui to manage them. Still I can't operate these filters as well as even a script some here could write. The deinterlacers and resizers seem to be up to the job. I was particularly happy about the addition of yadif.

:thanks:

berrinam
8th November 2007, 05:10
I'm afraid I'm not up-to-scratch on Didee's tools (which seesaw is, right?) as I understand they require a lot of plugins, tweaking, and computer time. Generally with filters that aren't in MeGUI, they are more likely to be added if someone provides information about where the required dlls are (including which version is best) and what settings to use.

Anyway, I have something in mind about the Avisynth filters which might help you. I won't tell you what it is yet, though. :p

mroz
8th November 2007, 05:47
I disagree with you about limitations...Wizzards are created to simplify the normal uses and are mainly dedicated to people whose know nothing about A/V compression or anything else. Keep in mind that for newbies, the less there are, the more there are happy. :) Honestly I don't think that the main goal of a wizzard is to let multiples choices for people concerning customatization or tuning the settings. So, it means that maybe we need to rethink the goals of MeGUI (tend to be "newbies only", "geeks only"...).

Adopting your definition, would you even consider a MeGUI that was primarily wizard driven?

Do you think it isn't possible to design a user interface which appeals to newbies without rigidly locking down functionality & reducing value to geeks?

mroz
8th November 2007, 05:58
Anyone here use AvsP (http://avisynth.org/qwerpoi/About.html)? I haven't but I keep hearing good things. I was just wondering if any of its approaches might be of use or at least inspiration to any redesign of MeGUI's AVS script creator.

mroz
8th November 2007, 06:44
I hope you don't mind me asking the following here. If anyone objects just say & I'll refrain from any similar questions in future.

I'm looking for some book recommendations re C# with an aim to prodding MeGUI about a bit. I'm an experienced C programmer with a very basic grasp of OO concepts. I like O'Reilly books so was considering possibly three of:

Programming C#, Fourth Edition (http://www.oreilly.com/catalog/progcsharp4/index.html)
Programming C#, the top-selling book on Microsoft's high-performance C# programming language, is now in its fourth edition. Aimed at experienced programmers and web developers, this comprehensive guide focuses on the features and programming patterns...
Programming C# 3.0, Fifth Edition (http://www.oreilly.com/catalog/9780596527433/index.html)
This thoroughly updated tutorial for beginning to intermediate programmers covers C# 3.0 and the newest .NET platform for developing Windows and web applications. Now in its fifth edition, our bestselling Programming C# 3.0 teaches the essentials of ...
C# Cookbook, Second Edition (http://www.oreilly.com/catalog/csharpckbk2/index.html)
Completely revised for C# 2.0, this updated bestseller offers more than 100 new code solutions to common problems that you're sure to face as a C# programmer. Nearly every solution, or recipe, contains a complete, documented code sample showing you how...
C# 3.0 Cookbook, Third Edition (http://www.oreilly.com/catalog/9780596516109/index.html)
Completely updated for C# 3.0 and the .NET 3.5 platform, the new edition of this bestseller offers more than 250 code recipes to common and not-so-common problems that C# programmers face every day. More than a third of the recipes have been rewritten...
Learning C# 2005, Second Edition (http://www.oreilly.com/catalog/learncsharp2/index.html#top)
Completely revised to cover C# 2.0 and Visual Basic 2005, this introductory guide offers a thorough introduction to Microsoft's premier .NET language. Discover how to develop various kinds of web services and applications--including those that work with...

An opinons, comments or suggestions I stop spamming? :)

berrinam
8th November 2007, 07:12
Anyone here use AvsP (http://avisynth.org/qwerpoi/About.html)? I haven't but I keep hearing good things. I was just wondering if any of its approaches might be of use or at least inspiration to any redesign of MeGUI's AVS script creator.

I haven't used it yet, but some first thoughts from reading the webpage:
I'm very impressed with the user sliders. Great idea, looks like a simple syntax, too. They could help making customisable filters
A lot of the text features are probably somewhat a waste of time for MeGUI, because the AVS creator is predominantly (at the moment) a GUI-based -- not text-based -- tool. However, it would be a good idea to color comments green, do a little bit of parsing, and definitely get rid of the word wrap in the MeGUI AVS editor.

berrinam
8th November 2007, 07:18
I hope you don't mind me asking the following here. If anyone objects just say & I'll refrain from any similar questions in future.

I'm looking for some book recommendations re C# with an aim to prodding MeGUI about a bit. I'm an experienced C programmer with a very basic grasp of OO concepts. I like O'Reilly books so was considering possibly three of ...
I haven't read any of them. Actually, MeGUI was the first C# project I worked on; it wasn't too hard to pick up because it is similar to Java and Microsoft's IDE is excellent. C# is a bit further separated from C than from Java, but it is still a curly-brace language, so most of the syntax should be familiar to you. I recommend just diving into MeGUI, and googling things you don't understand; CodeProject has a lot of articles on C# syntax and features.

mroz
8th November 2007, 07:21
Thanks for the comments. Appreciated :)

Kurtnoise
8th November 2007, 08:29
What did you decide about an IFO parser? I remember you linked to C# IFO parser. If you've got something working, could you commit it soon, please, because there are some features I want to do that rely on IFO parsing. (I don't want to rush you though)
Nothing new for the moment (to be clear, nothing that can be committed)...I'll give it a try this weekend maybe.

Kurtnoise
8th November 2007, 08:33
Adopting your definition, would you even consider a MeGUI that was primarily wizard driven?
Honestly ? Nope...even if there is a "One-Click Encoder" but it's just my opinion. :)

Do you think it isn't possible to design a user interface which appeals to newbies without rigidly locking down functionality & reducing value to geeks?
depends on the values & functionalities you want to have...;) Of course, it's doable.

berrinam
8th November 2007, 13:41
0.2.6.1036
- (berrinam) Fixed exception in profile import when file already exists
- (Kurtnoise) [VideoEncoding] DAR values Initialization (fixed #1823977)
- (berrinam) Fix an exception when changing codec if no profile is selected
- (patch by eamonh) fix profile scrolling issues (fixes #1822000, #1827268)
- (patch by eamonh) Fix #1827919 (OneClickEncode Settings not saved)
Stable branch on autoupdate now updates to 0.2.6.1036. In about a week's time, the rest of autoupdate's stable branch will be updated to the current dev branch.

@Eamon: thanks for those patches.

@all: You can see SpAwN_gUy's modification of megui to support x264farm, which is currently a branch of megui residing at https://megui.svn.sourceforge.net/svnroot/megui/branches/x264farm

Sharktooth
8th November 2007, 14:27
Stable branch on autoupdate now updates to 0.2.6.1036. In about a week's time, the rest of autoupdate's stable branch will be updated to the current dev branch.
why not right now? if its a matter of time i can do it (i've made a nice script that will do that automatically...)

@devs: dgindex commandline for audio tracks handling is changed starting from 1.5 beta 11.
the autoupdate server actually has the b10. however if we plan to continue to update dgindex some changes to the d2v creator are required.
https://forum.doom9.org/showthread.php?p=1063355#post1063355

berrinam
8th November 2007, 21:35
why not right now? if its a matter of time i can do it (i've made a nice script that will do that automatically...)Because older versions of MeGUI might crash if there are programs in the update.xml file that they don't understand.

Sharktooth
8th November 2007, 22:29
uhm... like?

berrinam
8th November 2007, 22:32
I think this is the case for any new MeGUI program, like AVI-Mux GUI.

Sharktooth
8th November 2007, 22:44
we should implement a handler for that in future revisions.
however a fresh installation is still recommended since some settings were changed and could make megui crash too...

berrinam
8th November 2007, 22:48
I already have implemented it. The problem is that I only found the bug when adding AMG, by which point the older versions already existed and were in ready use.

Sharktooth
8th November 2007, 22:57
I made a stable release on SF. I also wrote a small note (http://sourceforge.net/project/shownotes.php?group_id=156112&release_id=552801) to inform users the latest packages are temporarily available only thru the dev auto-update.

Eamon21
9th November 2007, 00:47
Can anyone tell me why the Scriptserver when creating an AVISynth script using a directShowSource sets audio=false?

want to use a single file as source for both video and audio stream so need audio. I want my avs template to provide a source with audio but want to know what are the negatives of changing it to audio=true or leaving it out completely?

Eamon

mroz
9th November 2007, 01:20
I recall wondering when that would come up after I read your original post mentioning using a single avs to process audio & video together ;)

I don't know why the devs have it coded that way, but I do know when using AVISynth to process audio/video combined I've occasionally had problems with it screwing up. For example, a very slow script will sometimes result in the audio getting trashed for reasons I don't understand. Also, using the approach you want to adopt is inflexible in that it can only support one audio stream aiui.

I initially thought keeping the streams together made sense (ignoring the last limitation), as it looks cleaner & in my mind perhaps more opportunity to keep audio/video in sync (I've no idea if the underlying mechanisms make that an actual possibility).

However certainly in practice it just seems to screw up & cause more problems.

I'll be interested to hear what the devs say. There must be good reasons as they went to considerable lengths to separate the processing of audio & video - just look at the hassle of cutting a scripted source.

BTW Even if you keep audio out of your avs, you might still be able to use a single file as video & audio source - currently Megui will quite happily accept an avi containing video & audio as an audio input, as obviously will the avs creator.

Sharktooth
9th November 2007, 04:07
well, the reasons you mentioned, plus the fact avs will load all the plugins using more memory. that can screw the processing as well depending on the complexity of the script.

Dot50Cal
9th November 2007, 07:38
The page I used to update Nero's Audio Encoder has gone missing and is now replaced by a packaged version which it seems I have to pay for. Anyone know the details on this? Is there still a standalone FREE download for the codec?

Also, I'm not sure if its just me, but when CORE has updates, It never updates. It says it does, but it doesnt. I have to do it manually. Anyone know why?

Edit: Updating manually with core_0_2_6_1036.zip produces:
http://img251.imageshack.us/img251/7900/erroron0.jpg

Suppose thats known though, attempting a clean install.

Bigmango
9th November 2007, 07:42
The page I used to update Nero's Audio Encoder has gone missing and is now replaced by a packaged version which it seems I have to pay for. Anyone know the details on this? Is there still a standalone FREE download for the codec?


You can get it from this post:

http://forum.doom9.org/showthread.php?p=1055273#post1055273

Dot50Cal
9th November 2007, 07:57
Thanks for the fast reply, Its very much appreciated :)

SpAwN_gUy
9th November 2007, 11:21
You can get it from this post:

http://forum.doom9.org/showthread.php?p=1055273#post1055273
well.. it also can now be found.. HERE:
http://www.nero.com/eng/down-ndaudio.php

(i guess the've fixed that issue)

Eamon21
9th November 2007, 12:13
I don't know why the devs have it coded that way, but I do know when using AVISynth to process audio/video combined I've occasionally had problems with it screwing up. For example, a very slow script will sometimes result in the audio getting trashed for reasons I don't understand. Also, using the approach you want to adopt is inflexible in that it can only support one audio stream aiui.

I initially thought keeping the streams together made sense (ignoring the last limitation), as it looks cleaner & in my mind perhaps more opportunity to keep audio/video in sync (I've no idea if the underlying mechanisms make that an actual possibility).

However certainly in practice it just seems to screw up & cause more problems.

BTW Even if you keep audio out of your avs, you might still be able to use a single file as video & audio source - currently Megui will quite happily accept an avi containing video & audio as an audio input, as obviously will the avs creator.

well, the reasons you mentioned, plus the fact avs will load all the plugins using more memory. that can screw the processing as well depending on the complexity of the script.

I suspected as much but wanted to be sure.

The next question I was going to ask was whether it would be better to create a second avs script for the audio or to use the input file directly?

e.g.
Video avs:
DirectShowSource("C:\temp\test.MOV", fps=30, audio=false)
Audio avs:
DirectShowSource("C:\temp\test.MOV", audio=true)

but looking at how the audio is processed, it creates and uses an avs script anyway so I guess that answers my question and I should just specify the original input file as the audio source and let MeGUI take care of it.

Eamon

Kurtnoise
9th November 2007, 13:03
@devs:

MediaInfo Version 0.7.5.5, 2007-11-09
---------------
+ #1799859: Flac, tags are case insensitive
+ Matroska format parsing improvements
+ .mp4 speed improvement
x BDAV (Bluray) parser compilation was forgotten in the previous version
x AVI, Bitrate and stream size were false
x #1825218: IFO parser was brocken
x #1825521: .mp4 chapters times were wrong
x #1801549: DLL was crashing during Delphi/C# debugging sessions

Sharktooth
9th November 2007, 14:41
here we go!

@Dot50Cal: clear the jobs and it should work. however a clean install is recommended.

Sharktooth
9th November 2007, 15:10
@spawn_guy: before commiting something to the SVN ensure you first update. The x264farm batch files and .nsi script were just up to date.
Also NEVER use TABS in place of blank spaces ;)

Eamon21
9th November 2007, 16:14
This is a question regarding the OneClick profile setup, on the container tab, it says Since the possible output filetypes are not known until the input is configured, the output type cannot be configured in a profile. Instead, here is a list of known file-types. You choose which you are happy with, and MeGUI will attempt to encode to one of those on the list.

Surely the container type is more dependant on the encoders selected for video and audio? And if this is the case, then after the video and audio codecs have been selected, you should be able to specify the container from a list applicable to those codecs?

Does this make sense or am I off base? And if I have got the wrong end of the stick, can someone give an example where we couldn't select the container type based on the video and audio codecs selected?

Eamon

check
9th November 2007, 17:39
The mewiki server has been migrated to a new host. URLs are changing back to the nice format, eg
http://mewiki.project357.com/wiki/Main_Page
http://mewiki.project357.com/wiki/MeGUI:Avs_cutter

It's missing images, but those will hopefully be updated this weekend.

Kurtnoise
10th November 2007, 08:47
This is a question regarding the OneClick profile setup, on the container tab, it says

Surely the container type is more dependant on the encoders selected for video and audio? And if this is the case, then after the video and audio codecs have been selected, you should be able to specify the container from a list applicable to those codecs?

Does this make sense or am I off base?
For what I understand, you're correct...:)

berrinam
10th November 2007, 13:54
This is a question regarding the OneClick profile setup, on the container tab, it says

Surely the container type is more dependant on the encoders selected for video and audio? And if this is the case, then after the video and audio codecs have been selected, you should be able to specify the container from a list applicable to those codecs?

Does this make sense or am I off base? And if I have got the wrong end of the stick, can someone give an example where we couldn't select the container type based on the video and audio codecs selected?

Eamon

This is true, except it ignores the possibility that the audio may be the same as the source. In that case, the output format is restricted. While this may not be a common case, I at least believe the current situation adequately solves both the case of unencoded audio, and encoded-only audio.

@devs: Now that we are maintaining multiple branches, do we want to have some kind of rule abouting merging bugfixes? Perhaps commit bugfixes to the trunk, and merge only when a new version is distributed? Or should we merge every time we commit a bugfix?

Kurtnoise
10th November 2007, 14:35
@devs: Now that we are maintaining multiple branches, do we want to have some kind of rule abouting merging bugfixes? Perhaps commit bugfixes to the trunk, and merge only when a new version is distributed? Or should we merge every time we commit a bugfix?
For me:
bugfixes: both in the trunk and branches.
new features: only in the trunk.

Sharktooth
10th November 2007, 15:13
i think the same as kurtnoise.

Kurtnoise
10th November 2007, 17:25
1/ Concerning the commits for the new features: maybe a review of the patch(es) by one or two developpers could be great before to commit it(them) to the trunk....to avoid random issues you know. ;) Aften patches mostly finished for my part...

2/ I think (as a normal user, not a developper or something like that ;)) that the Profiles and the Codecs List must be renamed to be more clear. So, here is a proposition for the Audio Codecs:

AAC - FAAC
AAC - Nero Digital
AAC - Winamp
AC3 - Aften
AC3 - FFmpeg
MP2 - FFmpeg
MP3 - Aud-X
MP3 - Lame
OGG - Xiph

As you can see, the Format Type first followed by the name of the Encoder Engine and sorted in alphabetic order of course.

Here the patch:
Index: core/gui/Form1.cs
===================================================================
--- core/gui/Form1.cs (revision 358)
+++ core/gui/Form1.cs (working copy)
@@ -1778,14 +1778,14 @@
PackageSystem.VideoSettingsProviders.Register(new XviDSettingsProvider());
PackageSystem.VideoSettingsProviders.Register(new SnowSettingsProvider());
PackageSystem.VideoSettingsProviders.Register(new LavcSettingsProvider());
+ PackageSystem.AudioSettingsProviders.Register(new faacSettingsProvider());
PackageSystem.AudioSettingsProviders.Register(new NeroAACSettingsProvider());
- PackageSystem.AudioSettingsProviders.Register(new AudXSettingsProvider());
- PackageSystem.AudioSettingsProviders.Register(new faacSettingsProvider());
+ PackageSystem.AudioSettingsProviders.Register(new waacSettingsProvider());
PackageSystem.AudioSettingsProviders.Register(new ffac3SettingsProvider());
PackageSystem.AudioSettingsProviders.Register(new ffmp2SettingsProvider());
- PackageSystem.AudioSettingsProviders.Register(new lameSettingsProvider());
- PackageSystem.AudioSettingsProviders.Register(new vorbisSettingsProvider());
- PackageSystem.AudioSettingsProviders.Register(new waacSettingsProvider());
+ PackageSystem.AudioSettingsProviders.Register(new AudXSettingsProvider());
+ PackageSystem.AudioSettingsProviders.Register(new lameSettingsProvider());
+ PackageSystem.AudioSettingsProviders.Register(new vorbisSettingsProvider());
PackageSystem.MediaFileTypes.Register(new AvsFileFactory());
PackageSystem.MediaFileTypes.Register(new d2vFileFactory());
PackageSystem.MediaFileTypes.Register(new MediaInfoFileFactory());
Index: core/plugins/interfaces/ISettingsProvider.cs
===================================================================
--- core/plugins/interfaces/ISettingsProvider.cs (revision 358)
+++ core/plugins/interfaces/ISettingsProvider.cs (working copy)
@@ -400,7 +400,7 @@
NeroAACSettings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public NeroAACSettingsProvider()
- : base("ND AAC", AudioEncoderType.NAAC, AudioCodec.AAC)
+ : base("AAC - Nero Digital", AudioEncoderType.NAAC, AudioCodec.AAC)
{
}
}
@@ -408,49 +408,49 @@
AudXSettings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public AudXSettingsProvider()
- : base("Aud-X", AudioEncoderType.AUDX, AudioCodec.MP3)
+ : base("MP3 - Aud-X", AudioEncoderType.AUDX, AudioCodec.MP3)
{ }
}
public class faacSettingsProvider : SettingsProviderImpl2<faacConfigurationPanel, string[],
FaacSettings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public faacSettingsProvider()
- : base("FAAC", AudioEncoderType.FAAC, AudioCodec.AAC)
+ : base("AAC - FAAC", AudioEncoderType.FAAC, AudioCodec.AAC)
{ }
}
public class ffac3SettingsProvider : SettingsProviderImpl2<AC3ConfigurationPanel, string[],
AC3Settings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public ffac3SettingsProvider()
- : base("FFMPEG AC-3", AudioEncoderType.FFAC3, AudioCodec.AC3)
+ : base("AC3 - FFmpeg", AudioEncoderType.FFAC3, AudioCodec.AC3)
{ }
}
public class ffmp2SettingsProvider : SettingsProviderImpl2<MP2ConfigurationPanel, string[],
MP2Settings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public ffmp2SettingsProvider()
- : base("FFMPEG MP2", AudioEncoderType.FFMP2, AudioCodec.MP2)
+ : base("MP2 - FFmpeg", AudioEncoderType.FFMP2, AudioCodec.MP2)
{ }
}
public class lameSettingsProvider : SettingsProviderImpl2<lameConfigurationPanel, string[],
MP3Settings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public lameSettingsProvider()
- : base("LAME MP3", AudioEncoderType.LAME, AudioCodec.MP3)
+ : base("MP3 - Lame", AudioEncoderType.LAME, AudioCodec.MP3)
{ }
}
public class vorbisSettingsProvider : SettingsProviderImpl2<OggVorbisConfigurationPanel, string[],
OggVorbisSettings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public vorbisSettingsProvider()
- : base("Ogg Vorbis", AudioEncoderType.VORBIS, AudioCodec.VORBIS)
+ : base("OGG - Xiph", AudioEncoderType.VORBIS, AudioCodec.VORBIS)
{ }
}
public class waacSettingsProvider : SettingsProviderImpl2<WinAmpAACConfigurationPanel, string[],
WinAmpAACSettings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public waacSettingsProvider()
- : base("Winamp AAC", AudioEncoderType.WAAC, AudioCodec.AAC)
+ : base("AAC - Winamp", AudioEncoderType.WAAC, AudioCodec.AAC)
{ }
}


What do you think about that ?

JarrettH
10th November 2007, 20:45
Why is there an option to use MP2? :scared:

berrinam
10th November 2007, 23:35
For me:
bugfixes: both in the trunk and branches.
new features: only in the trunk.


What I really meant was, do we merge the bugfixes every time we commit them, or just merge when we increase the version number?

1/ Concerning the commits for the new features: maybe a review of the patch(es) by one or two developpers could be great before to commit it(them) to the trunk....to avoid random issues you know. ;) Aften patches mostly finished for my part...Good idea. How does it work with significantly larger patches, though? New functionality often introduces a number of new files, etc. Still post the patches here?

2/ I think (as a normal user, not a developper or something like that ;)) that the Profiles and the Codecs List must be renamed to be more clear. So, here is a proposition for the Audio Codecs:

AAC - FAAC
AAC - Nero Digital
AAC - Winamp
AC3 - Aften
AC3 - FFmpeg
MP2 - FFmpeg
MP3 - Aud-X
MP3 - Lame
OGG - Xiph

As you can see, the Format Type first followed by the name of the Encoder Engine and sorted in alphabetic order of course.

Here the patch:
Index: core/gui/Form1.cs
===================================================================
--- core/gui/Form1.cs (revision 358)
+++ core/gui/Form1.cs (working copy)
@@ -1778,14 +1778,14 @@
PackageSystem.VideoSettingsProviders.Register(new XviDSettingsProvider());
PackageSystem.VideoSettingsProviders.Register(new SnowSettingsProvider());
PackageSystem.VideoSettingsProviders.Register(new LavcSettingsProvider());
+ PackageSystem.AudioSettingsProviders.Register(new faacSettingsProvider());
PackageSystem.AudioSettingsProviders.Register(new NeroAACSettingsProvider());
- PackageSystem.AudioSettingsProviders.Register(new AudXSettingsProvider());
- PackageSystem.AudioSettingsProviders.Register(new faacSettingsProvider());
+ PackageSystem.AudioSettingsProviders.Register(new waacSettingsProvider());
PackageSystem.AudioSettingsProviders.Register(new ffac3SettingsProvider());
PackageSystem.AudioSettingsProviders.Register(new ffmp2SettingsProvider());
- PackageSystem.AudioSettingsProviders.Register(new lameSettingsProvider());
- PackageSystem.AudioSettingsProviders.Register(new vorbisSettingsProvider());
- PackageSystem.AudioSettingsProviders.Register(new waacSettingsProvider());
+ PackageSystem.AudioSettingsProviders.Register(new AudXSettingsProvider());
+ PackageSystem.AudioSettingsProviders.Register(new lameSettingsProvider());
+ PackageSystem.AudioSettingsProviders.Register(new vorbisSettingsProvider());
PackageSystem.MediaFileTypes.Register(new AvsFileFactory());
PackageSystem.MediaFileTypes.Register(new d2vFileFactory());
PackageSystem.MediaFileTypes.Register(new MediaInfoFileFactory());
Index: core/plugins/interfaces/ISettingsProvider.cs
===================================================================
--- core/plugins/interfaces/ISettingsProvider.cs (revision 358)
+++ core/plugins/interfaces/ISettingsProvider.cs (working copy)
@@ -400,7 +400,7 @@
NeroAACSettings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public NeroAACSettingsProvider()
- : base("ND AAC", AudioEncoderType.NAAC, AudioCodec.AAC)
+ : base("AAC - Nero Digital", AudioEncoderType.NAAC, AudioCodec.AAC)
{
}
}
@@ -408,49 +408,49 @@
AudXSettings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public AudXSettingsProvider()
- : base("Aud-X", AudioEncoderType.AUDX, AudioCodec.MP3)
+ : base("MP3 - Aud-X", AudioEncoderType.AUDX, AudioCodec.MP3)
{ }
}
public class faacSettingsProvider : SettingsProviderImpl2<faacConfigurationPanel, string[],
FaacSettings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public faacSettingsProvider()
- : base("FAAC", AudioEncoderType.FAAC, AudioCodec.AAC)
+ : base("AAC - FAAC", AudioEncoderType.FAAC, AudioCodec.AAC)
{ }
}
public class ffac3SettingsProvider : SettingsProviderImpl2<AC3ConfigurationPanel, string[],
AC3Settings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public ffac3SettingsProvider()
- : base("FFMPEG AC-3", AudioEncoderType.FFAC3, AudioCodec.AC3)
+ : base("AC3 - FFmpeg", AudioEncoderType.FFAC3, AudioCodec.AC3)
{ }
}
public class ffmp2SettingsProvider : SettingsProviderImpl2<MP2ConfigurationPanel, string[],
MP2Settings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public ffmp2SettingsProvider()
- : base("FFMPEG MP2", AudioEncoderType.FFMP2, AudioCodec.MP2)
+ : base("MP2 - FFmpeg", AudioEncoderType.FFMP2, AudioCodec.MP2)
{ }
}
public class lameSettingsProvider : SettingsProviderImpl2<lameConfigurationPanel, string[],
MP3Settings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public lameSettingsProvider()
- : base("LAME MP3", AudioEncoderType.LAME, AudioCodec.MP3)
+ : base("MP3 - Lame", AudioEncoderType.LAME, AudioCodec.MP3)
{ }
}
public class vorbisSettingsProvider : SettingsProviderImpl2<OggVorbisConfigurationPanel, string[],
OggVorbisSettings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public vorbisSettingsProvider()
- : base("Ogg Vorbis", AudioEncoderType.VORBIS, AudioCodec.VORBIS)
+ : base("OGG - Xiph", AudioEncoderType.VORBIS, AudioCodec.VORBIS)
{ }
}
public class waacSettingsProvider : SettingsProviderImpl2<WinAmpAACConfigurationPanel, string[],
WinAmpAACSettings, AudioCodecSettings, AudioCodec, AudioEncoderType>
{
public waacSettingsProvider()
- : base("Winamp AAC", AudioEncoderType.WAAC, AudioCodec.AAC)
+ : base("AAC - Winamp", AudioEncoderType.WAAC, AudioCodec.AAC)
{ }
}
Sounds fine. But it would be easier to sort alphabetically by setting the Sorted property of the codec combobox in the AudioEncodingTab to True.

check
11th November 2007, 07:01
The DNS and nameserver changes for the mewiki server should be fully propagated now, can I request the urls in the program are changed?

berrinam
11th November 2007, 08:18
I believe either Kurtnoise or Sharktooth has already changed them.

Kurtnoise
11th November 2007, 09:15
What I really meant was, do we merge the bugfixes every time we commit them, or just merge when we increase the version number?
As versioning is made randomly, I'll more interested to commit them every time, yes...

Good idea. How does it work with significantly larger patches, though? New functionality often introduces a number of new files, etc.
The usual way is to split large patches in several small files...

Still post the patches here?
well...I'm not against to find a better way but personally I've no idea about that. Unless that patches relative to the features requests already mentioned in the SF tracker could be discussed in their respective threads.

Sounds fine. But it would be easier to sort alphabetically by setting the Sorted property of the codec combobox in the AudioEncodingTab to True.
You're right. I forgot that..I'll commit it asap with your notice.


@JarettH: why not ?

@Check: yeah, it has been fixed in the dev build and some branches.

Kurtnoise
11th November 2007, 21:40
My patches for reviews or testings can be found here: http://kurtnoise.free.fr/index.php?dir=MeGUI/

Enjoy...:]

berrinam
12th November 2007, 04:41
My patches are at http://megui.org/berrinam_patches/:)

berrinam
12th November 2007, 04:53
Does anyone find TortoiseSVN a bit shonky with patches which create new files? Is there a way to fix this?

berrinam
12th November 2007, 05:23
@kurtnoise: I tried encoding a 5ch ac3 file with aften, and it appears to map the channels incorrectly. I don't have a proper testing file, though, so I can't say exactly what it does.

There's also a problem with the 3rd patch file, which TortoiseMerge rejects as invalid. I fixed that by changing the last chunk's header from @@ -2024,9 +2064,11 @@ to @@ -2024,9 +2064,10 @@

Other than that, it appears to be fine, except that it needs an addition to UpdateWindow so that it will be auto-updateable.

EDIT: This patch should be all that's required for UpdateWindow: Index: UpdateWindow.cs
===================================================================
--- UpdateWindow.cs (revision 360)
+++ UpdateWindow.cs (working copy)
@@ -498,6 +498,8 @@
return meGUISettings.Avc2aviPath;
case ("yadif"):
return meGUISettings.YadifPath;
+ case ("aften"):
+ return meGUISettings.AftenPath;
default:
return null;
}
@@ -554,6 +556,9 @@
case ("yadif"):
meGUISettings.YadifPath = value;
return;
+ case ("aften"):
+ meGUISettings.AftenPath = value;
+ return;
}
}
}


I've also put aften on the www.megui.org development autoupdate server so it can be tested. I already have tested it, and it appears to work fine.

Kurtnoise
12th November 2007, 07:54
I tried encoding a 5ch ac3 file with aften, and it appears to map the channels incorrectly. I don't have a proper testing file, though, so I can't say exactly what it does.
We can tweak the command line for this:


[-chmap #] Channel mapping order of input audio
0 = WAVE mapping (default)
1 = AC-3 mapping
2 = MPEG mapping

but I don't know the best case here: if we let the user to setup the mapping by themself (as Aften options) or if we tune directly the command line according to the input file type...What do you think ?

There's also a problem with the 3rd patch file, which TortoiseMerge rejects as invalid.
mmh, you're right and I think it's my fault...:p Sorry, I'll fix that.

Other than that, it appears to be fine, except that it needs an addition to UpdateWindow so that it will be auto-updateable.
yes...thanks for the patch.

SpAwN_gUy
12th November 2007, 09:04
@spawn_guy: before commiting something to the SVN ensure you first update. The x264farm batch files and .nsi script were just up to date.
Also NEVER use TABS in place of blank spaces ;)
Thanks!
i'll do that.. i think.. i'll tuneUp ReSharper to fix that...

i'm new to SVN. we're mostly using CVS ;)

check
12th November 2007, 09:13
Here's a nice 5.1 test file. It was actually created to test 5.1 with various audio codecs, but it clearly marks the channel you should hear from so it might be useful to ensure channel mappings are correct. http://cccp.project357.com/samples/%5bCCCP%5d_Manhole_Test_Your_5.1_%5brevamped%5d.mkv

berrinam
12th November 2007, 10:22
I've written some code which automates running of DVDDecrypter. But is this currently the best DVD ripper around, or should I use another?

Kurtnoise
12th November 2007, 12:08
I used to use it but there are also AnyDVD(HD) and DVDFab Decrypter more robust for the new protections.



btw, the Delay patch looks ok...

Adub
12th November 2007, 12:49
Just to chime in, DVDDecrypter support is nice, but it is starting to become seriously out of date.

Kurtnoise13 is right in suggesting either AnyDVD or DVDFab Decrypter. Frankly, I am more for DVD Fab Decrypter, seeing as it is a free alternative.

berrinam
12th November 2007, 13:27
Well, as long as they have commandline interfaces, it shouldn't be too hard to add them... (although I obviously wouldn't add both)

buzzqw
12th November 2007, 13:39
the new releases of dvd fab decrypter have removed command line interface :(

BHH

fleon
12th November 2007, 16:25
I have a problem with megui: I installed and opened then i started to update megui with everything but when mencoder is completed I get and error also I reopened the program and tried to update another componet or external program I get the same error, I also have staxrip installed, this is the error:
http://img444.imageshack.us/img444/2793/meguiru7.th.jpg (http://img444.imageshack.us/my.php?image=meguiru7.jpg)

Kurtnoise
12th November 2007, 16:47
I have a problem with megui: I installed and opened then i started to update megui with everything but when mencoder is completed I get and error also I reopened the program and tried to update another componet or external program I get the same error, I also have staxrip installed, this is the error:
http://img444.imageshack.us/img444/2793/meguiru7.th.jpg (http://img444.imageshack.us/my.php?image=meguiru7.jpg)
don't count on me to answer you right here...

fleon
12th November 2007, 17:02
don't count on me to answer you right here...

sorry, so were you can answer me?

Kurtnoise
12th November 2007, 18:01
sorry, so were you can answer me?
http://forum.doom9.org/showthread.php?t=105920


I tried encoding a 5ch ac3 file with aften, and it appears to map the channels incorrectly. I don't have a proper testing file, though, so I can't say exactly what it does.
We can tweak the command line for this:


[-chmap #] Channel mapping order of input audio
0 = WAVE mapping (default)
1 = AC-3 mapping
2 = MPEG mapping
but I don't know the best case here: if we let the user to setup the mapping by themself (as Aften options) or if we tune directly the command line according to the input file type...What do you think ?
After some rethinking, this is clearly a bad idea. All import audio filters (WavSource, NicAC3Source, NicDTSSource,...DirectShowSource) return the correct channels order (i.e WAV Format). A note to myself: don't touch on channels mapping. :p

So, ok to commit ?

berrinam
13th November 2007, 00:06
Go ahead. :)

avdw
13th November 2007, 00:22
The problem is, as will those hundreds of frontends, they all use their own, or different versions of DGIndex and DGDecode,
whatever you do, you always get some errors about incompatible/wrong DGIndex file used, etc... etc....

Time to force the frontend developers to TALK to each other, make their tools compatible and last but not least, give us at least a little explanation about the options in the program.

As for MeGUI, it might be good, but the interface is a complete mess, there is no single logic in it, first you have to do something from the drop down boxes, then ? Uggggh, try another button and see if that works ? No, so you need to go searching in the menus for the function you have to use first, then try again ? Then set some options in the encoding profile, then go searching for the menu option how to choose a predefined target size, than all previously executed commands are invalid, and you have to go searching again where to continue.

I finally got it as far as setting a predefined size of 700 MB, it ran the 2 passes, resulting in an AVI file of over 1 Gigabyte in size....... Pfffffffffff.........

Today, I start it up, there is an update avaliable to core 02.6.1037, I let it update, BANG! it just crashes and never updates.

As for the option to shutdown the system after completing the Queue, make it default to not shutdown immediatelly but at least give the user a 20 second time to eventually abort the shutdown. Why is this option only changable in some very well hidden dropdown menu and not in the queue window itself ?
And why doesn't it revert to "Do nothing" the next time you enqueue something.

This night I let it encode some stuff (completely wrong BTW, the frontend wasn't even able to give me a 25FPS 700MB avi, but instead gave me a 20FPS 1GB file, but that's another story).... The system shut down, OK.

Today, I want to encode something, I let it analyse the file and BAM! The system happily shuts down, lost all other work on the PC.

It's one giant mess !

As for Megui, some simple explanations ? Some manual ? Some walkthrough ? Nothing at all !
First time you run it, you are presented with all bunch of tools it has to update ? What will it do with them ?
Will it dump them in it's own subfolder ? Will it install them all in their predefined folder, thereby fucking up all other frontends that require a specified version of those tools ? It downloaded them, and now their all are zipped it a subfolder called "update_cache" .... What do i have to do with them ? Do I have to manually install them all, therefor getting all other frontends and tools spit out errors on the fly..... I have no single idea.

A helpfile ? Seems like that's the ultimate nightmare of a frontend programmer, the biggest help is some link to some wiki page with no contents at all....

mroz
13th November 2007, 02:30
http://forum.doom9.org/showthread.php?t=105920


After some rethinking, this is clearly a bad idea. All import audio filters (WavSource, NicAC3Source, NicDTSSource,...DirectShowSource) return the correct channels order (i.e WAV Format). A note to myself: don't touch on channels mapping. :p

From what you say above, there shouldn't be a channel mapping problem, but you reported you'd observed one in a preceeding post? Was that a mistake or did it have some other now sorted cause? Just being nosey :)

berrinam
13th November 2007, 02:33
As for MeGUI, it might be good, but the interface is a complete mess, there is no single logic in itWe are addressing this concern.

I finally got it as far as setting a predefined size of 700 MB, it ran the 2 passes, resulting in an AVI file of over 1 Gigabyte in size....... Pfffffffffff.........Today, I start it up, there is an update avaliable to core 02.6.1037, I let it update, BANG! it just crashes and never updates.Please post your log and the options and tools you used on the Sourceforge bug tracker (http://sourceforge.net/tracker/?group_id=156112&atid=798476) and we will attempt to solve these problems as soon as possible.

As for the option to shutdown the system after completing the Queue, make it default to not shutdown immediatelly but at least give the user a 20 second time to eventually abort the shutdown.There is a 30-second wait already.

And why doesn't it revert to "Do nothing" the next time you enqueue something.This is one of the problems with creating user interface problems that the we (the developers) do not use ourselves: we cannot know what good defaults are. We need users to suggest good defaults, so thank you for doing so.

First time you run it, you are presented with all bunch of tools it has to update ? What will it do with them ?
Will it dump them in it's own subfolder ? Will it install them all in their predefined folder, thereby fucking up all other frontends that require a specified version of those tools ? It downloaded them, and now their all are zipped it a subfolder called "update_cache" .... What do i have to do with them ? Do I have to manually install them all, therefor getting all other frontends and tools spit out errors on the fly..... I have no single idea.
MeGUI does very little which can affect your system setup, since with the default settings, MeGUI installs all updated programs to folders within the MeGUI installation folder. This means that uninstalling MeGUI will make it clean up after itself, not affecting any other encoding frontends

The single exception to this rule is Avisynth plugins, which are installed to the default Avisynth plugin folder. This was a deliberate decision, made to take advantage of Avisynth plugin auto-loading.


As for Megui, some simple explanations ? Some manual ? Some walkthrough ? Nothing at all !
A helpfile ? Seems like that's the ultimate nightmare of a frontend programmer, the biggest help is some link to some wiki page with no contents at all....
Admittedly, there are currently technical issues with the wiki which render the guides there useless (although the content has been there at some stage). The options reference section still appears to be in order, though.

There are two other step-by-step MeGUI guides on external websites, available here (http://www.digital-digest.com/articles/MeGUI_H.264_Conversion_Guide_page1.html) and here (http://www.afterdawn.com/guides/archive/me_gui_convert_to_xvid.cfm). I hope they can help you.

berrinam
13th November 2007, 02:34
From what you say above, there shouldn't be a channel mapping problem, but you reported you'd observed one in a preceeding post? Was that a mistake or did it have some other now sorted cause? Just being nosey :)I had a problem with channel mapping, which I assume hasn't yet been solved. It could have been a problem with the setup on my end, though...

mroz
13th November 2007, 02:34
@avdw: With the new stable release & a new dev version in the works, from the sound of it with major gui changes, I'm sure the devs would appreciate input as it develops.

As to the docs, if you get to the point where you're comfortable using Megui but can still remember your initial problems, perhaps you'd be a good candidate to write some docs? It's always hard for the authors, as they're too close to the code to see things from a new user perspective.

mroz
13th November 2007, 02:39
Please post your log and the options and tools you used on the Sourceforge bug tracker (http://sourceforge.net/tracker/?group_id=156112&atid=798476) and we will attempt to solve these problems as soon as possible.

If the codec was xvid the problem will be the profile. I'm no expert (if I had a catchphrase, that'd be it), but they seem to have very restrictive ranges on the quantisers (which I didn't think was necessary as I thought the codec would make sensible choices most of the time for the available bandwidth).

I've never had that problem with the x264 profiles.

Kurtnoise
13th November 2007, 07:23
From what you say above, there shouldn't be a channel mapping problem, but you reported you'd observed one in a preceeding post? Was that a mistake or did it have some other now sorted cause? Just being nosey :)
I think that the culprit is script.Append("6<=Audiochannels(last)?GetChannel(last,1,3,2,5,6,4):last" + Environment.NewLine); line 616 in AvisynthAudioEncoder.cs...

Kurtnoise
13th November 2007, 11:49
@berrinam: about the new log patch

nothing to say concerning the code...it looks ok. ;)
can we change the picture for the treeview or did you use the one included in the windows system libs ?
might be more interesting to save the log as xml file instead of txt, right ?
could be great to expand the node when the job/process is running and close it then the job is finished...or colors the node as bold (dunno if it's doable though).
Just above Commandline node (in the Input part), add a new node (Input File: xxxxxxxxxxxxxxxxxxxxx\my_inputfile)


http://img402.imageshack.us/img402/6830/meguilog2zm3.png

kumi
13th November 2007, 12:03
might be more interesting to save the log as xml file instead of txt, right ?
Sorry to butt in, but how about something more human-readable like YAML?

Kurtnoise
13th November 2007, 12:15
sure...why not. :)

berrinam
13th November 2007, 12:51
can we change the picture for the treeview or did you use the one included in the windows system libs ?I used system icons for the log because that was all I could find. I know nothing about graphics creation, so I don't know where to get other images, although it is a simple task to use other images once they are provided -- other images simply need to be loaded into the ImageList in the LogTree widget.

might be more interesting to save the log as xml file instead of txt, right ?I actually did plain-text because I found it very human-readable, and more compact than something like XML. It's also very easy to produce programmatically, and the dashes mean that even non-monospaced fonts like SourceForge's bug tracker will preserve indentation. I'm not sure why you would want a "heavier" format, so to speak.

could be great to expand the node when the job/process is running and close it then the job is finished...or colors the node as bold (dunno if it's doable though).I imagine expansion and contraction of the nodes might not be too hard.

Just above Commandline node (in the Input part), add a new node (Input File: xxxxxxxxxxxxxxxxxxxxx\my_inputfile)You mean I should log the input file?

SpAwN_gUy
13th November 2007, 12:57
Sorry to butt in, but how about something more human-readable like YAML?
and some part of "new" features of meGUI could load those .logs and Show them with glowing and jumping texts.. with words "yeppie, you did it.. want to encode more?" ;) ..

sorry, those were my two cents..


but the idea with.. LogTreeView ('cause now one can start few processes same time) would be nice..
or.. i just miss-read.. ???

mroz
13th November 2007, 13:22
I actually did plain-text because I found it very human-readable, and more compact than something like XML. It's also very easy to produce programmatically, and the dashes mean that even non-monospaced fonts like SourceForge's bug tracker will preserve indentation. I'm not sure why you would want a "heavier" format, so to speak.

Yaml looks to be a good format with appeal to all applications. Very readable & also easy to parse. As to a use case, how about if one wants to batch process jobs then format a report summarising certain aspects of the results? It's also pretty compact, though if space is that much of a concern just zip each log, or logs over a certain age.

berrinam
13th November 2007, 13:30
Yaml looks to be a good format with appeal to all applications. Very readable & also easy to parse. As to a use case, how about if one wants to batch process jobs then format a report summarising certain aspects of the results? It's also pretty compact, though if space is that much of a concern just zip each log, or logs over a certain age.

I was really considering compactness in reading. Xml would be inappropriate for a log because you have to read so much junk along with the content. I don't know about YAML, not having used it, but I presently can't see a strong case for it being superior to the planned formatting, which is already very simple, parsable, and clear to read. Of course, most of you don't know what this will look like, so here's an example:
[Information] Log
-[Information] Version information
--[NoImage] MeGUI Version: 0.3.0.0
--[NoImage] OS used: Microsoft Windows XP Professional Service Pack 2
--[NoImage] .Net Framework installed: 2.0.50727.832
-[Information] Settings
--[NoImage] YadifPath: yadif.dll

Sharktooth
13th November 2007, 14:06
Oops... as usual i forgot to paste the new build changelog...
0.2.6.1037
- (Kurtnoise) [ProgressWindow] fixed timeElapsed issue for 24h+.
- (Kurtnoise) Updated wiki links.
- (Kurtnoise) [MP4BoxMuxer] workaround to avoid tmp command issues (fixed #1828277)

@berrinam: do you think it's time to update the stable folder of the auto-update server?

Kurtnoise
13th November 2007, 14:16
I actually did plain-text because I found it very human-readable, and more compact than something like XML. It's also very easy to produce programmatically, and the dashes mean that even non-monospaced fonts like SourceForge's bug tracker will preserve indentation. I'm not sure why you would want a "heavier" format, so to speak.
After reading your last reply, that makes sense. You're right...

You mean I should log the input file?
Yes, something like that...look at the picture just above. This is not really important for sure. :)



btw, I'm wondering if we can distinguish an Audio vs a Video job with our code ? I mean that could be great to have in the log some tuning like "[hh:mm:ss] Audio Encoding started..." or when we have a video job processing "[hh:mm:ss] Video Encoding started..."

Sharktooth
13th November 2007, 14:18
we can distinguish it...

Sharktooth
13th November 2007, 15:00
0.2.6.1038
- (Kurtnoise) [Progress Window] use TotalHours only, dude...

avdw
13th November 2007, 18:39
We are addressing this concern.

...
Please post your log and the options and tools you used on the Sourceforge bug tracker (http://sourceforge.net/tracker/?group_id=156112&atid=798476) and we will attempt to solve these problems as soon as possible.


Thanks for the help, unfortunatelly I already uninstalled this Megui frontend.

After all the problems I posted early, I also found that the encoded video contains MP3 audio which plays at about 100x(!!) the speed it has to, on top of that If I analyse some .VOB file in the AviSynth Script Editor, it spits out a different source type every time.

I actually got the best idea I had about this tools, compared the whole bunch of threads about bugs, problems, development, etc... etc.... to the times this program actually has been downloaded, and that made it very clear that i better get rid of it instead of wasting my time any further.
Thanks.

berrinam
13th November 2007, 23:38
@berrinam: do you think it's time to update the stable folder of the auto-update server?Yes. You said you had a script to do this, so would you be able to do that please?

but the idea with.. LogTreeView ('cause now one can start few processes same time) would be nice..
or.. i just miss-read.. ???You were right: it is a tree-based log, and it handles logs of parallel jobs properly.

berrinam
13th November 2007, 23:55
btw, I'm wondering if we can distinguish an Audio vs a Video job with our code ? I mean that could be great to have in the log some tuning like "[hh:mm:ss] Audio Encoding started..." or when we have a video job processing "[hh:mm:ss] Video Encoding started..."

could be great to expand the node when the job/process is running and close it then the job is finished...or colors the node as bold (dunno if it's doable though).

I've done these two things. I can't create a patch just for them, so I'll just show you the changes. For the first, I've done this:

Index: core/details/audio/AudioJob.cs
===================================================================
--- core/details/audio/AudioJob.cs (revision 341)
+++ core/details/audio/AudioJob.cs (working copy)
@@ -73,7 +73,7 @@
{
get
{
- return null;
+ return "audio";
}
}

Index: core/details/video/VideoJob.cs
===================================================================
--- core/details/video/VideoJob.cs (revision 341)
+++ core/details/video/VideoJob.cs (working copy)
@@ -76,6 +76,8 @@
{
get
{
+ return "video";
+ /*
int mode = settings.EncodingMode;
switch (mode)
{
@@ -99,7 +101,7 @@
case (int)VideoCodecSettings.Mode.threepass3:
return "3 pass 3rd pass";
}
- return "";
+ return "";*/
}
}
}
Index: core/gui/JobWorkerWindow.cs
===================================================================
--- core/gui/JobWorkerWindow.cs (revision 341)
+++ core/gui/JobWorkerWindow.cs (working copy)
@@ -556,6 +525,11 @@
{
try
{
log = mainForm.Log.Info("Log for " + job.Name);
+ log.LogValue("Job type", job.Job.EncodingMode);
log.LogEvent("Started handling job");

status = JobWorkerStatus.Running;
//Check to see if output file already exists before encoding.
if (File.Exists(job.Job.Output) && !mainForm.DialogManager.overwriteJobOutput(job.Job.Output))
Index: core/plugins/interfaces/Job.cs
===================================================================
--- core/plugins/interfaces/Job.cs (revision 341)
+++ core/plugins/interfaces/Job.cs (working copy)
@@ -113,11 +113,17 @@
#endregion

#region queue display details
+ /// <summary>
+ /// Codec used
+ /// </summary>
public abstract string CodecString
{
get;
}

+ /// <summary>
+ /// New meaning: Encoding mode means job type: video/audio/mux/index/split/etc
+ /// </summary>
public abstract string EncodingMode
{
get;

(that wasn't a proper patch, but it should be at least readable and give you an idea of what I've done)

For the second, I did this:
Index: core/gui/JobWorkerWindow.cs
===================================================================
--- core/gui/JobWorkerWindow.cs (revision 341)
+++ core/gui/JobWorkerWindow.cs (working copy)
@@ -446,10 +420,8 @@
currentJob = null;

// Logging
log.LogEvent("Job completed");
+ log.Collapse();

// Postprocessing
bool jobCompletedSuccessfully = (job.Status == JobStatus.DONE);
@@ -556,6 +525,11 @@
{
try
{
log = mainForm.Log.Info("Log for " + job.Name);
log.LogEvent("Started handling job");
+ log.Expand();

status = JobWorkerStatus.Running;
//Check to see if output file already exists before encoding.
if (File.Exists(job.Job.Output) && !mainForm.DialogManager.overwriteJobOutput(job.Job.Output))
Index: core/gui/LogTree.cs
===================================================================
--- core/gui/LogTree.cs (revision 0)
+++ core/gui/LogTree.cs (revision 0)
@@ -0,0 +1,136 @@
log.TypeChanged += delegate(object sender, EventArgs<ImageType> args)
{
Util.ThreadSafeRun(treeView, delegate { node.SelectedImageIndex = node.ImageIndex = (int)args.Data; });
};
+ log.Expanded += delegate(object sender, EventArgs e)
+ {
+ Util.ThreadSafeRun(treeView, delegate { node.Expand(); });
+ };
+ log.Collapsed += delegate(object sender, EventArgs e)
+ {
+ Util.ThreadSafeRun(treeView, delegate { node.Collapse(); });
+ };

return node;
}
Index: core/util/LogItem.cs
===================================================================
--- core/util/LogItem.cs (revision 0)
+++ core/util/LogItem.cs (revision 0)
@@ -0,0 +1,338 @@
public class LogItem
{
public event EventHandler<EventArgs<LogItem>> SubItemAdded;
public event EventHandler<EventArgs<ImageType>> TypeChanged;
+ public event EventHandler Expanded;
+ public event EventHandler Collapsed;
+
+ public void Expand()
+ {
+ if (Expanded != null)
+ Expanded(this, new EventArgs());
+ }
+
+ public void Collapse()
+ {
+ if (Collapsed != null)
+ Collapsed(this, new EventArgs());
+ }

public string Text
{


For a complete patch for testing (I haven't split it into little files this time) see http://megui.org/berrinam_patches/newlog2/. The old patch is newlog2.patch; the new patch is newlog4.patch. You can see the changes I've made by diffing the two, although it is essentially what I posted here.

@kurtnoise: I haven't done the input information, because I'm not entirely sure what you want. I'm sure you can add the information once this patch is in the SVN. In fact, we may generally want to add more information to the log in a number of places.

Sharktooth
14th November 2007, 16:16
Yes. You said you had a script to do this, so would you be able to do that please?Sure ill do that tonight.

Sharktooth
15th November 2007, 17:26
The stable folder of the auto-update server has been... ehrr... updated :)

Sharktooth
15th November 2007, 17:30
@berrinam: if you have some time please update the mediainfo lib to the newer version. it should fix the vista issues.

Kurtnoise
16th November 2007, 15:40
A patch (http://kurtnoise.free.fr/index.php?dir=MeGUI/&file=TimeElapsed-Remaining_days_format.patch) for the days Format concerning Time Elapsed/Remaining (#1832257 (http://sourceforge.net/tracker/index.php?func=detail&aid=1832257&group_id=156112&atid=798476)).



btw, what is the current status concerning the unused code ? Should we drop it or keep it ?

For my point of view: the trunk must be clean up. So, the unused code should be removed.

berrinam
17th November 2007, 03:51
I think removing unused code should be fine. If we need it again, it's always in the svn history.

Also, I've been thinking that putting the avisynth plugins by default in Avisynth's plugins folder is not a good choice. It interferes with other plugins and there's no easy way to remove that part of the megui installation. Perhaps we should put the avs plugins in a megui folder and add loadplugin calls to the generated avs scripts. There would be two things that alleviate the annoyance of this:
All of the avs filters MeGUI is aware of can be annotated with the plugin that contains them, so MeGUI can automatically add the required loaddll calls.
If the user wants to write their own scripts, we can add an .avsi file in the MeGUI plugins directory (NOT autoloaded) which calls loadplugin for all of the plugins in that directory. This means the user need only load that avsi file to have access to all of MeGUI's plugins, instead of loading each plugin separately.

In fact, this avsi file could even be put in the avs plugins directory, so that the plugins are autoloaded anyway, but without cluttering the avisynth plugins directory

In addition to the advantage of ease of uninstalling, this can solve plugin versioning problems, for instance with DGDecode and MVTools. For instance, this would allow MeGUI to support two different Didee scripts which might require different versions of MVTools, since the different copies could be put in different subdirectories of the MeGUI plugin directory.

Taurus
17th November 2007, 07:44
Also, I've been thinking that putting the avisynth plugins by default in Avisynth's plugins folder is not a good choice.It interferes with other plugins and there's no easy way to remove that part of the megui installation. Perhaps we should put the avs plugins in a megui folder and add loadplugin calls to the generated avs scripts.

Bravo!
My opinion: The best idea since inventing the wheel ;).

kumi
17th November 2007, 08:34
I think it's a great idea too. I like to keep my plugins folder clean, but MeGUI always clutters it up :)

St Devious
17th November 2007, 11:21
could megui have a copy stream option where u dont encode the vidoe or audio streams ? like in avidemux . u just process the video using avisynth and copy the video or split the video only without encoding .

Kurtnoise
17th November 2007, 12:13
could megui have a copy stream option where u dont encode the vidoe or audio streams ? like in avidemux . u just process the video using avisynth and copy the video or split the video only without encoding .
:sly::sly::sly:



@devs: what's wrong with the x264 command line updating ? Just one example: choose, say, the Mode 2pass - 2nd pass then go to the Advanced tab, select the BFrame Mode to Spatial (command line preview is updated). Now, go to RC and ME tab, select RDO L2 as Subpel Ref and you'll see that command line preview is not updated...:confused:

St Devious
17th November 2007, 12:21
:sly::sly::sly:





wat does this mean , yes or no to the idea ??

Kurtnoise
17th November 2007, 12:23
rtfm...

berrinam
17th November 2007, 14:14
could megui have a copy stream option where u dont encode the vidoe or audio streams ? like in avidemux . u just process the video using avisynth and copy the video or split the video only without encoding .

Avisynth won't work, because it doesn't transmit the uncompressed video. Any video that goes via Avisynth will have to be recompressed. However, there are ways in MeGUI to use and cut audio without recompressing.

berrinam
17th November 2007, 14:25
@devs: what's wrong with the x264 command line updating ? Just one example: choose, say, the Mode 2pass - 2nd pass then go to the Advanced tab, select the BFrame Mode to Spatial (command line preview is updated). Now, go to RC and ME tab, select RDO L2 as Subpel Ref and you'll see that command line preview is not updated...:confused:

Can't reproduce. Are you sure it didn't update?

berrinam
17th November 2007, 14:28
@kurtnoise: go ahead and commit your estimated-time patch; it looks fine.

Shall I commit the newlog patch?

St Devious
17th November 2007, 14:32
Avisynth won't work, because it doesn't transmit the uncompressed video. Any video that goes via Avisynth will have to be recompressed. However, there are ways in MeGUI to use and cut audio without recompressing.

thx for explaining that .

Kurtnoise
17th November 2007, 14:34
Can't reproduce. Are you sure it didn't update?
mmh...did you use your own profile/config or one of the Sharktooth ?

edit: weird...it works fine now.


Shall I commit the newlog patch?
sure...go ahead.

Underground78
17th November 2007, 16:36
Also, I've been thinking that putting the avisynth plugins by default in Avisynth's plugins folder is not a good choice. It interferes with other plugins and there's no easy way to remove that part of the megui installation. Perhaps we should put the avs plugins in a megui folder and add loadplugin calls to the generated avs scripts.

I think it's a very good idea ! :)

bluebebe
17th November 2007, 17:52
Megui dont work properly, please read this:

http://forum.doom9.org/showpost.php?p=1063503&postcount=47

and this:

http://forum.doom9.org/showpost.php?p=1065686&postcount=49

what can we do to get a working version? after complete reinstalls, always the same errors like Kumi describe.

Kurtnoise
17th November 2007, 20:55
god damn it...I'm really tired to read bugreports in this thread or anything else which doesn't belong to the development. Is it too hard for you or what ?

Anyway, have a look at this (http://forum.doom9.org/showthread.php?p=1066016#post1066016).


@devs: why not open a mailing-list on SF for the development discussion ?

berrinam
18th November 2007, 05:09
Please report bugs on the megui SourceForge bug tracker, not here, as this thread is dedicated to megui development. There is a link to the tracker in my signature.

You may also be able to get older versions of megui from the SourceForge project page.

berrinam
18th November 2007, 05:11
@devs: why not open a mailing-list on SF for the development discussion ?
I don't know. What are the advantages/disadvantages?

berrinam
18th November 2007, 05:50
I'm looking for comments on some changes I've made to the megui avisynth creator. What I've done is to integrate denoisers and resizers into MeGUI's profile system, which gives two significant advantages:
Users can create their own denoiser/resizer filters and they work as well as builtin denoise/resize filters used to work (there are no longer builtin denoise/resize filters in this modification)
It turns out that this neatly handles the distribution of plugin dlls, as they are just considered "required files" by the megui profile system (like CQM files), so megui automatically handles distribution of them with File->Import/Export profiles. This means that we can simply make a package of resizers/denoisers available on the autoupdate server, and autoupdate will save the plugin dlls into megui's 'extra' directory instead of the avs plugins directory.

The changes here are by no means complete. The main problem is that they only apply to resizers and denoisers, whereas I would like to do the same for other filters like flipvertical, colormatrix, and (most importantly) deinterlacing. I am having difficulties in creating a good solution for this, since there are some things that megui needs to remain aware of:
order of filters is important, eg resize must go after deinterlacing, etc
For some filter types, it makes sense to have multiple filters of the type (for instance, "input filters" such as flipvertical, colormatrix); for others, it doesn't (eg resizers, deinterlacers)

Also, it must remain simple for the novice user.

You can get the binary of this modification from http://megui.org/berrinam_patches/avscreator/megui-avisynth.zip.

berrinam
18th November 2007, 07:36
@devs: to avoid #1822000 and for coherency, we should populate the profiles dropdowns (audio and video) with only the profiles belonging to the selected codecs.

I've been thinking about how we manage profiles, because there are some annoying points, in particular in relation to handling video and audio profiles, which have different config dialogs for different codecs, as you say. Currently, we handle these different types with SettingsProviders, which are generally a hassle to create, and have the somewhat out-of-place feature that they keep track of the current video/audio settings, in place to allow the creation and editing of settings without creating a profile for those settings.

This last feature that MeGUI supports is very annoying to code with, as it requires the odd behaviour of SettingsProvider. In my resizer/denoiser megui modification posted above, I replaced this feature with the special name, "*scratchpad*". The rules for profiles change slightly:
For all types of profile, there must be at least 1 profile. If it does not exist, MeGUI will create one with the default settings by the name "*scratchpad*".
Unlike other profiles, the *scratchpad* profile will be automatically updated when closing the config box, without the user being asked
There must always be a profile selected. In the places in MeGUI which caused no profile to be selected, the *scratchpad* profile is now selected
I found these rules easier to code with, since we now have the guarantee that a profile is always selected. For audio and video, this means that the SettingsProvider no longer needs the GetCurrentSettings() and SetCurrentSettings() methods.

Do you think these changes are annoying to the user, or can we keep them because they are helpful for the developers?

I am reluctant to do exactly as you suggest, however, because it might mean you forget you have, say, a Snow profile. It was initially a tempting thought, because it is much simpler to handle a combobox with settings of only one type than one with multiple types of settings. When I think about it, there probably wouldn't be much to lose anyway, since the choice of codec generally comes before the choice of profile. However, I think I have a way to simplify the combobox handling, so I think the decision is ultimately one about UI rather than coding ease.

I will make some code changes to profile handling, and post a patch and see what you think.

berrinam
18th November 2007, 07:43
@berrinam: if you have some time please update the mediainfo lib to the newer version. it should fix the vista issues.I'll do this soon. The problem is that my main computer doesn't run vista, so it'll take some time.

Kurtnoise
18th November 2007, 09:29
I don't know. What are the advantages/disadvantages?
well...mailing-lists on SF are quite robust against the spams (or if you don't like SF mailings, there are also gmane.org). Moreover, searchs/discussions by subjects/threads are more easier than there in this topic. Anyway, you can look at this (http://www.philb.com/mail.htm) for the pros/cons.


About the new avisynth creator: first of all, it sounds good. :) But it's definitively not for the newbies. To improve it in this way, we can try to include auto-completion (http://msdn2.microsoft.com/en-us/library/system.windows.forms.autocompletesource.aspx) stuff.

About the profiles management: I need to play with it more extensively and check the code might be great too. :p


btw, I can do myself the MediaInfo lib compilation...I'm running on Vista most of the time at home. but the problem remains unfortunately. It's due to our wrapper.

Kurtnoise
18th November 2007, 12:01
We should add the date also in the log...some people complaining with long encodes.

Index: core/util/LogItem.cs
===================================================================
--- core/util/LogItem.cs (revision 374)
+++ core/util/LogItem.cs (working copy)
@@ -99,7 +99,7 @@

public LogItem LogEvent(string eventName, ImageType image)
{
- return Add(new LogItem(string.Format("[{0:T}] {1}", DateTime.Now, eventName), image));
+ return Add(new LogItem(string.Format("[{0:G}] {1}", DateTime.Now, eventName), image));
}

public LogItem Info(string text)

berrinam
18th November 2007, 12:04
About the new avisynth creator: first of all, it sounds good. :) But it's definitively not for the newbies.Well, the trick is to get it to a level where we distribute profiles that make it easier for newbies. But it is still a hard thing to do.

To improve it in this way, we can try to include auto-completion (http://msdn2.microsoft.com/en-us/library/system.windows.forms.autocompletesource.aspx) stuff.Interesting... I never knew about that.

btw, I can do myself the MediaInfo lib compilation...I'm running on Vista most of the time at home. but the problem remains unfortunately.
If you can get it to work, that would be great. Otherwise, I can look at it in a few days.

berrinam
18th November 2007, 12:39
We should add the date also in the log...some people complaining with long encodes.

Index: core/util/LogItem.cs
===================================================================
--- core/util/LogItem.cs (revision 374)
+++ core/util/LogItem.cs (working copy)
@@ -99,7 +99,7 @@

public LogItem LogEvent(string eventName, ImageType image)
{
- return Add(new LogItem(string.Format("[{0:T}] {1}", DateTime.Now, eventName), image));
+ return Add(new LogItem(string.Format("[{0:G}] {1}", DateTime.Now, eventName), image));
}

public LogItem Info(string text)


That's fine.

berrinam
19th November 2007, 04:56
This patch makes the custom filesizes, ARs, and FPSs persistent in the dropdown comboboxes: http://megui.org/berrinam_patches/dropdown_persistence.patch. This addresses #1822492.

berrinam
19th November 2007, 05:28
Dragdrop support in the bitrate calculator (#1819618): http://megui.org/berrinam_patches/dragdrop_bitratecalculator.patch.

berrinam
19th November 2007, 06:17
Remember columns positions for the job queue (#1817092): http://megui.org/berrinam_patches/save_column_positions.patch

berrinam
19th November 2007, 07:05
Local time estimation, instead of based on entire encode. I tested this with audio and it seems more stable there; I haven't found much difference otherwise. Addresses #1832899:

Index: core/details/StatusUpdate.cs
===================================================================
--- core/details/StatusUpdate.cs (revision 378)
+++ core/details/StatusUpdate.cs (working copy)
@@ -56,6 +56,12 @@
timeElapsed = TimeSpan.Zero;
processingspeed = null;
filesize = null;
+
+ for (int i = 0; i < UpdatesPerEstimate; ++i)
+ {
+ previousUpdates[i] = TimeSpan.Zero;
+ previousUpdatesProgress[i] = 0M;
+ }
}

/// <summary>
@@ -302,11 +308,28 @@

// Processing time
if (fraction.HasValue)
- estimatedTime = new TimeSpan((long)((decimal)timeElapsed.Ticks * ((1 / fraction.Value) - 1)));
+ {
+ TimeSpan time = timeElapsed - previousUpdates[updateIndex];
+ decimal progress = fraction.Value - previousUpdatesProgress[updateIndex];
+ if (progress > 0 && time > FiveSeconds)
+ estimatedTime = new TimeSpan((long)((decimal)time.Ticks * (1M - fraction) / progress));
+ else
+ estimatedTime = new TimeSpan((long)((decimal)timeElapsed.Ticks * ((1 / fraction.Value) - 1)));
+
+ previousUpdates[updateIndex] = timeElapsed;
+ previousUpdatesProgress[updateIndex] = fraction.Value;
+ updateIndex = (updateIndex+1)% UpdatesPerEstimate;
+ }
}
catch (Exception)
{
}
}
+
+ static readonly TimeSpan FiveSeconds = new TimeSpan(0, 0, 5);
+ const int UpdatesPerEstimate = 10;
+ TimeSpan[] previousUpdates = new TimeSpan[UpdatesPerEstimate];
+ decimal[] previousUpdatesProgress = new decimal[UpdatesPerEstimate];
+ int updateIndex = 0;
}
}

Kurtnoise
19th November 2007, 11:32
This patch makes the custom filesizes, ARs, and FPSs persistent in the dropdown comboboxes: http://megui.org/berrinam_patches/dropdown_persistence.patch. This addresses #1822492.

Dragdrop support in the bitrate calculator (#1819618): http://megui.org/berrinam_patches/dr...lculator.patch.

Remember columns positions for the job queue (#1817092): http://megui.org/berrinam_patches/sa...ositions.patch
all looks ok but not tested yet.


jfyi, one of the Aften developper is going to create a C# binding. That might be great...

berrinam
19th November 2007, 12:06
Don't we already support Aften in commandline form?

I'm not sure of the advantages of direct interface, since commandline already works well...

Kurtnoise
19th November 2007, 13:45
yeah, command line works flawlessly...it was just for information. :)

Kurtnoise
19th November 2007, 16:49
ok...last patches tested. That works fine. :)

I will make some code changes to profile handling
That reminds me something...Adding an output file format checking with the handle could be great too. Ex: an user select a video device profile (Ipod), File Format should be only MP4 and not MKV/RAW.

bob0r
19th November 2007, 19:13
Please remove the pause from compile-all.bat, it prevents my scripts from running automated.

Kurtnoise
19th November 2007, 20:52
why not create your own batch file ?

I believe that the pause is there for a good reason...

check
19th November 2007, 22:53
with regards to alternative development communication methods, I am happy to setup a dedicated megui forum on the mewiki box if you would like. The other advantage of that would be it would allow people with problems to have each their own thread, which makes tracking them easier. On the other hand, it moves megui away from doom9, which could be a bad thing..

bob0r
20th November 2007, 01:51
why not create your own batch file ?

I believe that the pause is there for a good reason...

Could you explain that reason please?

berrinam
20th November 2007, 02:42
Could you explain that reason please?

The only reason I know is that the pause after compiling megui allows you to see if there were any errors in compilation. However, I think this is a relatively unimportant reason since most people develop megui with an IDE.

I would be happy to remove the pauses, if the other devs don't object.

Sharktooth
20th November 2007, 10:20
it's ok for me. however if you want the csc output, it can be added to a compile.log file using the good old stdout redirection...

Sharktooth
20th November 2007, 10:31
@devs: what about replacing mediainfowrapper with an older version that "seems to work" with Vista?

bob0r
20th November 2007, 21:52
@berrinam
Ok, thats why you can run it from start>run>cmd
Please remove the pause. Thanks.

Kurtnoise
21st November 2007, 08:35
I would be happy to remove the pauses, if the other devs don't object.
ok for me too...

Kurtnoise
21st November 2007, 08:44
what about replacing mediainfowrapper with an older version that "seems to work" with Vista?
honestly, the problem remains even with the old one...I mean that you're are able to have the preview but when you restart MeGUI randomly, that raises an error.

I tried also the C# how-to use MediaInfo included into MediaInfoLib trunk and traced the functions. Seems that the problem is after the Opening...


iirc, it's due to an issue with the openFileDialog according to this post (http://forum.doom9.org/showthread.php?p=1062833#post1062833). So, how to code a new openFileDialog, berrinam ?

berrinam
21st November 2007, 09:35
According to winnydows, just run the openFileDialog in an external application (invoked by commandline). I've written a quick patch which changes some of the dialogs to use this approach; get that patch here (http://megui.org/berrinam_patches/openfiledialog/). It works by running a program called "openfiledialog.exe" in the same folder as megui.exe. The sourcecode for this executable is given below.

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace OpenFileDialog
{
class Program
{
static void Main(string[] r)
{
System.Windows.Forms.OpenFileDialog d = new System.Windows.Forms.OpenFileDialog();
d.InitialDirectory = r[0];
d.Title = r[1];
d.DefaultExt = r[2];
d.FileName = r[3];
d.Filter = r[4];
MessageBox.Show("Special ofd");
DialogResult dr = d.ShowDialog();
string[] s = new string[6];
Console.WriteLine("{0}\n{1}\n{2}\n{3}\n{4}\n{5}\n", d.InitialDirectory, d.Title, d.DefaultExt, d.FileName, d.Filter, (dr == DialogResult.OK ? "OK" : "Cancel"));

}
}
}

This program gives you a message before opening the dialog, so that you know it is being used. If it isn't being used somewhere it should be used, the solution is simple: just rename any instances of OpenFileDialog to CmdOpenFileDialog, and it should all work out fine.

Hope that helps. If it works, we can make it more reliable.

berrinam
21st November 2007, 09:46
with regards to alternative development communication methods, I am happy to setup a dedicated megui forum on the mewiki box if you would like. The other advantage of that would be it would allow people with problems to have each their own thread, which makes tracking them easier. On the other hand, it moves megui away from doom9, which could be a bad thing..
I'm not too fussed either way. The important thing for me is just that people post their bug reports and feature requests on the SF tracker.

berrinam
21st November 2007, 09:47
Please remove the pause. Thanks.

Done.

Kurtnoise
21st November 2007, 10:44
Hope that helps. If it works, we can make it more reliable.
For the moment, that works fine...mainly tested with the old and the new MediaInfo and the old and fresh MediaInfoWrapper compile.

Anyway, it's very strange this behaviour...maybe it's that (http://www.tmssoftware.com/atbdev6.htm) (old/new form) ? or a bug with the Framework...dunno frankly and I don't want to install the 3.5 right now to check this out.

Sharktooth
21st November 2007, 11:30
stable:
0.2.6.1039
- (berrinam) Increase sensitivity of DAR. (fixes #1832218)
- (Kurtnoise) [x264] checked = false for Turbo with manual multipasses modes & cosmetics.
- (Kurtnoise) [ProgressWindow] New format for Time Elapsed/Remaining.
- (Kurtnoise) [BitrateCalculator] DTSBlockSize != AC3BlockSize

Dev:
0.3.0.0001
- (berrinam) Sliding window time estimation instead of based on entire code. (#1832899)
- (berrinam) Add extra files for dragdrop and dropdown persistence
- (berrinam) Remember columns position for the job queue (#1817092)
- (berrinam) Dragdrop support in the bitrate calculator (#1819618)
- (berrinam) The custom filesizes, ARs, and FPSs in the dropdown comboboxes are now persistent. (#1822492)
- (berrinam) Make mux window output file editable.
- (berrinam) Change tools windows from modal dialogs to standalone windows. (#1822493)
- (Kurtnoise) [LogItem] added the Date.
- (berrinam) Commit the newlog patch. Changes:
- new, hierarchical log
- moved delete intermediate files stuff to cleanupjob
- Log and Error removed from StatusUpdate -> use log.LogValue("Encoder log", encodeLog), and log.Error(...) instead
- added a non-null check to Util.ThreadSafeRun
- (Kurtnoise) ASS & SSA support for the MKV muxer.
- (Kurtnoise) [MeGUISettings] removed divxMuxerPath.
- (Kurtnoise) [OneClick] sorted = true for Audio codecs.
- (Kurtnoise) Added more bitrate values for AC3 encoders.
- (Kurtnoise) Aften support as AC-3 encoder (FR #1663719)
- (Kurtnoise) Delays on audio output filenames now have meaning and are checked for correctness (implements #1819281)
- (Kurtnoise) Changed the default bitrate for FFAC3 (256 to 384 kbps).
- (Kurtnoise) Audio codecs List refactoring.

berrinam
21st November 2007, 12:43
Nice long changelog. Looks good. :)

Kurtnoise
21st November 2007, 13:50
*Note for the end users* : all bugfixes included in the stable release are also included in the dev build...:)

Sharktooth
21st November 2007, 13:53
well... that was somewhat implied...

Kurtnoise
21st November 2007, 18:21
:p


I've written a quick patch which changes some of the dialogs to use this approach; get that patch here (http://megui.org/berrinam_patches/openfiledialog/).
Here is (http://kurtnoise.free.fr/index.php?dir=MeGUI/&file=openfiledialog_r401.patch) an update against the last rev including pstart.CreateNoWindow = true;

wiak
22nd November 2007, 01:01
---------------------------
Fatal error
---------------------------
MeGUI encountered a fatal error and may not be able to proceed. Reason: Kan ikke laste inn filen eller samlingen ICSharpCode.SharpZipLib, Version=0.85.4.369, Culture=neutral, PublicKeyToken=1b03e6acf1164f73 eller en av avhengighetene. Manifestdefinisjon til samlingen som ble funnet, samsvarer ikke med samlingsreferansen. (Unntak fra HRESULT: 0x80131040) Source of exception: megui stacktrace: ved MeGUI.UpdateWindow.SaveNewFile(iUpgradeable file, Stream data)

ved MeGUI.UpdateWindow.InstallFiles(SortedDictionary`2 groups)

ved MeGUI.UpdateWindow.BeginUpdate()

ved System.Threading.ThreadHelper.ThreadStart_Context(Object state)

ved System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

ved System.Threading.ThreadHelper.ThreadStart()
---------------------------
OK
---------------------------

Kurtnoise
22nd November 2007, 09:11
wrong thread + having an error message without a short description of what you do is useless.

Kurtnoise
22nd November 2007, 09:22
Some news...

For the moment, that works fine...mainly tested with the old and the new MediaInfo and the old and fresh MediaInfoWrapper compile.

Anyway, it's very strange this behaviour...maybe it's that (http://www.tmssoftware.com/atbdev6.htm) (old/new form) ? or a bug with the Framework...dunno frankly and I don't want to install the 3.5 right now to check this out.
Finally, I jumped to the Orcas testing (seems very good btw) and my assumption about Framework issue seems to be correct.

Now, having the Framework 3.5 installed and running on Vista, openFileDialog issues seem to be gone (w/ MediaInfo library and his wrapper 0.7.5.5). :) but I need to test this more extensively.

Extra Notes:
With the openfiledialog command line tweak, MeGUI hangs with the last framework. Dunno why...
One of the good trick with Orcas (MSVC9) is that we can specify the target Framework (either 2.0, or 3.0 or 3.5) during the compilation. Keep in mind also that 3.0 or higher is *not* compatible with win2k or lower.
Now, I got the beautiful new Forms as described here (http://www.tmssoftware.com/atbdev6.htm)...That's great. :p
MSVC 2008 Express Edition is free...so it's worth to try it.

berrinam
22nd November 2007, 13:10
MSVC 2008 Express Edition is free...so it's worth to try it.Does it come with C# 3.0 or is that not out yet? I'm very much looking forward to the type inference in C# -- it'll help a lot with the generics code in MeGUI.

Eamon21
22nd November 2007, 14:16
I've just about finished the first version of my transcode tool, it works for what I need to do, just adding extra error checking etc. for when someone inevitably tries to do something I hadn't intended with it.

There are a few things I have come across in doing it that I would like to bring up however as suggestions for improvement.

Firstly, the video encoding job always takes as input an *.avs file even if that file is only a temporary file. the AviSynthScriptEnvironment is just as capable of handling a script passed as a string rather than by a file and to me it would make more sense this way for scripts of a transient nature. I currently create a temporary script based on a template for transcoding and then delete the file afterwards.

Secondly, with the avssettings, while they contain bools to indicate if resizing, colourcorrection etc are required, there is not enough info to apply them. Take for example resize, there is a bool to indicate it should be done and also the filter that should be used but you can't specify the size.

I understand that the AVSprofile was probably only ever intended to be used from the AVISynth Script Creator tool which does provide these extra settings, but in my opinion they should be in the profile, and possibly overridden if needed.

Eamon

Kurtnoise
22nd November 2007, 14:36
@Eamon: I'm looking forward to test it...:) Keep up the good work.


Does it come with C# 3.0 or is that not out yet? I'm very much looking forward to the type inference in C# -- it'll help a lot with the generics code in MeGUI.
Framework 3.5 is out, yes. If you download the complete iso DVD, I'm pretty sure that it's included with it. Otherwise, you have to install it before MSVC9...

Sharktooth
22nd November 2007, 14:41
got the dvd iso and the framework. thanks.
if the new .net framework ensures a better megui "compatibility" with Vista, we should move to it since the only big problems we have are with Vista...

Eamon21
22nd November 2007, 15:54
Don't forget though that the minimum requirements for .NET 3.0 is Windows XP SP2, moving to .NET 3 would kill off support for win2k and earlier. Might be worth it though as according to http://marketshare.hitslink.com/report.aspx?qprid=2 there are only a small precentage running anything windows based older than XP, and more vista users than win2k and earlier anyway.

Eamon

Doom9
22nd November 2007, 15:57
The Express Tools ISO you can download includes everything.. the 4 different express editions and of course the framework 3.5 - which in turn brings C# 3.0. I'm about to upgrade my work machines..

Eamon21
22nd November 2007, 16:18
patch to fix bug 1836041 submitted.

...and one for 1832675

Eamon

Kurtnoise
22nd November 2007, 17:55
both applied...thanks.

berrinam
22nd November 2007, 23:59
I've just about finished the first version of my transcode tool, it works for what I need to doGreat! I look forward to seeing it.

just adding extra error checking etc. for when someone inevitably tries to do something I hadn't intended with it.

There are a few things I have come across in doing it that I would like to bring up however as suggestions for improvement.

Firstly, the video encoding job always takes as input an *.avs file even if that file is only a temporary file. the AviSynthScriptEnvironment is just as capable of handling a script passed as a string rather than by a file and to me it would make more sense this way for scripts of a transient nature. I currently create a temporary script based on a template for transcoding and then delete the file afterwards.The problem is that the commandline encoders take an input filename, not an input script, so there is no way to pass in a temporary script to most of them. Most of the command line encoders don't have direct access to the AviSynth environment in the way megui does, but they often just access it via the AVIFile interface, which doesn't allow file-less scripts. So I'm afraid your current solution is the best.

Secondly, with the avssettings, while they contain bools to indicate if resizing, colourcorrection etc are required, there is not enough info to apply them. Take for example resize, there is a bool to indicate it should be done and also the filter that should be used but you can't specify the size.It really depends on where the settings are used. For the avs creator, the settings are appropriate. However, the OneClick encoder adds a setting for the resolution. I'm not sure of the neatest way to handle all of this, but different tools certainly need different settings. I'm not yet convinced that the output resolution should be a setting in the avssettings.

berrinam
23rd November 2007, 00:14
Wheee, C# 3.0 is fun.

This 2.0 code:
info.VideoOutputChanged += new StringChanged(delegate(object _, string val)
{
videoOutput.Filename = val;
});

turns into

info.VideoOutputChanged += (_, val) => videoOutput.Filename = val;

See what else there is (http://en.wikipedia.org/wiki/C_Sharp#C.23_3.0_new_language_features). Some of the highlights are type inference ('var'), automatic properties, and extension methods.

Eamon21
23rd November 2007, 11:51
The problem is that the commandline encoders take an input filename, not an input script, so there is no way to pass in a temporary script to most of them. Most of the command line encoders don't have direct access to the AviSynth environment in the way megui does, but they often just access it via the AVIFile interface, which doesn't allow file-less scripts. So I'm afraid your current solution is the best.
OK, makes sense in that respect. I guess I was getting that idea from the AviSynthAudioEncoder class which creates an AVS script to encode the audio, but never actually has to write the script to file.

It really depends on where the settings are used. For the avs creator, the settings are appropriate. However, the OneClick encoder adds a setting for the resolution. I'm not sure of the neatest way to handle all of this, but different tools certainly need different settings. I'm not yet convinced that the output resolution should be a setting in the avssettings.For me it depends on where the settings are used, if they will actually go into the AVS script (resize resolution will) then they belong in the AVSSettings. Ideally i am looking for a way to define an AVS profile such that all i need to pass is an input file and create a complete script. I am doing that at the moment for the transcode, however I have simply commented out the resize, crop and de-interlace lines. I know it is technially possible to achieve all of this in the actual template by doing something like:
<input>
LanczosResize(640,480)

but I think it would be nicer and easier as part of the actual profile.

Eamon

Eamon21
23rd November 2007, 12:00
Wheee, C# 3.0 is fun.

This 2.0 code:
info.VideoOutputChanged += new StringChanged(delegate(object _, string val)
{
videoOutput.Filename = val;
});

turns into

info.VideoOutputChanged += (_, val) => videoOutput.Filename = val;

See what else there is (http://en.wikipedia.org/wiki/C_Sharp#C.23_3.0_new_language_features). Some of the highlights are type inference ('var'), automatic properties, and extension methods.

I'm usually one for moving to newer version of languages and the changes that 1.1 -> 2.0 brought were awesome but there is a danger that "new" features will be used and abused just because they are there.

Automatic properties are nice enough, I'm partial to the code-snip "prop" in the current version (ctrl+k, ctrl-x, prop).

The one I worry the most about in 3.0 is the anonymous types keyword "var". Yes it is useful and indeed needed to implement a few new features of 3.0, but it brings with it the risk of abuse. If you know the type, specify the type. Anonymous types can potentially make code much less readable.

Also, many of the situations that people might be inclined to use "var"s just "because they can", would be better solved using currently available methods such as generics, interfaces or base and abstract classes.

I brought this up as it brings me to a something that has sort of bothered me a bit in the MeGUI code and that is the (over)use of generics. It seems some parts of the code are so heavily loaded with generics that it gets hard to read and follow, especially first time into the code. Begrudgingly I would say this is fair enough if it was necessary but at times it appears they have been used as a catch-all "just in case we ever want to use something else here". Without examples, I'm sure there are several places in the code where a generic is used that is only ever of the one type.

I'm more for the philosophy of coding for what is required now, not for what may or may not be required later. In my experience later may actually never come and if it does, often there are enough changes that the code is completely re-factored anyway. </rant>

I guess it is probably a consequence of OSS, no one ever wants to do the boring bits of cleaning up the code and re-factoring. I've just found it a little difficult at times navigating through the code to find out how things get done.

Eamon

berrinam
23rd November 2007, 13:58
OK, makes sense in that respect. I guess I was getting that idea from the AviSynthAudioEncoder class which creates an AVS script to encode the audio, but never actually has to write the script to file.What you suggest could very well be done for audio. Just not for video. :)

For me it depends on where the settings are used, if they will actually go into the AVS script (resize resolution will) then they belong in the AVSSettings. Ideally i am looking for a way to define an AVS profile such that all i need to pass is an input file and create a complete script. I am doing that at the moment for the transcode, however I have simply commented out the resize, crop and de-interlace lines. I know it is technially possible to achieve all of this in the actual template by doing something like:
<input>
LanczosResize(640,480)

but I think it would be nicer and easier as part of the actual profile.I'd like to know what other people think. I don't have very strong opinions on this.

Automatic properties are nice enough, I'm partial to the code-snip "prop" in the current version (ctrl+k, ctrl-x, prop).Automatic properties are better than this code snippet since they don't leave the private variable lying around. That's only a small difference, though...

The one I worry the most about in 3.0 is the anonymous types keyword "var". Yes it is useful and indeed needed to implement a few new features of 3.0, but it brings with it the risk of abuse. If you know the type, specify the type. Anonymous types can potentially make code much less readable.Things like this are just stupid:
List<Named<GenericProfile<x264Settings>>> profs = new List<Named<GenericProfile<x264Settings>>>();
While this exact line probably doesn't appear in MeGUI, new()ing like that is a common pattern, and no readability is lost by typing the variable with 'var'. Granted, though, it can be inappropriate in some places.

Also, many of the situations that people might be inclined to use "var"s just "because they can", would be better solved using currently available methods such as generics, interfaces or base and abstract classes.

I brought this up as it brings me to a something that has sort of bothered me a bit in the MeGUI code and that is the (over)use of generics. It seems some parts of the code are so heavily loaded with generics that it gets hard to read and follow, especially first time into the code. Begrudgingly I would say this is fair enough if it was necessary but at times it appears they have been used as a catch-all "just in case we ever want to use something else here". Without examples, I'm sure there are several places in the code where a generic is used that is only ever of the one type.I can only assume you refer to the terrible mess of generics with ISettingsProvider, SettingsProviderImpl2, ProfileHandler, and generally associated with profiles. I agree this is a mess, and in fact I have a local working copy of MeGUI in which that code is all deleted, and we have great improvements. For example,
ISettingsProvider<AviSynthSettings, MeGUI.core.details.video.Empty, int, int> avsSettingsProvider = new SettingsProviderImpl2<
MeGUI.core.gui.AviSynthProfileConfigPanel, MeGUI.core.details.video.Empty, AviSynthSettings, AviSynthSettings, int, int>("AviSynth", 0, 0);
ProfilesControlHandler<AviSynthSettings, Empty> avsProfileHandler;
private void initAvsHandler()
{
// Init AVS handlers
avsProfileHandler = new ProfilesControlHandler<AviSynthSettings, Empty>(
"AviSynth", mainForm, profileControl1, avsSettingsProvider.EditSettings, Empty.Getter,
new SettingsGetter<AviSynthSettings>(avsSettingsProvider.GetCurrentSettings), new SettingsSetter<AviSynthSettings>(avsSettingsProvider.LoadSettings));
SingleConfigurerHandler<AviSynthSettings, Empty, int, int> configurerHandler = new SingleConfigurerHandler<AviSynthSettings, Empty, int, int>(avsProfileHandler, avsSettingsProvider);
}

has become
private void initAvsHandler()
{
avsProfile.Manager = mainForm.Profiles;
}


Other than that collective mess, though, I think the use of Generics in MeGUI is appropriate.

I'm more for the philosophy of coding for what is required now, not for what may or may not be required later. In my experience later may actually never come and if it does, often there are enough changes that the code is completely re-factored anyway. </rant>Well, the mess we had evolved gradually as video settings had more and more requirements. The refactor is coming very soon. :)

Eamon21
23rd November 2007, 15:29
Automatic properties are better than this code snippet since they don't leave the private variable lying around. That's only a small difference, though...
I guess it is more a case of familiarity but
public string mySetting{ get; set; }
is very similar to an abstract declaration of a property or interface definition.
abstract string mySetting{ get; set; }
string mySetting{ get; set; }
The compiler will pick up errors, but eyeballing the code I would currently think of that as an abstract property.
I don't have a problem with automatic properties, I like the idea, just will have to get used to seeing/using them once I move to 3.0, currently do all my work in 2.0 and doesn't look like that'll change anytime soon for the most part.


Things like this are just stupid:
List<Named<GenericProfile<x264Settings>>> profs = new List<Named<GenericProfile<x264Settings>>>();
While this exact line probably doesn't appear in MeGUI, new()ing like that is a common pattern, and no readability is lost by typing the variable with 'var'. Granted, though, it can be inappropriate in some places.
I assume you mean writing that as
var profs = new List<Named<GenericProfile<x264Settings>>>();Granted it is probably actually a bit nicer to look at, but that's more to do with the fact that the first way was just horrible. var will have it's place, I just dread it being thrown around and used everywhere. God forbid people start using it instead of thinking. I also hope people don't start using it with hungarian notation e.g. var strMyVar;

My concerns about var are general and in no way directed at devs of MeGUI, I'm sure everyone here has enough sense to avoid the pitfalls.


I can only assume you refer to the terrible mess of generics with ISettingsProvider, SettingsProviderImpl2, ProfileHandler, and generally associated with profiles. I agree this is a mess, and in fact I have a local working copy of MeGUI in which that code is all deleted, and we have great improvements. For example,
ISettingsProvider<AviSynthSettings, MeGUI.core.details.video.Empty, int, int> avsSettingsProvider = new SettingsProviderImpl2<
MeGUI.core.gui.AviSynthProfileConfigPanel, MeGUI.core.details.video.Empty, AviSynthSettings, AviSynthSettings, int, int>("AviSynth", 0, 0);
ProfilesControlHandler<AviSynthSettings, Empty> avsProfileHandler;
private void initAvsHandler()
{
// Init AVS handlers
avsProfileHandler = new ProfilesControlHandler<AviSynthSettings, Empty>(
"AviSynth", mainForm, profileControl1, avsSettingsProvider.EditSettings, Empty.Getter,
new SettingsGetter<AviSynthSettings>(avsSettingsProvider.GetCurrentSettings), new SettingsSetter<AviSynthSettings>(avsSettingsProvider.LoadSettings));
SingleConfigurerHandler<AviSynthSettings, Empty, int, int> configurerHandler = new SingleConfigurerHandler<AviSynthSettings, Empty, int, int>(avsProfileHandler, avsSettingsProvider);
}

has become
private void initAvsHandler()
{
avsProfile.Manager = mainForm.Profiles;
}


Other than that collective mess, though, I think the use of Generics in MeGUI is appropriate.

Well, the mess we had evolved gradually as video settings had more and more requirements. The refactor is coming very soon. :) :) You pretty much hit exactly the code I had in mind. Profiles can be powerful, but they were a headache to get my head around initially, very happy to hear about what you've done to improve this and eagerly look forward to seeing the results. (p.s. please tell me that the interface Gettable<TSettings> has been put permanently to sleep :) or at the very least been named IGettable)

Eamon

Gilgamesh83
24th November 2007, 01:43
Hiya!

I am normal user of megui and would like to put my thoughts on the new log in megui... i think the more detailed info of the old log was better specially after an x264 encode when I can see how the quantizers are distributed.

love megui and all the other work you guys do :)

berrinam
24th November 2007, 01:53
Any information missing from the new log is a bug. Please report the specifics on the SourceForge bug tracker. A link is in my signature.

berrinam
24th November 2007, 01:56
p.s. please tell me that the interface Gettable<TSettings> has been put permanently to sleep :) or at the very least been named IGettable

Why? It currently has been replaced by Editable<TSettings>, which is perhaps a more appropriate name since the settings can be both got and set, but otherwise, what's wrong with the interface?

berrinam
24th November 2007, 05:47
Would there be any objection if we switched MeGUI to C# 3.0? I think we can get all of the C# 3.0 features except extension methods while still producing .NET 2.0 binaries, so the users should see no difference in requirements.

Alternatively, if you think it worth it, we could switch to .NET 3.0 or 3.5, although that is a bigger change and perhaps requires more thought.

Kurtnoise
24th November 2007, 07:14
I am normal user of megui and would like to put my thoughts on the new log in megui... i think the more detailed info of the old log was better specially after an x264 encode when I can see how the quantizers are distributed.

AFAIK, the new MeGUI x264 profiles use --no-pnsr & --no-ssim switches. That's why we haven't anymore some details. So, it's clearly not a bug.

Sharktooth, could you confirm that ?

Kurtnoise
24th November 2007, 07:21
Would there be any objection if we switched MeGUI to C# 3.0? I think we can get all of the C# 3.0 features except extension methods while still producing .NET 2.0 binaries, so the users should see no difference in requirements.
It's ok for me, although that it'll require some time to switch all the code...

Alternatively, if you think it worth it, we could switch to .NET 3.0 or 3.5, although that is a bigger change and perhaps requires more thought.
I'd say that the .NET 3.5 is highly recommended for Vista users (to avoid issues mentioned above).

berrinam
24th November 2007, 07:53
My profiles patch: http://megui.org/berrinam_patches/profiles_refactor/profiles_refactor_1.patch.

The main change is new profile handling, including new internals and externals of profilemanager, and two new profile controls to replace ProfileControl, requiring much less initialisation code. They are currently named SimpleProfileControl and ConfigableProfileControl, with the latter deriving from the former, simply adding a config button. The names were chosen just to not collide with the previously existing ProfileControl, but since that is now gone, they are free to be changed. Also, there are at present no uses of SimpleProfileControl, and I don't know if we will want it in the future, so that may just be removed as well.

The other change is the removal of the zones configuration from video config panels. I did this because it required silly code in the constructor, and it doesn't really belong there, since zones are a per-file setting, not a per-profile setting. I plan to add them back to the VideoEncodingComponent directly, but haven't yet done so.

Profile serialization works pretty much the same as before, but is unfortunately slightly incompatible. Obviously, this incompatibility must be fixed so that people can load their old profiles.

Also, profile importing currently doesn't work either, because it relied on the old serialization engine. I obviously also plan to fix this.

Thoughts, anyone?

Is the introduction of the *scratchpad* profiles ok? This is the major change in user functionality from before.

berrinam
24th November 2007, 07:53
It's ok for me, although that it'll require some time to switch all the code... We can do this gradually, though.

Gilgamesh83
24th November 2007, 11:03
I'm sorry if people got mixed up with my earlier post. Not a bug it's just that I preferred the old text-based log with advanced statistics showing after a x264 and xvid encode.

Is there no way one can choose between the two.

Eamon21
24th November 2007, 12:13
Why? It currently has been replaced by Editable<TSettings>, which is perhaps a more appropriate name since the settings can be both got and set, but otherwise, what's wrong with the interface?I never liked it because of how it is used. It feels superfluous because it is only ever implemented on settings config usercontrols and as such to me it would make more sense to create a base generic config panel usercontrol that contained the settings property as defined in Gettable (Editable). A possible problem here is Visual Studio's support for generic usercontrols for design time, but this can be overcome by wrapping the control. would also mean that the contructor for Configuration window would change likepublic ConfigurationWindow(ProfileManager p, Control sPanel, Gettable<TProfileSettings> s, string initialProfile, string title)

to

public ConfigurationWindow(ProfileManager p, ConfigControl<TProfileSettings> sPanel, string initialProfile, string title)because currently sPanel and s are always the same object.

andpublic class EditorProvider<TPanel, TInfo, TSettings, TProfileSettings>
where TProfileSettings : GenericSettings
where TSettings : TProfileSettings, new()
where TPanel : System.Windows.Forms.Control, Gettable<TProfileSettings>

becomes

public class EditorProvider<TPanel, TInfo, TSettings, TProfileSettings>
where TProfileSettings : GenericSettings
where TSettings : TProfileSettings, new()
where TPanel : ConfigControl<TProfileSettings>
and for config panels like AudioConfigurationPanelpublic partial class AudioConfigurationPanel : UserControl, MeGUI.core.plugins.interfaces.Gettable<AudioCodecSettings>

to

public partial class AudioConfigurationPanel : ConfigControl<AudioCodecSettings>

If you don't agree, can we at lest stick with the convention of naming all interfaces with a capital "I"? i.e. IEditable.

Would there be any objection if we switched MeGUI to C# 3.0? I think we can get all of the C# 3.0 features except extension methods while still producing .NET 2.0 binaries, so the users should see no difference in requirements.

Alternatively, if you think it worth it, we could switch to .NET 3.0 or 3.5, although that is a bigger change and perhaps requires more thought.I'm reluctant for the moment simply because I have VS 2005 Pro installed and I have heard reports that VS2008 express does not play nice when installed side by side. Give it maybe a couple of weeks to see how things settle first?

Eamon

Eamon21
24th November 2007, 12:53
My profiles patch: http://megui.org/berrinam_patches/profiles_refactor/profiles_refactor_1.patch.

The main change is new profile handling, including new internals and externals of profilemanager, and two new profile controls to replace ProfileControl, requiring much less initialisation code.
...snip...
Thoughts, anyone?

Is the introduction of the *scratchpad* profiles ok? This is the major change in user functionality from before.I think some of your changes here make some of my ramblings above irrelevant. I like what I've seen so far. Any idea when this goes into the trunk? It will mean changes to the transcode tool so I'd rather make the changes now before submitting it if this patch is merging shortly.

The more I look through this the happier I get, there are so many little gripes I've silently had that have been addressed with this...Christmans has come early :)

Love your work berrinam. :thanks:

Eamon

berrinam
24th November 2007, 12:58
@Eamon: I think the patch I posted just a few posts above will satisfy you. Here's an extract from the new ProfileConfigurationWindow class:

public partial class ProfileConfigurationWindow<TSettings, TPanel> : Form
where TSettings : GenericSettings, new()
where TPanel : Control, Editable<TSettings>
{

...

public ProfileConfigurationWindow(TPanel t, string title)
{
The parameter is only passed once, but it has the dual generic constraints of Control and Editable<TSettings>.

When I wrote the previous code you quoted, I was aware that it always referred to the same object (and that's expected in the design) but there was no way to express the two inheritance constraints without generics (which were ruled out in that situation for some reason I can't remember). Your suggestion of making ConfigControl<TSettings> an abstract base class deriving from UserControl and defining the abstract property, Settings, is nice but unfortunately doesn't work, as the Visual Studio GUI designer won't allow a user control with an abstract base class to be designed.

As to the prefixing of interfaces with 'I', I'm not sure of the merits of this convention. The two things I see in it are that it allows both List and IList -- ie both an abstract and concrete specification of a class -- and that it makes it easy to recognise interfaces from other things. For me, the former point has merit but the latter does not, as Visual Studio's IntelliSense tells you that all already. I'm not too fussed, though.

berrinam
24th November 2007, 13:23
It seems to me that we've been getting more autoupdate bug reports since I added the update_cache. I personally find the update cache useful since I have very many copies of megui, so the update cache saves me downloads when autoupdating. However, most people are undoubtedly not in my situation, and will therefore probably not benefit the same way.

The update cache also adds severals potential problems, if stale downloads aren't replaced with new ones, and also perhaps if Vista is blocking MeGUI from accessing other folders it doesn't own (although I'm just guessing here).

Is the update cache useful, or should we remove it and hope for fewer autoupdate bugs as a result?

berrinam
24th November 2007, 14:08
I think some of your changes here make some of my ramblings above irrelevant. I like what I've seen so far. Any idea when this goes into the trunk? It will mean changes to the transcode tool so I'd rather make the changes now before submitting it if this patch is merging shortly.I'm not sure what you're saying. Would you prefer committing your patch before or after I commit mine?

Anyway, I would expect to commit mine before yours, simply because I'm a developer with SVN write access. :D If necessary, I can help with merging, though.

In any case, the best thing to do if your patch is (nearly) finished is to post it here so we can try it out and give you feedback.

The more I look through this the happier I get, there are so many little gripes I've silently had that have been addressed with this...Christmans has come early :)

Love your work berrinam. :thanks:Nice to hear. And in all honesty, please continue to complain about the code, so it continues to become better. :D

berrinam

Eamon21
24th November 2007, 14:47
I'm not sure what you're saying. Would you prefer committing your patch before or after I commit mine?

Anyway, I would expect to commit mine before yours, simply because I'm a developer with SVN write access. :D If necessary, I can help with merging, though.

In any case, the best thing to do if your patch is (nearly) finished is to post it here so we can try it out and give you feedback.

Nice to hear. And in all honesty, please continue to complain about the code, so it continues to become better. :D

berrinamI've applied your patch locally and working through all the changes i need to support the new profilemanger.

One problem I've come across which you might be able to help with is that I can't really see a way to get the settings from a profile if you only know the name, I'll explain.

I have a new profile type to support my transcode tool. The settings of which contain 3 other profiles, an AVS, an Audio and a Video profile. In my TranscodeSettings class I only keep the name (FQName) but it seems like I can't directly access the settings associated with these profiles without a ConfigableProfilesControl associated (unless I also keep the profile type and name and use GetProfile(string type, string name)).

What I'd like is another method in the ProfileManager like GetProfile(string type, string name), but without having to specify the type as I don't know this (e.g. could be x264Settings, could be xvidSettings). I could try to parse the FQName, but really that belongs to the ProfileManager so should be done there. Basically looking for another method:
public Profile GetProfile(string FQName)

found the a private function in ProfileManager that does what I need, I've made a public overload of GetProfile to support this, are you happy to add this to the ProfileManager?
public Profile GetProfile(string FQname)
{
return byFormattedName(FQname);
}

Eamon

Sharktooth
24th November 2007, 15:11
@berrinam: update_cache is indeed causing problems to some users. i thought to make it optional but as i previously said, i havent time to look at it for some time.

Eamon21
24th November 2007, 17:20
My profiles patch: http://megui.org/berrinam_patches/profiles_refactor/profiles_refactor_1.patch.
The change on lines 4839 & 4840 of your patch break the nero configuration panel (select the nero scratchpad and try to config and save a new one):

- protected override AudioCodecSettings CodecSettings
+ protected NeroAACSettings CodecSettings

because CodecSettings is accessed from the parent class AudioConfigurationPanel in the Settings property setter which will use it's own virtual method (which does nothing) because it is no longer overridden.

The CodecSettings property in AudioConfigurationPanel ideally would be marked as abstract but that is impossible because the VS IDE will not let you design abstract classes obviously, I suggest modifing the implementation so a problem like this is easier to spot in future like thisprotected virtual AudioCodecSettings CodecSettings
{
//going to throw a NotImplementedException because this should always be overridden as this
//base class contains no codec specific UI.
//Ideally this would be an abstract property but limitations of the Visual Studio IDE
//prevent you from designing abstract controls. Throwing this exception here should mean
//that the problem is picked up imediately.
//Changed to a Debug.Assert() for the moment, still deciding which is best.
get
{
//throw new NotImplementedException("This virtual method should have been overridden");
System.Diagnostics.Debug.Assert(false);
return new AudioCodecSettings(null);
}
set
{
//throw new NotImplementedException("This virtual method should have been overridden");
System.Diagnostics.Debug.Assert(false);
}
}
Haven't decide if it is better to throw the exception or to Assert, but think it should at least be one or the other.

Eamon

berrinam
25th November 2007, 00:20
Does it matter which you throw? They should both be caught pretty much instantly, and fixed before the user sees them. I would personally stick with the assert, though, because asserts always mean programming errors.

Beware, though, that throwing exceptions in properties can be dangerous when VS designer tries to modify them. It may be worth adding the [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] attributes to CodecSettings to avoid this.

Eamon21
25th November 2007, 01:08
Does it matter which you throw? They should both be caught pretty much instantly, and fixed before the user sees them. I would personally stick with the assert, though, because asserts always mean programming errors.

Beware, though, that throwing exceptions in properties can be dangerous when VS designer tries to modify them. It may be worth adding the [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] attributes to CodecSettings to avoid this.Generally , no it shouldn't matter whether an exception or assert is thrown because is should be caught during development time, but the exception gives a clearer idea what is wrong using the description while assert is probably more user friendly, allowing you to ignore and continue and see the resulting problem. In the end, I think that a comment here saying that this is expected to be overridden and the reason with an Assert is probably the best.

As it is, I am pretty much ready to submit my transcode tool patch, but it is now against your patch so I will wait until your patch is applied to the svn then build my new patch against the new revision rather than submitting a patch that contains what is in you patch plus changes.

too much wine and time for bed.....

Eamon

berrinam
25th November 2007, 05:37
If you also have a patch against svn, that would be good to see now, just for comments and not for actually committing.

Maccara
25th November 2007, 06:55
I'm reluctant for the moment simply because I have VS 2005 Pro installed and I have heard reports that VS2008 express does not play nice when installed side by side. Give it maybe a couple of weeks to see how things settle first?

Not sure of the Express editions, but gathering from the MSDN forums with Pro 2008 most of the problems seem to stem 1. having difficulty after having the CTP/Beta versions installed 2. Uninstalling 2005 (probably incorrectly - exactly right components in exactly right order have to be uninstalled) before installing 2008 (Full VS uninstalls never seem to go right :)).

I bit the bullet myself and installed VS 2008 Pro side-by-side with 2005 (still have some C++ code which needs to be updated to compile cleanly on 2008, so I still need 2005 for that - I actually have 2003 installed too as one customer project requires that) and everything seems ok so far (extensive testing is starting today - new windows SDK had changed some settings on 2005 but those were easily fixed, haven't checked 2003 yet). So for me, having 3 versions side-by-side seems to work just fine so far.

But I do agree with you - it might be better to wait a couple of weeks to sort out all the problem reports that are coming in. (although some of the C# 3.0 new features are tempting, and I would love there was a real project using it instead of my own testing only ;))

berrinam
25th November 2007, 06:56
More informative logtree names for jobs:
Index: core/gui/JobWorkerWindow.cs
===================================================================
--- core/gui/JobWorkerWindow.cs (revision 406)
+++ core/gui/JobWorkerWindow.cs (working copy)
@@ -497,8 +497,7 @@
{
try
{
- log = mainForm.Log.Info("Log for " + job.Name);
- log.LogValue("Job type", job.Job.EncodingMode);
+ log = mainForm.Log.Info(string.Format("Log for {0} ({1}, {2} -> {3})", job.Name, job.Job.EncodingMode, job.InputFileName, job.OutputFileName));
log.LogEvent("Started handling job");
log.Expand();

berrinam
25th November 2007, 07:22
Expand/collapse all for log:

Index: core/gui/LogTree.cs
===================================================================
--- core/gui/LogTree.cs (revision 406)
+++ core/gui/LogTree.cs (working copy)
@@ -132,5 +132,39 @@
}

}
+
+ private void expandOrCollapseAll(LogItem i, bool expand)
+ {
+ if (expand)
+ i.Expand();
+ else
+ i.Collapse();
+
+ foreach (LogItem i2 in i.SubEvents)
+ expandOrCollapseAll(i2, expand);
+ }
+
+ private void expandAll(LogItem i) { expandOrCollapseAll(i, true); }
+ private void collapseAll(LogItem i) { expandOrCollapseAll(i, false); }
+
+ private void expandLog_Click(object sender, EventArgs e)
+ {
+ expandAll(Log);
+ }
+
+ private void expandBranch_Click(object sender, EventArgs e)
+ {
+ expandAll(selectedLogItem);
+ }
+
+ private void collapseLog_Click(object sender, EventArgs e)
+ {
+ collapseAll(Log);
+ }
+
+ private void collapseBranch_Click(object sender, EventArgs e)
+ {
+ collapseAll(selectedLogItem);
+ }
}
}
Index: core/gui/LogTree.Designer.cs
===================================================================
--- core/gui/LogTree.Designer.cs (revision 406)
+++ core/gui/LogTree.Designer.cs (working copy)
@@ -38,6 +38,12 @@
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveBranch = new System.Windows.Forms.ToolStripMenuItem();
this.saveLog = new System.Windows.Forms.ToolStripMenuItem();
+ this.expandAllSubitemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.expandLog = new System.Windows.Forms.ToolStripMenuItem();
+ this.expandBranch = new System.Windows.Forms.ToolStripMenuItem();
+ this.collapseAllSubitemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.collapseLog = new System.Windows.Forms.ToolStripMenuItem();
+ this.collapseBranch = new System.Windows.Forms.ToolStripMenuItem();
this.saveDialog = new System.Windows.Forms.SaveFileDialog();
this.contextMenu.SuspendLayout();
this.SuspendLayout();
@@ -55,9 +61,11 @@
//
this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.editTextToolStripMenuItem,
- this.saveToolStripMenuItem});
+ this.saveToolStripMenuItem,
+ this.expandAllSubitemsToolStripMenuItem,
+ this.collapseAllSubitemsToolStripMenuItem});
this.contextMenu.Name = "contextMenuStrip1";
- this.contextMenu.Size = new System.Drawing.Size(153, 70);
+ this.contextMenu.Size = new System.Drawing.Size(173, 114);
//
// editTextToolStripMenuItem
//
@@ -66,27 +74,27 @@
this.editBranch,
this.editLog});
this.editTextToolStripMenuItem.Name = "editTextToolStripMenuItem";
- this.editTextToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.editTextToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
this.editTextToolStripMenuItem.Text = "Edit text";
//
// editIndividualNode
//
this.editIndividualNode.Name = "editIndividualNode";
- this.editIndividualNode.Size = new System.Drawing.Size(152, 22);
+ this.editIndividualNode.Size = new System.Drawing.Size(107, 22);
this.editIndividualNode.Text = "node";
this.editIndividualNode.Click += new System.EventHandler(this.ofIndividualNodeToolStripMenuItem_Click);
//
// editBranch
//
this.editBranch.Name = "editBranch";
- this.editBranch.Size = new System.Drawing.Size(152, 22);
+ this.editBranch.Size = new System.Drawing.Size(107, 22);
this.editBranch.Text = "branch";
this.editBranch.Click += new System.EventHandler(this.ofBranchToolStripMenuItem_Click);
//
// editLog
//
this.editLog.Name = "editLog";
- this.editLog.Size = new System.Drawing.Size(152, 22);
+ this.editLog.Size = new System.Drawing.Size(107, 22);
this.editLog.Text = "log";
this.editLog.Click += new System.EventHandler(this.editLog_Click);
//
@@ -96,7 +104,7 @@
this.saveBranch,
this.saveLog});
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
- this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.saveToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
this.saveToolStripMenuItem.Text = "Save";
//
// saveBranch
@@ -113,6 +121,52 @@
this.saveLog.Text = "log";
this.saveLog.Click += new System.EventHandler(this.saveLog_Click);
//
+ // expandAllSubitemsToolStripMenuItem
+ //
+ this.expandAllSubitemsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.expandLog,
+ this.expandBranch});
+ this.expandAllSubitemsToolStripMenuItem.Name = "expandAllSubitemsToolStripMenuItem";
+ this.expandAllSubitemsToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.expandAllSubitemsToolStripMenuItem.Text = "Expand all subitems";
+ //
+ // expandLog
+ //
+ this.expandLog.Name = "expandLog";
+ this.expandLog.Size = new System.Drawing.Size(120, 22);
+ this.expandLog.Text = "of log";
+ this.expandLog.Click += new System.EventHandler(this.expandLog_Click);
+ //
+ // expandBranch
+ //
+ this.expandBranch.Name = "expandBranch";
+ this.expandBranch.Size = new System.Drawing.Size(120, 22);
+ this.expandBranch.Text = "of branch";
+ this.expandBranch.Click += new System.EventHandler(this.expandBranch_Click);
+ //
+ // collapseAllSubitemsToolStripMenuItem
+ //
+ this.collapseAllSubitemsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.collapseLog,
+ this.collapseBranch});
+ this.collapseAllSubitemsToolStripMenuItem.Name = "collapseAllSubitemsToolStripMenuItem";
+ this.collapseAllSubitemsToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.collapseAllSubitemsToolStripMenuItem.Text = "Collapse all subitems";
+ //
+ // collapseLog
+ //
+ this.collapseLog.Name = "collapseLog";
+ this.collapseLog.Size = new System.Drawing.Size(152, 22);
+ this.collapseLog.Text = "of log";
+ this.collapseLog.Click += new System.EventHandler(this.collapseLog_Click);
+ //
+ // collapseBranch
+ //
+ this.collapseBranch.Name = "collapseBranch";
+ this.collapseBranch.Size = new System.Drawing.Size(152, 22);
+ this.collapseBranch.Text = "of branch";
+ this.collapseBranch.Click += new System.EventHandler(this.collapseBranch_Click);
+ //
// saveDialog
//
this.saveDialog.Filter = "Log files (*.log)|*.log|All files (*.*)|*.*";
@@ -143,5 +197,11 @@
private System.Windows.Forms.ToolStripMenuItem saveBranch;
private System.Windows.Forms.ToolStripMenuItem saveLog;
private System.Windows.Forms.ToolStripMenuItem editLog;
+ private System.Windows.Forms.ToolStripMenuItem expandAllSubitemsToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem expandLog;
+ private System.Windows.Forms.ToolStripMenuItem expandBranch;
+ private System.Windows.Forms.ToolStripMenuItem collapseAllSubitemsToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem collapseLog;
+ private System.Windows.Forms.ToolStripMenuItem collapseBranch;
}
}

berrinam
25th November 2007, 07:33
Silently create worker if none exists (#1837578 (http://sourceforge.net/tracker/index.php?func=detail&aid=1837578&group_id=156112&atid=798479)):

Index: core/details/JobControl.cs
===================================================================
--- core/details/JobControl.cs (revision 406)
+++ core/details/JobControl.cs (working copy)
@@ -44,12 +44,8 @@
public void StartAll(bool restartStopping)
{
if (workers.Values.Count == 0)
- {
- DialogResult r = MessageBox.Show("Can't start queue because there are no workers. You can create one from the Workers menu. Do you want to create one now?",
- "Create new worker?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
- if (r == DialogResult.OK)
- RequestNewWorker();
- }
+ NewWorker(freeWorkerName(), false);
+
foreach (JobWorker w in workers.Values)
if (!w.IsEncoding) w.StartEncoding(false);
else if (restartStopping && w.Status == JobWorkerStatus.Stopping) w.SetRunning();

Eamon21
25th November 2007, 11:19
If you also have a patch against svn, that would be good to see now, just for comments and not for actually committing.OK, will build one now and find somewhere to stick, I'll post the link once done.

One more breaking change from you earlier patch though is that AudioCodecSettings requires a parameterless constructor to be serialised, otherwise you can't add any audio jobs. I've just added a private blank oneprivate AudioCodecSettings(){}and all is good again.

Eamon

berrinam
25th November 2007, 12:15
Here's a new version of the patch with the two bugs Eamon pointed out fixed: http://megui.org/berrinam_patches/profiles_refactor/profiles_refactor_2.patch.

Haven't decide if it is better to throw the exception or to Assert, but think it should at least be one or the other.I decided on an exception because the C# compiler is aware of it and it doesn't raise the error, "not all code paths return a value".

One more breaking change from you earlier patch though is that AudioCodecSettings requires a parameterless constructor to be serialised, otherwise you can't add any audio jobs. I've just added a private blank oneprivate AudioCodecSettings(){}and all is good again.I fixed this by making AudioCodecSettings abstract, as it should be.

Eamon21
25th November 2007, 12:16
Ok, patch for transcode tool up at http://www.mytempdir.com/2067780

It's against SVN revision 405, but should be able to use it still. There are still a few things to be added and maybe a bit of work on the interface but basic functionality is there.

Fire in the comments/suggestions/problems.

The patch is huge at the moment because it was built against berrinam's earlier patch to refactor profiles, once that is committed, I'll build a new more compact one. The actual changes to the core are very minimal as I have kept everything as localised as possible with a few additional functions in a temporary helper class. Once it's accepted these will move to new more sensible homes. I think the only change to the core (appart from berrinam's patch) are a single line in the mainform to add the tool to the menu and the changes to the poject file to include the new files.

Eamon

berrinam
25th November 2007, 13:20
Interesting patch. I'll have to play with it some more, though.

I assume that the main focus of this tool is for recompressing already-encoded media files, which have their audio and video all-in-one and don't need preparation like VOB files? I'm afraid I don't have much experience in that field, so I don't know what kind of configuration is required. As a result, I'm sorry that my comments are going to appear negative, but it feels to me that some options are missing. (It is probably partly my excessive desire for control speaking.)

Some settings are missing, as I said. My first thoughts were:
Output filesize
Video resolution (although we've discussed this)
Keeping the original audio track
Track selection
Deinterlacing (automatic?)

I could believe it possible that these can be sacrificed if you are only shrinking already-encoded media files, but I'm interested in hearing your opinions, since this isn't a situation I am very familiar with.

I haven't looked much at the code yet, so I'm wondering what your approach to things like VOB files is. (Things which should really be run through DGIndex first). And how about media files with 0 audio tracks, or 2+ ?

The GUI isn't updating when you select Output location -> specify. The filebar remains disabled.

Also, as a matter of style, I mostly tend to avoid log.Info(). I like to use log.LogValue(,) a lot, and for the places where that isn't so appropriate, I use log.LogEvent(), which timestamps it (so that a post-mortem analysis of the log can reveal if anything took unusually long/short).

I think LogValue is especially useful and you should use it more often. For instance, you could replace
catch (Exception ex)
{
joblog.Add(new LogItem("Unable to create temporary AVS script file: " + inputAVSFile).Error(ex.ToString()));
return false;
}

with

catch (Exception ex)
{
joblog.LogValue("Error creating temporary AVS script file", ex, ImageType.Error);
return false;
}

which has the advantage that the logger will automagically display the exception, giving not only the message but also inner exceptions and stacktraces.

Just as a side note, I always smile when I see this (although I myself write it quite often):
Debug.Assert(mainForm != null);
mainForm.Log.Add(_log);

I know it acts as good documentation, but it somehow seems somehow pointless, as .NET will give us a perfectly good NullReferenceException if the Assert weren't there. :)

Also, the GUI hangs when jobs are being prepared; you should consider running the job preparation in another thread as it can take quite some time.

And it seems like you forgot to do SVN Add on the new files added by my patch to core/gui. They didn't appear in the patch, anyway.

berrinam
25th November 2007, 13:22
Oh, and I would really like to be able to right-click on that MultiFileSelector; it just invites it, and I'm disappointed when nothing appears. :P

Eamon21
25th November 2007, 14:18
Interesting patch. I'll have to play with it some more, though.

I assume that the main focus of this tool is for recompressing already-encoded media files, which have their audio and video all-in-one and don't need preparation like VOB files? I'm afraid I don't have much experience in that field, so I don't know what kind of configuration is required. As a result, I'm sorry that my comments are going to appear negative, but it feels to me that some options are missing. (It is probably partly my excessive desire for control speaking.)Yeah, the original reason I started this was to provide an easy way for me to transcode a large number of MJPEG *.Mov files from my digital camera to H264 as I have several gig worth after around 12 months travelling. Initial tests showed that I could use x264 and have files that looked pretty much identical but in some cases 10% of the original size using the const. qual option. Anyway I tried a program called SUPER and it was easy enough to use but not much control, not nearly as efficient as fully cranking the settings up in x264 and I don't care how long the encodes take, this is for storage.

In general, what is there vs what is missing comes down to two things, if it's not there (yet) then likely: I don't need it to transcode my digi cam movies and secondly, it was not straight forward to do with the current code/profiles/job types.


Some settings are missing, as I said. My first thoughts were:
Output filesize
Video resolution (although we've discussed this)
Keeping the original audio track
Track selection
Deinterlacing (automatic?)

I could believe it possible that these can be sacrificed if you are only shrinking already-encoded media files, but I'm interested in hearing your opinions, since this isn't a situation I am very familiar with.Well output size is something I've never really used but I guess I can see where some people might. I kind of feel that this belongs in a video profile though as it really applies to the encoder doesn't it? I'm more concerned with have a minimum quality than a specific file size, but then I never burn to CD/DVD media.

Video resolution and de-interlacing I think belong to the AVS profile and that is where it should be done. If you look at the CreateScript function in the TemporaryHelperClass, you can see where I have provisioned for them, getting the settings from the AVS profile. Again I make my arguments that these settings should be part of the AVS profile as it is the avs script that implements them.

Audio tracks: well I suspected this would be brought up and I had intended to add support to specify an alternate track based on a name template applied to the input file or not encode the audio at all, both easy enough to do. Direct stream copy of the audio is not as straight forward as it means I have to extract the stream myself somehow, probably a new type of job I guess similar to the DGIndex job. At the moment AVISynth makes it easy for me, it will grab the audio stream out of any file and pass it out as wav data. The additional effort and the fact that I don't need it for m initial purposes for the transcode meant that I have not pursued direct stream copy further. Similar reasons for track selection, I don't currently have an easy way of getting different tracks from a file, avisyth just grabs the default I think.


I haven't looked much at the code yet, so I'm wondering what your approach to things like VOB files is. (Things which should really be run through DGIndex first). And how about media files with 0 audio tracks, or 2+ ?I'm no DVD converting expert, not even close but I understand that there is a lot involved, I think it belongs in a more specialized tool which is really what the OneClickTool is supposed to do. Initially I considered trying to modify the OneClickTool to support more filetypes but ended putting that in the "Too Hard" basket. I deliberately set out NOT to develop a replacement for that though I did look at it a lot in trying to work out how to go about things.


The GUI isn't updating when you select Output location -> specify. The filebar remains disabled.On to it...sorted.


Also, as a matter of style, I mostly tend to avoid log.Info(). I like to use log.LogValue(,) a lot, and for the places where that isn't so appropriate, I use log.LogEvent(), which timestamps it (so that a post-mortem analysis of the log can reveal if anything took unusually long/short).

I think LogValue is especially useful and you should use it more often. For instance, you could replace
catch (Exception ex)
{
joblog.Add(new LogItem("Unable to create temporary AVS script file: " + inputAVSFile).Error(ex.ToString()));
return false;
}

with

catch (Exception ex)
{
joblog.LogValue("Error creating temporary AVS script file", ex, ImageType.Error);
return false;
}

which has the advantage that the logger will automagically display the exception, giving not only the message but also inner exceptions and stacktraces.I'm not fussed, there are no comments in the LogItem class to provide any guidance for usage, I just did the first thing that seemed logical. But I take your point for exception logging so will change that now too.


Also, the GUI hangs when jobs are being prepared; you should consider running the job preparation in another thread as it can take quite some time.Good idea with the new thread, had changed the cursor to an hourglass, but not quite sufficient :)

And it seems like you forgot to do SVN Add on the new files added by my patch to core/gui. They didn't appear in the patch, anyway.oops, just created the patch and only thought to add files I've added for the transcode. Wont be a problem when i make the next patch against the SVN once your patch makes it in there.

Finally, with the multifile selector, I intend to add things like right click and to add the icon associated with each file to the display, basically just got the minimum together first. Usability features like context menus come second :)

Thanks for the feedback.

Eamon

Eamon21
25th November 2007, 14:31
new patch that contains files added in berrinam's ealier patch that i left out last time :)
http://www.mytempdir.com/2067872

Eamon

berrinam
25th November 2007, 23:13
Here's another thought. When I used it at first, I was a bit scared because I didn't know what it was going to do with my files and I didn't know which ones would work. Some other tools which allow you to select multiple files read in the source information the moment you select the files, unlike your tool, which does it when you press add. I'm not sure, but that might be clearer for the user as they know from the start which ones can work.

Since it can take some time, you might also want to put a progress bar in a statusbar at the bottom of the window. (Yes, I know: usability features come second :))

Eamon21
26th November 2007, 01:11
Can anyone tell me what the deal with the Mediainfo.dll and the MediaInfoWrapper class? the dll in the svn is version 0.7.4.4 which is from 5th Feb 2007 (current version is 0.7.5.5)

Anyway, when I try to use it I get the wrong results, it doesn't seem to process the information properly.

I'm going to have a look through the MediaInfoWrapper solution and see if i can work out what is wrong, but is there a reason it is still using such an old version of the dll? Or is it just that no one else uses it so haven't bothered?

Eamon

berrinam
26th November 2007, 04:22
I have had no problems with Mediainofo 0.7.4.4 except a crash with Vista which I fixed in the MediaInfoWrapper class a while ago. However, other people have since complained of MediaInfo crashes under Vista. As I don't run Vista, I am somewhat separated from this situation. I believe we plan to update to 0.7.5.5 soon, but we may also have to accompany that with some changes to the OpenFileDialog calls (don't ask me why... you can read the last pages of this thread to get some details, though).

What are these wrong results it gives you?

Kurtnoise
26th November 2007, 07:53
the dll in the svn is version 0.7.4.4 which is from 5th Feb 2007
This is wrong. I updated to the latest build few days ago. It's still the old one on auto-update servers though (which overwrites the new one when we use the update)...

Eamon21
26th November 2007, 11:26
This is wrong. I updated to the latest build few days ago. It's still the old one on auto-update servers though (which overwrites the new one when we use the update)...
OK, I seem to have the latest version now. Still having the same problems though..

I have had no problems with Mediainofo 0.7.4.4 except a crash with Vista which I fixed in the MediaInfoWrapper class a while ago. However, other people have since complained of MediaInfo crashes under Vista. As I don't run Vista, I am somewhat separated from this situation. I believe we plan to update to 0.7.5.5 soon, but we may also have to accompany that with some changes to the OpenFileDialog calls (don't ask me why... you can read the last pages of this thread to get some details, though).

What are these wrong results it gives you?
When I try to create a MediaInfoFile, stepping into the constructor and viewing the second lineMediaInfo info = new MediaInfo(file);if I put a watch on the info object after it is created I see the following:

- info {MediaInfoWrapper.MediaInfo} MediaInfoWrapper.MediaInfo
+ Audio Count = 0 System.Collections.Generic.List<MediaInfoWrapper.AudioTrack>
AudioCount 1 int
+ Chapters Count = 0 System.Collections.Generic.List<MediaInfoWrapper.ChaptersTrack>
ChaptersCount 0 int
+ General Count = 0 System.Collections.Generic.List<MediaInfoWrapper.GeneralTrack>
GeneralCount 1 int
InfoComplete ...snip...
InfoCustom "General\r\n\r\nVideo\r\n\r\nAudio\r\n\r\nText\r\n\r\nChapters\r\n" string
InfoStandard ...snip...
+ Text Count = 0 System.Collections.Generic.List<MediaInfoWrapper.TextTrack>
TextCount 0 int
+ Video Count = 0 System.Collections.Generic.List<MediaInfoWrapper.VideoTrack>
VideoCount 1 int
+ Non-Public members now this file definately has both audio(aac) and video (H264) but the information doesn't seem to be beign parsed correctly. I have cut the "InfoComplete" filed here because it messed up the formatting, but it contains the following:General #0
Count : 176
Count of stream of t : 1
Kind of stream : General
StreamKindID : 0
Count of video strea : 1
Count of audio strea : 1
Count of text stream : 0
Count of chapter str : 0
Codecs Video : H.264
Audio codecs : AAC LC
Complete name : C:\b\a-muxed.mp4
Folder name : C:\b
File name : a-muxed
File extension : mp4
Format : isom
Format : MPEG-4
Format/Info : ISO 14496-1 Base Media
Format/Family : MPEG-4
Format/Url : http://www.apple.com/quicktime/download/standalone.html
Format/Extensions : mp4
Codec : isom
Codec : MPEG-4
Codec/Info : ISO 14496-1 Base Media
Codec/Family : MPEG-4
Codec/Url : http://www.apple.com/quicktime/download/standalone.html
Codec/Extensions : mp4
File size : 755388
File size : 738 KiB
File size : 738 KiB
File size : 738 KiB
File size : 738 KiB
File size : 737.7 KiB
PlayTime : 3326
PlayTime : 3s 326ms
PlayTime : 3s 326ms
PlayTime : 3s 326ms
PlayTime : 00:00:03.326
Bit rate : 1816928
Bit rate : 1817 Kbps
StreamSize : 2518
StreamSize : 2.46 KiB
StreamSize : 2 KiB
StreamSize : 2.5 KiB
StreamSize : 2.46 KiB
StreamSize : 2.459 KiB
Encoded date : UTC 2007-11-15 12:29:07
Tagged date : UTC 2007-11-15 12:29:07

Video #0
Count : 73
Count of stream of t : 1
Kind of stream : Video
StreamKindID : 0
ID : 1
Codec : avc1
Codec : H.264
Codec/Info : H.264 (3GPP)
Codec/Url : http://www.apple.com/quicktime/download/standalone.html
PlayTime : 3000
PlayTime : 3s
PlayTime : 3s
PlayTime : 3s
PlayTime : 00:00:03.000
Bit rate : 1970858
Bit rate : 1971 Kbps
Width : 640
Width : 640 pixels
Height : 480
Height : 480 pixels
Aspect ratio : 1.333
Aspect ratio : 4/3
Frame rate : 30.000
Frame rate : 30.000 fps
FrameCount : 90
Bits/(Pixel*Frame) : 0.189
StreamSize : 739072
StreamSize : 722 KiB
StreamSize : 722 KiB
StreamSize : 722 KiB
StreamSize : 722 KiB
StreamSize : 721.8 KiB
Encoded date : UTC 2007-11-15 12:29:07
Tagged date : UTC 2007-11-15 12:29:07

Audio #0
Count : 58
Count of stream of t : 1
Kind of stream : Audio
StreamKindID : 0
ID : 2
Codec : A_AAC/MPEG4/LC
Codec : AAC LC
Codec/Info : AAC Low Complexity
PlayTime : 3328
PlayTime : 3s 328ms
PlayTime : 3s 328ms
PlayTime : 3s 328ms
PlayTime : 00:00:03.328
Bit rate : 33168
Bit rate : 33 Kbps
Bit rate mode : VBR
Channel(s) : 1
Channel(s) : 1 channel
Sampling rate : 8000
Sampling rate : 8000 Hz
SamplingCount : 26624
Resolution : 16
Resolution : 16 bits
StreamSize : 13798
StreamSize : 13.5 KiB
StreamSize : 13 KiB
StreamSize : 13 KiB
StreamSize : 13.5 KiB
StreamSize : 13.47 KiB
Encoded date : UTC 2007-11-15 12:29:07
Tagged date : UTC 2007-11-15 12:29:07so you can see the information is there but it doesn't seem to be parsed properly, going to have a quick look at the MediaInfoWrapper project now and see what I can find out.

That brings me to another question though, is there a particular reason that the MediaInfoWrapper project is not part of the same solution?

Eamon

Eamon21
26th November 2007, 12:06
Appears to be something wrong with the MediaInfoWrapper.dll. If I use the one in the SVN i.e.
Size: 68.0 KB (69,632 bytes)
Version: 0.7.5.5

I have problems but if I run through the MediaInfoWrapper project it works, if I compile it myself from the MediaInfoWrapper project (Debug or release) and copy that dll to the MeGui directory it works, and finally if I include the MediaInfoWrapper project in the MeGui solution and change the reference in MeGui to the project instead of the dll, it works.

Can anyone else replicate this?
Simply create a MediaInfoFile and see if it has populated the fields correctly.


maybe easier to just apply this patch and try to create a MediaInfoFile
Index: MediaInfoFile.cs
===================================================================
--- MediaInfoFile.cs (revision 405)
+++ MediaInfoFile.cs (working copy)
@@ -228,6 +228,8 @@
{
this.file = file;
MediaInfo info = new MediaInfo(file);
+ System.Diagnostics.Debug.Assert(info.AudioCount == info.Audio.Count);
+ System.Diagnostics.Debug.Assert(info.VideoCount == info.Video.Count);

bool hasVideo = (info.Video.Count > 0);

Eamon

Kurtnoise
26th November 2007, 12:14
what's the size of your own MediaInfoWrapper.dll ?

Eamon21
26th November 2007, 13:13
well in debug mode, it is 76.0 KB (77,824 bytes) but when I compile as release, it is actually exactly the same size as the one that causes me problems.

Eamon

Kurtnoise
26th November 2007, 14:47
More informative logtree names for jobs:
...
looks ok.

Expand/collapse all for log:...
looks ok.

Silently create worker if none exists (#1837578):...
looks ok.

Sharktooth
26th November 2007, 16:15
dev:0.3.0.1001 (includes 0.2.x branch fixes)
- (berrinam) Add missing output streams back to log (fixes #1836281)
- (Kurtnoise) [AutoEncodeWindow] mainform was being referenced in default constructor before it had ever
been assigned (#1836041). patch by Eamonh.
- (Kurtnoise) Removed unused code
- (Kurtnoise) more Audio Input FileType.
- (Kurtnoise) [ProgressWindow] Remaining Time -> Time Remaining.
stable:0.2.6.1040
- (Kurtnoise) [MainForm] move AutoUpdate checking to the shown Event (to have the MessageBox in the foreground). bob0r should be happy now...;-)
- (Kurtnoise) Added several new languages.
- (Kurtnoise) [OneClickWindow] re-ordered the initOneClickHandler() (#1832675). patch by Eamonh.
- (Kurtnoise) Updated MediaInfo.dll and his wrapper.

Kurtnoise
26th November 2007, 18:41
ok...I would like to have your opinion guys about Vista stuff. To sum up : the main issue concerns the preview window which can't be opened properly. Basically, it's due to the openfiledialog bug. To resolve this without some extra tweakings or tunings, an upgrade to the last .Net Framework is sufficient (maybe the 2.0 SP1 is enough...dunno). I tested this during all the weekend and I got no problem so far.

So, what can we do now ? I suggest to raise a warning during the mainform loading to inform people who run on Vista and who don't have the appropriate framework to upgrade. I've already the patch for that. ;)

Sharktooth
26th November 2007, 19:06
with "latest" you mean 3.5? or latest versions of 2.0?

Kurtnoise
26th November 2007, 21:02
Some extra comments...

if I choose the .Net 2.0 as target framework, it's the 2.0 SP1 which is used.
if I choose the .Net 3.5 as target framework, it's the 3.5 RTM which is used.
both builds work flawlessly...:)


Note: when we install the .Net 3.5, there is also an update for the 2.0 (i.e an upgrade to the SP1) wich adds some methods and properties, required for the Framework 3.5 features such as LINQ, to the BCL classes in the Framework 2.0. These changes do not affect applications written for version 2.0 of the .NET Framework.

Eamon21
26th November 2007, 23:15
Some extra comments...

if I choose the .Net 2.0 as target framework, it's the 2.0 SP1 which is used.
if I choose the .Net 3.5 as target framework, it's the 3.5 RTM which is used.
both builds work flawlessly...:)


Note: when we install the .Net 3.5, there is also an update for the 2.0 (i.e an upgrade to the SP1) wich adds some methods and properties, required for the Framework 3.5 features such as LINQ, to the BCL classes in the Framework 2.0. These changes do not affect applications written for version 2.0 of the .NET Framework.I would vote for sticking with 2.0 for now, I suspect there would be a lot of unhappy campers running win2k who would flood into the forums if they could no longer run it.

Secondly, I just want to check the purpose of the MediaInfoWrapper.dll, I suspect that it is just there to wrap the MediaInfo.dll and ensure it is disposed of cleanly with all handles and non-managed memory cleaned up?

Eamon

berrinam
26th November 2007, 23:54
That brings me to another question though, is there a particular reason that the MediaInfoWrapper project is not part of the same solution?MediaInfoWrapper was provided to MeGUI by someone else, as a complete project that you see in the SVN. We simply never joined it into the main solution. However, better than adding the project to the solution would be just adding the files to the MeGUI project. Currently there are two stages of interpretation (DLL->strings, strings->MeGUI values) which could perhaps be simplified if it was all in the main project.

ok...I would like to have your opinion guys about Vista stuff. To sum up : the main issue concerns the preview window which can't be opened properly. Basically, it's due to the openfiledialog bug. To resolve this without some extra tweakings or tunings, an upgrade to the last .Net Framework is sufficient (maybe the 2.0 SP1 is enough...dunno).
...
So, what can we do now ? I suggest to raise a warning during the mainform loading to inform people who run on Vista and who don't have the appropriate framework to upgrade. I've already the patch for that. ;)
...
if I choose the .Net 2.0 as target framework, it's the 2.0 SP1 which is used.
...
both builds work flawlessly...:)

If I understand correctly, it all works if the users run 2.0 SP1? If that is available to Win2k users as well, then that seems the best solution, so let's do that.

Secondly, I just want to check the purpose of the MediaInfoWrapper.dll, I suspect that it is just there to wrap the MediaInfo.dll and ensure it is disposed of cleanly with all handles and non-managed memory cleaned up?Yes, although when I looked at it recently, it doesn't appear to delete the handle. I'm not sure if that's a bug...

kumi
26th November 2007, 23:59
I just wanted to note that the 0.2.6.1040 stable upgrade has resolved my MediaInfoWrapper.dll problem:

https://sourceforge.net/tracker/index.php?func=detail&aid=1832210&group_id=156112&atid=798477

Eamon21
27th November 2007, 00:29
Yes, although when I looked at it recently, it doesn't appear to delete the handle. I'm not sure if that's a bug...Yeah, was going to point this out. Though it does have a Dispose() method, it doesn't actually implement the IDisposable interface, also, the way Dispose() was being used was not complete and the unmanaged resources (handles etc) only got cleaned up if Dispose was explicitly called and therefore a potential memory leak if the object was left to be collected by the garbage collector.

I have since made it IDisposable and implemented a better dispose pattern for now and I will look at moving the code into MeGui too as that would resolve another thing I was going to bring up and that is the MediaInfoFile class wraps the MediaInfoWrapper.dll which wraps MediaInfo.dll, an uneccessary extra layer as you point out.

Eamon

berrinam
27th November 2007, 02:52
looks ok.
...
looks ok.
...
looks ok.

Can someone else commit these three patches please? I've got computer troubles at the moment.

berrinam
27th November 2007, 07:27
I understand that people would like to have some of the x264's experimental (non-SVN) features supported in MeGUI. I reckon we can support experimental and vanilla x264 at the same time in MeGUI, giving the user the choice.

What the user will see is one more codec. Instead of the 4 video codecs being (as we currently have) x264, XviD, LMP4, and Snow, there would be 5: x264, x264-experimental, XviD, LMP4, and Snow. As MeGUI treats it as an entirely separate codec, there will be no problems of the two interfering, and the user can choose to stick with vanilla x264 just by using the plain 'x264' codec. Naturally, we would also have to add another video encoder to MeGUI, corresponding to the different build of x264.

As far as code reuse goes, I think inheritance pretty much does the trick. We derive x264ExperimentalSettings from x264Settings, and x264ExperimentalConfigurationPanel from x264ConfigurationPanel, and x264ExperimentalEncoder from x264Encoder.

What do you think?

berrinam
27th November 2007, 07:43
There's some code in the Bitrate Calculator tool which allows the calculated bitrate to be saved back into the selected video profile. I find it a bit hacky, and I don't really expect that anyone uses it much: if you want to encode to a given filesize, then the AutoEncoder generally is easier to use. I think we should consider removing this as it seems pointless.

Kurtnoise
27th November 2007, 09:34
If I understand correctly, it all works if the users run 2.0 SP1? If that is available to Win2k users as well, then that seems the best solution, so let's do that.
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;
}
}

Kurtnoise
27th November 2007, 09:37
As far as code reuse goes, I think inheritance pretty much does the trick. We derive x264ExperimentalSettings from x264Settings, and x264ExperimentalConfigurationPanel from x264ConfigurationPanel, and x264ExperimentalEncoder from x264Encoder.

What do you think?
you read my mind...;) it's exactly what I thought this weekend.

Kurtnoise
27th November 2007, 11:19
Can someone else commit these three patches please? I've got computer troubles at the moment.
ok, done...

Sharktooth
27th November 2007, 14:34
There's some code in the Bitrate Calculator tool which allows the calculated bitrate to be saved back into the selected video profile. I find it a bit hacky, and I don't really expect that anyone uses it much: if you want to encode to a given filesize, then the AutoEncoder generally is easier to use. I think we should consider removing this as it seems pointless.
i use it :)
for what concerns x264 experimental builds, i dont think we should add them since it will require continous effort in updating support for that. plus there are a lot of different builds with different command line options... it will just be a PITA.

rack04
27th November 2007, 14:46
There's some code in the Bitrate Calculator tool which allows the calculated bitrate to be saved back into the selected video profile. I find it a bit hacky, and I don't really expect that anyone uses it much: if you want to encode to a given filesize, then the AutoEncoder generally is easier to use. I think we should consider removing this as it seems pointless.

I use it. Haven't tried AutoEncoder though.

Sharktooth
27th November 2007, 14:54
maybe we should "ask" the user if he wants to update the bitrate value of the currently selected profile or not.
that would be a much better idea.

Kurtnoise
27th November 2007, 18:33
We have definitively a big issue with the last MediaInfoWrapper release. :( Check out the bugtracker. When we use the muxers, FPS value is not detected anymore. Using the old one (0.7.4.4), that works...

Eamon: if you've fixed some things in it, that could be great to test it...at least a patch. :)

Sharktooth
27th November 2007, 18:47
dang... maybe the api changed? i didnt look at the changelog

Eamon21
27th November 2007, 19:03
We have definitively a big issue with the last MediaInfoWrapper release. :( Check out the bugtracker. When we use the muxers, FPS value is not detected anymore. Using the old one (0.7.4.4), that works...

Eamon: if you've fixed some things in it, that could be great to test it...at least a patch. :)Don't know what it was exactly but the last mediinfowrapper.dll (0.7.5.5) was just broken, a recompile with the same source code fixed everything for me, dll is still version 0.7.5.5 but works now. That simple patch I posted earlier would show the problem first time you tried to create MediaInfoFile where the number of streams was correct but it just was not populating them with info.

I have started trying to move the code in MediaInfoWrapper into MeGui, but I think it will be a while before I am done, in the meantime, my re-compiled mediainfowrapper.dll should fix the issues, well it did for me. I have uploaded it to http://www.mytempdir.com/2069458. Updated link to point to newly compile dll that actually is version 07.5.5

Or if someone wants to just recompile the dll them self, I have made slight changes to the dispose functionality, though nothing that would explain the previous problems. Here is the patchIndex: trunk/MediaInfoWrapper/MediaInfoWrapperDll/MediaInfoMain.cs
===================================================================
--- trunk/MediaInfoWrapper/MediaInfoWrapperDll/MediaInfoMain.cs (revision 405)
+++ trunk/MediaInfoWrapper/MediaInfoWrapperDll/MediaInfoMain.cs (working copy)
@@ -46,10 +46,8 @@
/// every information MediaInfo.dll can collect.
/// Tracks are accessibles as properties.
/// </summary>
- public class MediaInfo
+ public class MediaInfo : IDisposable
{
-
-

[DllImport("MediaInfo.dll")]
internal static extern int MediaInfo_Close(IntPtr Handle);
@@ -72,7 +70,7 @@
[DllImport("MediaInfo.dll")]
internal static extern int MediaInfo_State_Get(IntPtr Handle);

-
+
private List<VideoTrack> _Video;
private List<GeneralTrack> _General;
private List<AudioTrack> _Audio;
@@ -87,7 +85,7 @@
private string _InfoStandard;
private string _InfoCustom;
private string _FileName;
- private bool disposedValue;
+
private IntPtr Handle;
//public static const string MediaInfoPath="MediaInfo.dll";

@@ -103,35 +101,76 @@
//if (!CheckFileExistence("MediaInfo.dll")) return;
if (!CheckFileExistence(path)) return;
_FileName = path;
-
+
this.Handle = MediaInfo.MediaInfo_New();
MediaInfo.MediaInfo_Open(this.Handle, path);
+ try
+ {
+ getStreamCount();
+ getAllInfos();
+ }
+ finally //ensure MediaInfo_Close is called even if something goes wrong
+ {
+ MediaInfo.MediaInfo_Close(this.Handle);
+ }

- getStreamCount();
- getAllInfos();
+ }

- MediaInfo.MediaInfo_Close(this.Handle);
+ #region Disposable Pattern
+ private bool disposed;

+ ~MediaInfo()
+ {
+ Dispose(false);
}
+
+ protected bool IsDisposed
+ {
+ get { return disposed; }
+ }
+
+ protected void CheckDisposed()
+ {
+ if (disposed)
+ {
+ throw new ObjectDisposedException(this.ToString());
+ }
+ }
+
/// <summary>Call this one to kill the wrapper, and close his handle to the MediaInfo.dll, you should never need it anyway </summary>
public void Dispose()
{
this.Dispose(true);
GC.SuppressFinalize(this);
}
-
-
-
- /// <summary>Call this one to kill the wrapper, and close his handle to the MediaInfo.dll, you should never need it anyway </summary>
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="disposing"></param>
protected virtual void Dispose(bool disposing)
{
- if (!this.disposedValue && disposing)
+ if (!this.disposed)
{
- MediaInfo.MediaInfo_Close(this.Handle);
- MediaInfo.MediaInfo_Delete(this.Handle);
+ if (disposing)
+ {
+ DisposeManagedResources();
+ }
+ DisposeUnmanagedResources();
}
- this.disposedValue = true;
+ this.disposed = true;
}
+
+ protected virtual void DisposeManagedResources()
+ {
+ }
+ protected virtual void DisposeUnmanagedResources()
+ {
+ MediaInfo.MediaInfo_Close(this.Handle);
+ MediaInfo.MediaInfo_Delete(this.Handle);
+ }
+ #endregion
+
/// <summary>
/// Simply checks file presence else throws a FileNotFoundException
/// </summary>
@@ -780,5 +819,6 @@
return this._ChaptersCount;
}
}
+
+ }
}
-}

But as I said, I think it will probably be better to incorporate the code from mediainfowrapper into MeGui and effectively merge mediainfowrapper and mediainfofile.

Eamon

Sharktooth
27th November 2007, 19:06
i agree. however in the meanwhile i will re-compile the wrapper and update the packages ASAP.

Kurtnoise
27th November 2007, 19:06
dohh...my bad. It was my fault. :scared: I disabled a function in the wrapper when I've made some tests earlier. :o:o:o


Sorry guys. I'll upload the new one tonight...

Sharktooth
27th November 2007, 19:06
ok... :)

EDIT: btw, i moved to VS2008

Eamon21
27th November 2007, 19:53
It would still be worth applying the patch I posted for MediaInfoWrapper with the new dispose functionality as there is currently a memory leak. Where the class MediaInfoWrapper.MediaInfo is used (e.g. in MediaInfoFile.cs, line 230) it is not currently disposed and the previous dispose pattern used did not clean up unmanaged resources if it was cleaned up by the garbage collector, only if someone explicitly called Dispose() was the handle actually deleted.

Eamon

Kurtnoise
27th November 2007, 20:45
yeah...I applied your patch.