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
Richard Berg
24th January 2006, 16:10
Thanks for your help. I've tried it several times now to login to the megui cvsroot. Without any succes. There's everytime a timeout. Think I've read something about it before. Does anyone know how to get it working?
In my experience the last few weeks, it's down about half the time. I just wait a few hours and try again :(
klicker4546
24th January 2006, 16:28
Ok, I see. Think I will manually downlaod the changes, so far I can find them in the webcvs. :)
In my experience the last few weeks, it's down about half the time. I just wait a few hours and try again :(
dimzon
24th January 2006, 17:15
Does we need mediaInfo.dll wrapper? I can write it.
there alredy are C# wrapper bundled with Dll
dimzon
24th January 2006, 17:36
2 all devs
this.path = Environment.CurrentDirectory;
peoples are confused when they start MeGUI from command line and does'nt see their settings/jobs/etc...
I propose such replacement:
this.path = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
what does You think about?
Mutant_Fruit
24th January 2006, 21:29
Wouldn't this work better:
string path = Application.StartupPath;
I believe it returns the path that the exe is in.
ChronoCross
25th January 2006, 00:17
for those of you who want it:
http://www.chronocrossdev.com/apps/megui/MeGUI-0.2.3.2045.rar
Includes the source files.
dimzon
25th January 2006, 11:37
Wouldn't this work better:
string path = Application.StartupPath;
I believe it returns the path that the exe is in.
Yes, it's better ;)
dimzon
25th January 2006, 12:17
0.2.3.2046 25 Jan 2006
Commit by dimzon:
-FAAC Settings && FAAC Settings Dialog - performed little cleanup && bugfix
dimzon
25th January 2006, 12:28
0.2.3.2046 25 Jan 2006
Commit by dimzon:
-nothing, just marked AviReader by [Obsolete] attribute (it's time to switch to AvsReader). not affected anywhere except you get warnings during compilation now
stax76
25th January 2006, 12:39
Yes, it's better ;)
Funny to see that even devs with deep .NET knowledge didn't knew this one ;)
dimzon
25th January 2006, 12:55
Funny to see that even devs with deep .NET knowledge didn't knew this one ;)
Impossible to know everything... ;)
Doom9
25th January 2006, 13:44
-Modified AvsReader are now used for Avs preview ;) Everyting works fine...Now you could go all the way and change the input checking prior to encoding to make use of it and even check for YV12 input and give the user a specific warning about the colorspace if it doesn't match the one required..
I'll have a look at the avsaudioencoder tonight.
dimzon
25th January 2006, 14:10
0.2.3.2047 25 Jan 2006
Commit by dimzon:
- VideoPlayer can play avs via string (does not need temporaly avs files)
- AviSynth generator does'nt create preview.avs && temp.avs more
http://img93.imageshack.us/img93/5926/untitled2cc.png
dimzon
25th January 2006, 14:13
@Doom9
Hello
Can I perform this modification: http://forum.doom9.org/showthread.php?p=774275#post774275
(I'm asking bcz I do not know -it is a bug or a feature)
dimzon
25th January 2006, 14:20
2 all devs
found such code:
// Directshowsource needs the FPS information to be supplied.
// Without a lot of restructuring of code this is the best way of finding the FPS
// If anyone knows a better way of obtaining Framerate info, change this.
AVIReader reader;
try
{
reader = new AVIReader(fileName);
}
catch (Exception) // Some files can't render because you have no VfW codec (like DV sources)
{
reader = null;
}
AFAIK DiresctShowSource reques explicit fps information in very rare cases. And can't believe AVIFile32 API can return fps for such rare cases at all (AFAIK it even can't read such files)
Correct me if I'm wrong, please! I'm suggesting to remove this code!
Doom9
25th January 2006, 14:25
use string path = Application.StartupPath; please.. and for such small things... just do them. Come to think of it feel free to refactor the classes deriving from audioencoder to improve efficiency..
dimzon
25th January 2006, 14:49
use string path = Application.StartupPath; please.. and for such small things... just do them.
As I said before I just dosn't know - it's a bug or a feature. Using enviroment.CurrentDirectory allows to use multiple MeGUI settings set using different startup folders ;)
By the way - what about my proposal about IAudioSettingsProvider in ComboBox? It will reduce code complexity a lot.
@All Devs (incl Doom9)
Don't get me wrong, I'm looking @ current sources and I have such proposal.
At first let's read such 3 truth:
Every encoder use AviSynth script as input - so we can encode only openable via AviSynth sources
Now MeGUI contains good AVS wrapper with rich diagnostic capabilities
AVS wrapper can parse avisynth scripts from string (you doesn't need temporaly files anymore)
According this staments i propose to remove such unnecesary code from MeGUI. At first I must say - I know You spent time to write it and You are proud by it (and You have a reason to be proud of it bcz PInvoke code sometimes is not easy). But removing such code allows us to simplify MeGUI and improve code maintenance. Less lines of code - less amount of bugs, is'nt it?
So I propose to remove such code:
AviReader.cs - actually we does not need it, AvsReader works fine. Even if you need to open non avisynth file you can use "AviFile(fileName)" without creating temporaly file
DirectShow.cs - now we can just use "DirectShowSource(fileName)"
d2vReader.cs - now we can just use "LoadPlugin(...)\r\nMpeg2Source(fileName)"
dimzon
25th January 2006, 15:30
0.2.3.2048 25 Jan 2006
Commit by dimzon:
- fixed improper path detection when running MeGUI from commandline
- add support for improved accuracy for audio processing via AviSynth
- workaround bug (noise @ the beginning) when using normalization for 16 bit audio
(now if AutoGain is checked 32bit transformation is forced )
klicker4546
25th January 2006, 16:01
Hi dimzon,
is there any guide for the audio processing via Avisynth within MeGUI? I guess I will need behappy to make it work. But how??? :confused:
0.2.3.2048 25 Jan 2006
Commit by dimzon:
- fixed improper path detection when running MeGUI from commandline
- add support for improved accuracy for audio processing via AviSynth
- workaround bug (noise @ the beginning) when using normalization for 16 bit audio
(now if AutoGain is checked 32bit transformation is forced )
Doom9
25th January 2006, 16:03
is there any guide for the audio processing via Avisynth within MeGUI? I guess I will need behappy to make it work. But how???Actually.. just drag & drop an audio file into megui, select the codec, configure the codec.. and suddenly it will become clear ;) Trying just once never hurts.. and this is a thread for developers...
klicker4546
25th January 2006, 16:15
Thanks for your reply Doom9. I've already tried it, without success. That's why
I was asking. I will ask in another thread then. Sorry!
Actually.. just drag & drop an audio file into megui, select the codec, configure the codec.. and suddenly it will become clear ;) Trying just once never hurts.. and this is a thread for developers...
dimzon
25th January 2006, 17:16
Now you could go all the way and change the input checking prior to encoding to make use of it and even check for YV12 input and give the user a specific warning about the colorspace if it doesn't match the one required...
Maybe better way is to patch x264 and xvid_encraw to invoke ConvertToYV12 if colorspace doesn't match the one required?
if (!inf.IsYV12() )
{
res = env->Invoke("ConvertToYV12", AVSValue(&res, 1));
}
Easy, isn't it?
Doom9
25th January 2006, 17:18
well.. considering how many times the error has come up and nothing had been done I doubt there ever will.. we should proceed under the assumption that encoders stay the way they are, and editing and reloading the avs input file.. that's not really the job of an encoder.
dimzon
25th January 2006, 17:27
we should proceed under the assumption that encoders stay the way they are
It means nobody ask encoder developers to add such workaround. It's really easy and costs approx. 5 lines of code in C++ and 10 minutes of time. I can do it myself, just need access to encoder sources ;)
really, it encoder reques avs with yv12 support it means encoder are working with avs via avisynth.dll (there are no other way to get yv12 from it, AviFile32 API performs RGB24 conversion). In this case is pretty easy to invoke additional AviSynth function like ConvertToYV12()...
pest
25th January 2006, 17:47
2 all devs
found such code:
// Directshowsource needs the FPS information to be supplied.
// Without a lot of restructuring of code this is the best way of finding the FPS
// If anyone knows a better way of obtaining Framerate info, change this.
AVIReader reader;
try
{
reader = new AVIReader(fileName);
}
catch (Exception) // Some files can't render because you have no VfW codec (like DV sources)
{
reader = null;
}
AFAIK DiresctShowSource reques explicit fps information in very rare cases. And can't believe AVIFile32 API can return fps for such rare cases at all (AFAIK it even can't read such files)
Correct me if I'm wrong, please! I'm suggesting to remove this code!
Why 2 local objects?
AVIReader *reader=new AVIReader(fileName);
if (!reader) blahblah
dimzon
25th January 2006, 17:50
Why 2 local objects?
AVIReader *reader=new AVIReader(fileName);
if (!reader) blahblah
Sorry, don't understand Your post at all
Mutant_Fruit
25th January 2006, 18:01
I wrote that particular piece of code as DirectShowSource wasn't loading my AVI files at all. It needed me to pass the FPS parameter to it before it would load my AVI files. I can guarantee no-one else spotted this problem before i added that code because the AVS generation was broken in MeGUI for AVI sources, and i only encountered the FPS problem after i fixed the AVS generation for AVI sources.
What do you mean by two local objects? There's only one reader there...
dimzon
25th January 2006, 18:09
I wrote that particular piece of code as DirectShowSource wasn't loading my AVI files at all.
Can you provide me sample AVI file (upload it to mytempdir.com in 7z, max 10-20 MB)
Thanx!
pest
25th January 2006, 18:11
Ups, I forgot you where using C#, perhaps its different than in C++
AVIReader reader;
creates a local object
reader = new AVIReader
creates a reference to a local Object-Pointer
Sorry to confuse you. If your code would create 2 Instances
it wouldn't compile anyway
<- never trys to understand C#
stax76
25th January 2006, 18:43
AVIReader reader;
try
{
reader = new AVIReader(fileName);
}
catch (Exception) // Some files can't render because you have no VfW codec (like DV sources)
{
reader = null;
}
Please note that if a exception is thrown in the ctor no instance is created and reader will stay null.
@pest
Yes, .NET is different. ;)
berrinam
25th January 2006, 22:28
To all devs:
Make more use of "Don't show me this again" in dialogs.
Description: See http://forum.doom9.org/showthread.php?p=772750#post772750
Status: Pending Doom9's approval.
I posted that at the beginning of the Feature Request thread. It's not so much of a feature that can be implemented in one go, because it is really something that should be in every dev's mind while coding. MeGUI is all set up to support these, so people just need to use them.
Also, I think it would generally be a good idea to look at the first post of the Feature Request thread, as there are quite a few new requests (mostly from me), once Doom9 approves them.
berrinam
25th January 2006, 22:43
0.2.3.2049 25 Jan 2006
Commit by berrinam:
-Made the error messages shown for AviSynth more specific
-Drag'n'drop handling starts in a new thread, preventing the window where the drag started from freezing
berrinam
25th January 2006, 22:50
@dimzon: I'm going to put some notes about AviSynth audio encoding on the MeGUI guide. In what situation would someone want to use 'force decoding via directshow'?
berrinam
25th January 2006, 23:09
No-one's made a file release on SourceForge for over a week.
1. Can someone do that.
2. dimzon, can you tell us more about the build facility on SF? I couldn't find anything about it.
Mutant_Fruit
25th January 2006, 23:45
Can you provide me sample AVI file (upload it to mytempdir.com in 7z, max 10-20 MB)
Thanx!
For some strange reason, all the avi's that i threw up the error unless i had the FPS parameter are now working fine without passing the FPS parameter. I assume it must have something to do with my directshow filters... since i created that patch i have reinstalled and deinstalled quite a few filters and parsers as part of a project i'm doing in college.
I suppose that that makes my little addition redundant. I'll investigate further and see if i can figure out why i got the FPS error. But for the moment, i think its looking like that bit of code is just a waste of CPU cycles.
EDIT: Just a heads up, i'm finishing off a report for college, so i should be back into coding again by saturday. So if someone wants to grab the bitrate calculator before then, feel free. Otherwise i'll take a look at it on saturday.
berrinam
26th January 2006, 00:39
0.2.3.2050 26 Jan 2006
Commit by berrinam:
-Fix the MeGUI crash when auto-loading wavs after DGIndexing
-Fix the error when selecting multiple chained jobs and pressing delete
berrinam
26th January 2006, 01:18
It means nobody ask encoder developers to add such workaround. It's really easy and costs approx. 5 lines of code in C++ and 10 minutes of time. I can do it myself, just need access to encoder sources ;)
You can get the x264 sourcecode with SVN:
svn co svn://svn.videolan.org/x264/trunk x264
(from http://developers.videolan.org/x264.html)
However, it may not be such a good idea to add ConvertToYV12 silently, because it means that AviSynth error clips will also be encoded without realising it. In my opinion, a better idea would be for MeGUI to check the colorspace before it sends it to the encoder (I mentioned that here: http://forum.doom9.org/showthread.php?p=772747#post772747), because it should be the GUI's job. If someone knows enough to use the commandline, they will know what a colorspace error is, and they will prefer to know about it, so that they can fix it in a (perhaps) better way than simply converttoyv12.
Inc
26th January 2006, 09:26
AviFile32 API performs RGB24 conversion
Not at all, it depends on how you set up the decompression in AVIStreamGetFrameOpen().
Here a piece of code
BITMAPINFOHEADER bih;
ZeroMemory(&bih, sizeof(BITMAPINFOHEADER));
bih.biBitCount=24; //24 bit per pixel
bih.biClrImportant=0;
bih.biClrUsed = 0;
bih.biCompression = BI_RGB;
bih.biPlanes = 1;
bih.biSize = 40;
bih.biXPelsPerMeter = 0;
bih.biYPelsPerMeter = 0;
//calculate total size of RGBQUAD scanlines (DWORD aligned)
bih.biSizeImage = (((bih.biWidth * 3) + 3) & 0xFFFC) * bih.biHeight ;
PGETFRAME pFrame;
// Let the Handler decide which Colorspace matches best your display:
pFrame=AVIStreamGetFrameOpen(pStream, AVIGETFRAMEF_BESTDISPLAYFMT);
// Or do force the decompressor to use the Cspace as given in the bih above:
pFrame=AVIStreamGetFrameOpen(pStream, &bih);
So If yot want to keep a YV12 as YV12 to serve it to an encoder, just apply to bih a BITMAPINFOHEADER Structure for RAW YV12 decompression or to whatever Cspace you want the stream decompressed to.
This weekend Ill add to the AvsRedirect/AvsWrapper some calls to avs's streamdetection (cspace etc etc etc).
Btw. In the avs_openscript command I did implement a routine so you can force the outputted Cspace via a simple String ("YV12","YUY2", "RGB24", "RGB32"). So depending on the encoder the user choosed you can force in MeGUI to serve the encoders native Cspace.
Doom9
26th January 2006, 11:15
In my opinion, a better idea would be for MeGUI to check the colorspace before it sends it to the encoder I fully agree with that. If using the avisynth script creator, we should do the conversion automatically. In addition, the encoder should check the colorspace before encoding and raise an error in case it's the wrong colorspace. When we make the script creator automatically put the proper commands in the script, the only reason why an error would be raised would be if the user created his own avs script.. I think it's reasonable to expect those people to understand if we write "your avisynth script does not output YV12, please change your script accordingly" to the log.
Inc
26th January 2006, 11:46
Not shure, but AFAIK also Qenc.'s avs script input parser automatically adds an ConverttoYV12() if the incoming script doesn't result in a YV12 Cspace.
dimzon
26th January 2006, 11:51
@dimzon: I'm going to put some notes about AviSynth audio encoding on the MeGUI guide. In what situation would someone want to use 'force decoding via directshow'?
By default MeGUI trying to use MPASource for mpeg audio, NicAc3Source for ac3, NicDtsSource for dts, WAVSource for wav, Import for AVS and DirectShowSource otherwise. Checking 'force decoding via directshow' will switch to DirectShowSource for any file (including MP3, AC3 etc). It can be used for advanced audio processing (using FFDSHOW) for example. Another usecase if AviSynth Source Plugin is buggy but you still able to play source file via DirectShow - you can switch to DirectShow for decoding
Actually, it *should* pick up wav audio, too:
if (file.IndexOf(trackNumber) != -1 &&
(file.EndsWith(".ac3") ||
file.EndsWith(".mp3") ||
file.EndsWith(".mp2") ||
file.EndsWith(".mpa") ||
file.EndsWith(".dts") ||
file.EndsWith(".wav"))) // It is the right track
{
audioFiles.Add(file);
}However, that code is case sensitive, which means it requires the extension to be in lower case (that's the bug).
2all devs!
I have found a huge amount of such extension-checking code spreaded by the sources. I propose such replacement for it:
// In some utrility class
public static string[] ListOfAudioExtensions = new string[]{".mp3", ..., ".dts"}
public static bool HasExtension(string fileName, string[] ExtensionList)
{
...
}
//Using
if(Utility.HasExtension(file, Utility.ListOfAudioExtensions))
{
...
}
No-one's made a file release on SourceForge for over a week.
1. Can someone do that.
2. dimzon, can you tell us more about the build facility on SF? I couldn't find anything about it.
http://sourceforge.net/docs/compile_farm
Unfortunally there no Win32 support ATM :scared:
I fully agree with that. If using the avisynth script creator, we should do the conversion automatically.
Ok. Since x264 use AVIFile32 API we have not another choice...
kritip
26th January 2006, 13:28
Unfortunally there no Win32 support ATM :scared:
I didn't read the whole article, but couldn't one of the x86 machine, if its running gcc, just cross compile for win32, pretty sure gcc can do that. Wether you can on the sourceforge system is another matter though.
KriTip
dimzon
26th January 2006, 13:49
I didn't read the whole article, but couldn't one of the x86 machine, if its running gcc, just cross compile for win32, pretty sure gcc can do that. Wether you can on the sourceforge system is another matter though.
KriTip
Unfortunally there are not .NET 2.0 support for non Win32 (AFAIK Mono implements 1.1 only)
Doom9
26th January 2006, 13:50
since when can gcc handle c# and windows .net libs?
I got a PM this morning from somebody willing to volunteer to do the build stuff.. the question is how we get the sources to him and where we publish the builds. I suppose there's some webadmin function on sourceforge so the releases could probably be put on the webspace that's currently not in use.. but what about the sources considering the anonymous CVS is down half the time? Is there any automatic source export.. like press a button and get a zip file with the latest CVS checkout?
Doom9
26th January 2006, 13:52
I have found a huge amount of such extension-checking code spreaded by the sources. I propose such replacement for it:The problem with that is.. often these checks go only over a limited amount of extensions.. as in "if it's .mp3 or .ac3 you can put it into avi.. if it's anything else you cannog", and "if it's .aac or .mp4 you can put it into mp4, otherwise not".
kritip
26th January 2006, 13:52
please delete this post
kritip
26th January 2006, 13:52
Indeed your both correct :) I'll shut up from now on ;)
KriTip
berrinam
26th January 2006, 13:55
since when can gcc handle c# and windows .net libs?
I got a PM this morning from somebody willing to volunteer to do the build stuff.. the question is how we get the sources to him and where we publish the builds. I suppose there's some webadmin function on sourceforge so the releases could probably be put on the webspace that's currently not in use.. but what about the sources considering the anonymous CVS is down half the time? Is there any automatic source export.. like press a button and get a zip file with the latest CVS checkout?
I'm pretty sure that you can grant someone developer read-only CVS access. If you register them as part of the project, then wouldn't that be a solution?
dimzon
26th January 2006, 13:56
0.2.3.2051 26 Jan 2006
Commit by dimzon
-Rewritten AvisynthWrapper.dll (now it will be more friendly with multithread code)
-Rewritten AvisynthWrapper.cs (to use new API from AvisynthWrapper.dll)
The problem with that is.. often these checks go only over a limited amount of extensions.. as in "if it's .mp3 or .ac3 you can put it into avi.. if it's anything else you cannog", and "if it's .aac or .mp4 you can put it into mp4, otherwise not".
ListOfAllAudioExtensions = new string[]{...}
ListOfAudioInAviExtenssions = new string[]{"mp3","ac3"}
ListOfAudioInMp4Extenssions = new string[]{"aac","mp4","m4a"}
e.t.c.
the main goal is to collect all of supported extensions in just one place
Doom9
26th January 2006, 14:24
If you register them as part of the project, then wouldn't that be a solution?If that is possible, then it would indeed be a solution.
the main goal is to collect all of supported extensions in just one placeIt may only be a stopgap solution (in the end, wouldn't it be convenient when needed, the app could ask for Muxer.getMuxer(MuxType), and then do a Muxer.getSupportedExtensions, or Muxer.IsInputSupported.
Keep in mind though, since code is replicated in so many places.. there's a lot of testing you will have to do to make sure your changes don't break anything anywhere.
dimzon
26th January 2006, 14:38
(in the end, wouldn't it be convenient when needed, the app could ask for Muxer.getMuxer(MuxType), and then do a Muxer.getSupportedExtensions, or Muxer.IsInputSupported.
Yes, this is definitly right solution.
Dear Doom9, I still waiting your answers by my questions and proposals.
Richard Berg
26th January 2006, 15:21
I'm pretty sure that you can grant someone developer read-only CVS access. If you register them as part of the project, then wouldn't that be a solution?
Project admins can configure who has what kind of CVS access. If you do this, please add me too -- anonymous CVS sux ;)
Doom9
26th January 2006, 15:24
So I propose to remove such code:
* AviReader.cs - actually we does not need it, AvsReader works fine. Even if you need to open non avisynth file you can use "AviFile(fileName)" without creating temporaly file
* DirectShow.cs - now we can just use "DirectShowSource(fileName)"
* d2vReader.cs - now we can just use "LoadPlugin(...)\r\nMpeg2Source(fileName)"
Isn't AviReader already not in use anymore? If so it would only make sense to remove it. But keep in mind, I want that YV12 warning message before that.. it's way more important than cleaning up.. cleaning up only helps developers.. colorspace checking helps the user.
I can't comment on the DirectShow.cs file.. I don't know where it's being used and I've never even taken a look at what's inside.
As far as the d2vreader goes.. it's not done by switching a few statements.. the preview is closely connected to the reader so I have my reservations.. and come to think of it.. we get the DAR from the d2v.. you can't get that from AviSynth, can you? If you load the d2v via AviSynth, your 720x576 input becomes a 1:1 DAR.. you don't know whether it's a 4:3 or 16:9 source anymore, and that information is quite crucial, and you can't get it anywhere else reliably (keep in mind, we don't always have the info file and the info file only applies to one click mode.. not the avisynth script creator). So effectively, by eliminating the d2v reader, you introduce another manual step: DAR selection.. and since people don't have to run dgindex manually, they never get to see that.. so effectively either they know themselves, or they get the info from a tool that displays it.
Richard Berg
26th January 2006, 15:32
Being able to read d2v's shouldn't be cut. In addition to Doom9's point, we need the info in them in order to give the user helpful error messages. For instance, a very common problem is that d2v's hardcode the full path and don't work with relative paths. Simple for MeGUI to read the full path & check for file existence; hard for the user to debug without help.
dimzon
26th January 2006, 15:45
we get the DAR from the d2v.. you can't get that from AviSynth, can you?
Really d2vReader contains 2 independend blocks of code
1) PInvoke around DGDec.dll (it's really buggy, i got GPF @ trying to open d2v created by older version on DGIndex. AviSynth in other hand provide valid diagnostic message)
2) Direct d2v parsing via opening text stream
I suggest to remove PInvoke around DGDec.dll and replace it to AviSynth invocation... Or, maybe, better way is to move d2v parsing code into separate class d2vParser (bcz I found some code with direct d2v parsing, we can collect all related code in d2vParser) - and remove d2vReader at all and use AvsReader when you need video frame from it ;)
AviReader.cs used in some place to get FPS to provide it to DirectShowSource
http://forum.doom9.org/showthread.php?p=774773#post774773
So I waiting for sample AVI files from Mutant_Fruit
http://forum.doom9.org/showthread.php?p=774888#post774888
DirectShow.cs used to try to construct FilterGraph to know - is it possible to open file via DirectShowSource or not. I suggest trying "DirectShowSource(fileName)" is enought now to get a valid diagnostics
dimzon
26th January 2006, 15:49
But keep in mind, I want that YV12 warning message before that..
Can you write which message text I must write for it (my english is poor so provide me this message)?
Doom9
26th January 2006, 16:03
Your video source uses the {0} colorspace. Video encoding requires the YV12 colorspace. Add ConvertToYV12() at the end of your AviSynth script and try again.
{0} is the actual colorspace of the video.
dimzon
26th January 2006, 17:13
0.2.3.2052 26 Jan 2006
Commit by dimzon
-Removed AVIReader (now everything is made via AvsReader)
-Small bugfix opening Script Creator window
dimzon
26th January 2006, 18:23
0.2.3.2053 26 Jan 2006
Commit by dimzon
-AviSynth wrapper now returns information about source colorspace && audio sampletype
dimzon
26th January 2006, 18:25
@Doom9
Dear Doom9, please take look @ AvisynthWrapper.cs && AvsReader.cs
Maybe it's better to merge AviSynthClip && AvsReader to one class (AvsReader)
Inc
26th January 2006, 19:06
0.2.3.2053 26 Jan 2006
Commit by dimzon
-AviSynth wrapper now returns information about source colorspace && audio sampletype
do you mean the dll itself? That was already given ....
typedef struct AVSDLLVideoInfo {
// Video
int width;
int height;
int raten;
int rated;
int aspectn;
int aspectd;
int interlaced_frame;
int top_field_first;
int num_frames;
int pixel_type; // <-----------------
// Audio
int audio_samples_per_second;
int sample_type; // <-----------------
int nchannels;
int num_audio_frames;
int64_t num_audio_samples;
} AVSDLLVideoInfo;
dimzon
26th January 2006, 19:13
do you mean the dll itself? That was already given ....
I mean my avisynthwrapper.dll now provide both before/after conversion. So you can open script forcing RGB24 but will obtain information about original colorspace
Dayvon
26th January 2006, 19:30
Not to spam your thread or anything, but I just wanted to thank you MeGUI dev's. I just got done backing-up/encoding the Band of Brothers series, and your utility worked perfectly. More no hassle rendering than I've done in a long time. Thanks for your hard work, and great GUI!!
Dave
berrinam
26th January 2006, 21:26
Your video source uses the {0} colorspace. Video encoding requires the YV12 colorspace. Add ConvertToYV12() at the end of your AviSynth script and try again.
{0} is the actual colorspace of the video.
What about asking 'Do you want me to fix this up by adding ConvertToYV12() to the end of the script'?
Doom9
26th January 2006, 21:30
well.. I had that part typed out, then I somehow moved away, and once again coming back my text was gone.. thus the shorter message.. yes, having a dialog which would offer the automatic adding would be good, but then we also need the re-opening of the source
Inc
27th January 2006, 09:18
I mean my avisynthwrapper.dll now provide both before/after conversion. So you can open script forcing RGB24 but will obtain information about original colorspace
? That was alreay done as inf.pixel_type was taken from the original frame before forcing the conversion to RGB/YUY2/YV12
vi->pixel_type = inf.pixel_type
And the outgoing Cspace is determined by the Cspace requested in the avs_getvframe(....,....,"RGB") command.
I do think we should merge the project AvsRedirect and AvsWrapper as its getting confusing. If you have questions about whats integrated and what could be done better, lets do it together. ;)
dimzon
27th January 2006, 11:45
What about asking 'Do you want me to fix this up by adding ConvertToYV12() to the end of the script'?
How does you want to patch such script
blablabla
blablabla
blablabla
return last
blablabla
blablabla
blablabla
blablabla
I propose a little another method. Let's create additional avs @ same path:
filename = <originalFileName>.ConvertToYV12.avs
Import(<originalFileName>).ConvertToYV12()
we can do it automatically for every script ;) (even without colorspace checking)
dimzon
27th January 2006, 11:48
? That was alreay done as inf.pixel_type was taken from the original frame before forcing the conversion to RGB/YUY2/YV12
vi->pixel_type = inf.pixel_type
And the outgoing Cspace is determined by the Cspace requested in the avs_getvframe(....,....,"RGB") command.
avisynthWrapepr returns both - original && forced pixel type
I do think we should merge the project AvsRedirect and AvsWrapper as its getting confusing. If you have questions about whats integrated and what could be done better, lets do it together. ;)
No. I have branch it to avoid any backward-compatibility support. It must work only with complimentary AvisynthWrapper.cs. You can use it's source code to merge parts back to AVSRedirect throught...
Inc
27th January 2006, 11:54
No. ...
You can use it's source code to merge parts back to AVSRedirect throught...
The source code, and main add ons are from new_avsRedirect.dll ;) So no need to merge things "back" ;)
however ....
berrinam
27th January 2006, 12:31
How does you want to patch such script
blablabla
blablabla
blablabla
return last
blablabla
blablabla
blablabla
blablabla
I see that a script like that could be a problem, but who really does that? There's not any point in writing return last in a script. If everything is in variables, then what you would do is just write the line "video", or whatever your variable-name is. The only appropriate place for return is in AviSynth functions. Also, why would you have more text after you have returned the video?
I propose a little another method. Let's create additional avs @ same path:
filename = <originalFileName>.ConvertToYV12.avs
Import(<originalFileName>).ConvertToYV12()
Is this really necessary? In my local implementation, it just appends ConvertToYV12() to the end of the script. It then checks if the modified script is fine, and if not, it tells the user, who can choose whether to abort. I agree, your method is guaranteed to work and might be a more elegant solution because of this, but:
1. It creates an extra file to be deleted, and the unexpecting user may be surprised to find two avisynth files where there should only be one. Which one should he/she choose?
2. It requires more code restructuring to handle the fact that there is ANOTHER file.
3. As I said above, that situation should never really arise, and my implementation will abort gracefully in this situation: telling the user that appending converttoyv12 didn't work, and giving the user the option of aborting.
People who really know a lot about scripting will almost definitely not want the quick fix ConvertToYV12() at the end of the script, because, for most sources, it should have been YV12 in the first place, and so they will want to work out where the non-YV12 colorspace came from. I think it is only these people who will be writing the scripts with return last in them.
we can do it automatically for every script ;) (even without colorspace checking)I think that shouldn't be done, because:
1. It adds additional pointless filters. Why slow the encoding down (even though not by much).
2. It will hide problems that the experienced AviSynth user will want to know about. If there is a conversion to RGB, these people won't want it hidden by a ConvertToYV12 at the end, because colorspace conversions cause quality loss.
Never-the-less, none of these points actually give much reason against either of our implementations, so let's see what Doom9 says.
dimzon
27th January 2006, 12:36
0.2.3.2054 27 Jan 2006
Commit by dimzon
-SourceDetector doesn't create temporaly AVS anymore
dimzon
27th January 2006, 12:41
I see that a script like that could be a problem, but who really does that?
I do ;)
Actually I usereturn last instead of commenting/removing rest lines of script. Such trick (return last) is not a good programming style for regular code but avisynth scripts is mostly temporaly (just encode and forget) so i prerer this way bcz it is faster ;)
berrinam
27th January 2006, 13:14
I still don't like this return last. As you said, it's not good programming style. Also, would you seriously just let MeGUI do your ConvertToYV12 wrapping? If you found out it isn't YV12, wouldn't you go: "Hang on a minute, what's up? My source should be YV12, so where's it been converted away from YV12? I better fix it up"
Ok, how about this: I'm just about to commit my version, which manages the "don't ask me again" dialogs as well as all the error messages. If Doom9 wants your way, then you just change the ConvertToYV12 section of the code. There are two places you should look at: JobUtil.prepareVideoJob, which calls the function VideoUtil.checkVideo(string)
berrinam
27th January 2006, 13:40
0.2.3.2055 27 Jan 2006
Commit by berrinam:
-Added video input checking (video exists, has no errors, colorspace==yv12, mod16) and warns the user
-Refactored dialogs, added MessageBoxEx reference, and removed MPEG2SourceChoice
-Removed OneClickDefaults.cs, OneClickDefaultWindow.cs/.resx
dimzon
27th January 2006, 13:48
0.2.3.2055 27 Jan 2006
Commit by berrinam:
-Added video input checking (video exists, has no errors, colorspace==yv12, mod16) and warns the user
-Refactored dialogs, added MessageBoxEx reference, and removed MPEG2SourceChoice
-Removed OneClickDefaults.cs, OneClickDefaultWindow.cs/.resx
AvsReader avi = AvsReader.OpenScriptFile(avsFile);
if (!avi.Clip.HasVideo)
return "AviSynth script has no video";
Take look @ AvsReader.OpenScriptFile first:
_enviroment = new AviSynthScriptEnvironment();
_clip = parse? _enviroment.ParseScript(script, AviSynthColorspace.RGB24) : _enviroment.OpenScriptFile(script, AviSynthColorspace.RGB24);
if (!_clip.HasVideo)
throw new ArgumentException("Script doesn't contain video");
Doom9
27th January 2006, 13:55
If Doom9 wants your way, then you just change the ConvertToYV12 section of the code. There are two places you should look at: JobUtil.prepareVideoJob, which calls the function VideoUtil.checkVideo(string)I don't think such breakout scripts should be of our concern.. those who write advanced scripts should be knowledgeable enough to figure out what can go wrong.. our main concern has to be making things work for the users that have very little or no AviSynth knowledge at all.
@dimzon: why do you use _ prefixes for variable names when the rest of the project uses no such thing? It's breaking with style. I generally like to use the java style notation (somevariablename becomes someVariableName.. first letter small, subsequent letters at positions where a word could be separated in capital letters). I know I'm not being consistent but I think considering that so many people are working on this now, we really should strive to be consistent throughout the code. The same goes for comments.. every method should have one (once again I've been too lazy in the past), and I'm also no fan of the whole if something ? then : else notation.. it makes a program harder to read, and forces you to read the entire line, then hammer out the logic in your head rather than just read over the if and know what it's all about.
dimzon
27th January 2006, 14:31
why do you use _ prefixes for variable names when the rest of the project uses no such thing?
first of all - unfortunally MeGUI project doesn't have consustent style across it' sources at all
second - AFAIK Java has not fixed (only one style applicable) notation
third - I'm using Microsoft-proposed style.
this means:
all nonpublic fields must start with _ (private int _someInt)
all nonpublic methods must have lowercase fiirst char (private int someInt() )
all public methods must have upper case first char (public int SomeInt() )
its really usefull notation: looking @ such code
_script = generateScript(val);
Start();
You can say:
_script is protected field, Start() is public and generateScript is protected method without looking @ definition.
But if You don't like this stye feel free to change it using Refactoring features of VS2005 (right click on name and choose Refactor->Rename)
The same goes for comments.. every method should have one
It's my fault. Unfortunally my english is poor so I believe reading source will give you better infotmation against reading comments.
and I'm also no fan of the whole if something ? then : else notation.. it makes a program harder to read, and forces you to read the entire line, then hammer out the logic in your head rather than just read over the if and know what it's all about.
Agreed, sometimes it's harder to read then if/else...
Doom9
27th January 2006, 14:43
all nonpublic fields must start with _ (private int _someInt)But Microsoft also suggests the use of properties for publicly accessible variables.. thus you can use what you're using for methods and transfer it directly to variables. Any variablename starting with a lowercase letter is private, anything that's exposed is a property which has the same name but starts with a capital letter. I think I've been following that style pretty closely where variables are concerned.
However, I don't quite see the necessity to see the difference.. if you're working "inside" the class.. you don't really care whether a method is public or not. If you're working "outside" the class.. if it's private you won't even get to see it.. plus then there are the protected and internal intricacies that you can cover with changing just one letter. If working "outside" a class, if intellisense doesn't pick up a method name you know is there.. you have to go back and change the access modifier anyway.
Come to think of it.. iirc most samples I've seen using the _ notation were done by programmers coming from a language that doesn't have properties and doesn't commonly work with setters/getters. I'm not used to seeing _ in variable names in msdn samples (for C# of course)
dimzon
27th January 2006, 15:31
if you're working "inside" the class.. you don't really care whether a method is public or not.
When I'm looking @ ugly code insude class can say - ok, this method use only nonpublic features, I can refactor it ;)
Come to think of it.. iirc most samples I've seen using the _ notation were done by programmers coming from a language that doesn't have properties and doesn't commonly work with setters/getters. I'm not used to seeing _ in variable names in msdn samples (for C# of course)
http://www.akadia.com/services/naming_conventions.html
http://dotnet.mvps.org/dotnet/faqs/?id=namingconventions&lang=en
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconnamingguidelines.asp
dimzon
27th January 2006, 15:46
added MessageBoxEx reference
What is MessageBoxExLib.dll ?
Where I can find it's source code?
Doom9
27th January 2006, 15:46
Your last link, the official guidelines is very enlightening. It suggests the use of the camel notation for protected fields and method parameters, and discourages the use of public fields (instead it suggest properties just like I've been using, and the use of the pascal notation)
Basically the only difference is in terms of method names, where I've always been using camel notation (which is how I was taught to code in Java).
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconcapitalizationstyles.asp[
When I'm looking @ ugly code insude class can say - ok, this method use only nonpublic features, I can refactor it What do we have refactor tools for? So that they help when you refactor a method that could have an influence on others ;) I saw nothing on the MSDN .NET coding guidelines about prepending _ for private variables and use of capital letters for methods only if they're public. Since those are guidelines for creating class libraries, it wouldn't make a whole lot of sense to come up with guidelines for how you handle things internally.
I don't mind much using capitalization to differ between exposed and non exposed methods, but it's already inconsistent (the guidelines suggest to use camel notation for protected variables.. versus pascal for all (and thus also protected) methods).
The articles you linked to also contradict each other (e.g. Microsoft says no to Hungarian notation, http://www.akadia.com/services/naming_conventions.html suggests it for protected variables). Since IDEs tell you what type a variable is if you hover over it, and also tell you once you start typing and get to chose from the available variables, I don't see the point of hungarian notation at all, and they even use it inconsistently (no hungarian for OleDBConnection? and then there are probably a hundred more exceptions).
dimzon
27th January 2006, 15:53
Your last link, the official guidelines is very enlightening. It suggests the use of the camel notation for protected fields and method parameters, and discourages the use of public fields (instead it suggest properties just like I've been using, and the use of the pascal notation)
Basically the only difference is in terms of method names, where I've always been using camel notation (which is how I was taught to code in Java).
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconcapitalizationstyles.asp[
As I said - it's easy to convert one style to another via Refactoring features from VS2005. Unfortunally VS2005 ignores code blocks in inactive CC blocks. That's a reason why I'm agains conditional compilation! By the way - what is Your desision about it (seem's like MeGUI full wins 3:1 )
http://forum.doom9.org/showthread.php?t=105776
dimzon
27th January 2006, 16:07
Yet another reason why i prefer underscope for nonpublic fields:
private string avsScript;
public Init(string avsScript)
{
avsScript = avsScript; // won't work
this.avsScript = avsScript; // will work;
}
compare it to:
private string _avsScript;
public Init(string avsScript)
{
_avsScript = avsScript; // will work
this._avsScript = avsScript; // will work;
}
and when you looking @ method implementation you can't tell exatly - is you accessing to methid argument or private field until you scroll up && look @ method definition
Doom9
27th January 2006, 16:14
why on earth would it matter whether this.avsScript is protected or private (keep in mind.. MS suggests avsScript in case of a protected class variable). _variable looks butt-ugly.. I don't consider myself to put much weight on appearances but I do seem to have a strong opposition to code I think looks ugly.
what is Your desision about it (seem's like MeGUI full wins 3:1 ) I still like the stripped down edition.. it was created for a reason and that's getting people on the hook even if they're just looking for a tool do to video encoding.. then you offer the easy upgrade path to a much more extensive functionality so it's easier to get the cautious people onboard.
ChronoCross
27th January 2006, 16:38
If I remember correctly the _privateVariable was originally implemented in C. it's the style that most of the older professors I take use. it's what I've been taught to use for C. But for java and C++ I simply use lowercase of the first word uppercase of the second.
Doom9
27th January 2006, 16:53
How about this:
Use properties for all variables that are externally exposed (including protected, unlike what MS says - they suggest camel notation which is inconsistent with the suggestion of pascal for all exposed methods), and use pascal notation for those (as MS suggests for properties). Use pascal notation for all publicly exposed methods (as MS suggests). Use camel notation for any non exposed method and variables. That's fully consistent and pretty.
So we'd have
private int myPublicExposedVariable, myProtectedExposedVariable2, myPrivateVariable;
protected MyPublicExposedVariable{...}
public MyProtectedExposedVariable{..}
public MyMethod(int someParameter)
{
this.myPrivateVariable = someParameter;
}
myPrivateMethod(int myPrivateVariable)
{
this.myPrivateVariable = myPrivateVariable;
}
I don't think this.myPrivateVariable = myPrivateVariable is a problem... on the contrary.. it forces you to think a little when you name method parameters the same as class variables.
dimzon
27th January 2006, 17:07
I don't think this.myPrivateVariable = myPrivateVariable is a problem... on the contrary.. it forces you to think a little when you name method parameters the same as class variables.
this will works while you are writing code from the scratch. But if You are changing non your code or refactoring it it's easy to make a mistake...
Thats why I strongly prefer _ pefix for private fields (please, stop name it variables, it's not variables but fields)
dimzon
27th January 2006, 17:09
@By the way - seems like we have something like flamewar now ;)
Maybe we will stop it (as I said before it's esy to convert to another notation using VS2005 refactoring->rename feature) and switch to more meaningfull topic (ie - what to do next)
Doom9
27th January 2006, 17:30
as I said before it's esy to convert to another notation using VS2005 refactoring->rename featureBut there's no "switch to approved notation" refactoring so each variable will have to be changed.. so it's important we stop using different notations. The fact that large parts of the code were written by myself make this rather easy though.. it would be a major waste of time to change things.. so consider my examples above as the howto for any further changes. berrinam, who also added his own classes, also stuck to the same notation as I've been using as far as I can see.
And by the way, if you add an element in Visual Studio.. it's default accessor is private and it uses camel notation.. no _. So the _ prefixes are most definitely out.
In terms of where to go.. we need an as-is analysis.. compile a list of what we have in terms of job management and processing, and then design to to-be scenario. One crucial point will certainly be the mapping between the IDictionary containing the jobs and the GUI.
dimzon
27th January 2006, 18:01
But there's no "switch to doom9 approved notation" refactoring so each variable will have to be changed.. so it's important we stop using different notations.
Ok, throught I still doen't like private fields without _ ...
One crucial point will certainly be the mapping between the IDictionary containing the jobs and the GUI.
take look @ ListView.VirtualMode property - it's fine
By the way - I have small (approx 4 kb each) 16*16 icons - we can show them in Queue (red for error, green for complete etc)
Doom9
27th January 2006, 18:15
By the way - I have small (approx 4 kb each) 16*16 icons - we can show them in Queue (red for error, green for complete etc)Sounds like a good idea.. I don't think they can replace the status string but perhaps if added at the beginning they can give a quicker overview.
stax76
27th January 2006, 18:19
Every dev has his own style so the project initiator is in charge of enforcing a style. IIRC MS recommends camel case for fields but on the same time they recommend to access them using 'this' because otherwise there would be no destinction between fields and params.
public void SomeMethod()
{
m_someField = null; // IIRC ungarian notation / popular for C++, obsolete for .NET
_someField = null; // popular but like too many abbreviations not recommend for .NET, .NET code should be easy to read and look nice
someField = null; // not good because params use it too, IIRC used by SharpDevelop
SomeField = null; // my style, properties use PropName/PropNameValue pattern, IIRC MS code generators use it too!
this.someField = null; // recommend by MS but not very popular
}
dimzon
27th January 2006, 18:38
Sounds like a good idea.. I don't think they can replace the status string but perhaps if added at the beginning they can give a quicker overview.
http://www.mytempdir.com/413057
ChronoCross
27th January 2006, 18:41
this.someField is required when using Python. It's basically the main syntax when building classes. Else alot of the code won't work. but for a majority of people programming actual apps this isn't necessary cause python isn't used by companies.
Doom9
27th January 2006, 19:23
this.someField = null; // recommend by MS but not very popularI've started using it as well. In VS2k3, when you start typing, it doesn't show you local and global variables, hence I had to resort to typing this. to get a list of globals.. this is no longer the case with VS2k5 though.. it shows all the variables right away.
By the way, where the heck does "field" come from? I learned about methods and variables in college (and prior to OO programming, functions in Pascal in high school)
dimzon
27th January 2006, 19:29
By the way, where the heck does "field" come from? I learned about methods and variables in college (and prior to OO programming, functions in Pascal in high school)
this is oop term. You say structure fields, not structure variables, isn't it. Ad object is struct + methods...
dimzon
27th January 2006, 19:42
@Doom9
Why not to talk via ICQ?
Richard Berg
27th January 2006, 19:52
@Doom9 -- field : variable :: method : function
I hate _field personally. I only use _ for parameters to constructors:
public class MyClass
{
private int x, y;
// don't feel like making up another name (xParam? myX? xInput?)
// so I use _x
public MyClass(int _x)
{
this.x = _x;
}
public MyClass(int _x, int _y)
: this((_x + _y) / 2)
}
...and even that is just a C++ trick that's stuck with me...not condoned by the other C# guys I work with. (Initializer lists aren't as powerful in C#, though they're certainly "better" from an OO standpoint).
Everywhere else, _ is banished like ALLCAPS; both remind me of C/Win32 (ugh).
berrinam
27th January 2006, 23:16
Video cutting in the AviSynth creator for removal of ads, etc
Description: Since video and audio can be done through AviSynth cutting can be completely precise. Use should be done using the trim statement.
Status: No-one is working on this yet.I think Doom9 had some plans about this. Am I right, and if so, what were/are they?
Dayvon
28th January 2006, 00:46
Hey guys...
I was messing around in Paint Shop the other day, and I decided to make an icon for MeGUI. I use this dock thing and the default icon looks pretty boring so I made this thing up. I figured I'd let you guys have at it if you want, if not, then by all means it'll just be my personal MeGUI icon.
If you do like it however, you're totally free to use it. The fonts are freeware fonts, and the I have a higher resolution version if you want it. I tried to run with the same colors as Gordian Knot just for familiarities sake.
Anyway, I can't do code developing, but I can do this. So let me know what you think...
http://church.crossingatwoodland.com/ChurchFiles/SermonText/MeGUI2Icon.png
charleski
28th January 2006, 01:33
Sorry I haven't been around. Work has kept me off the net (unless I sign up for some costly coverage, to which I might succumb).
It's good that you're arguing about the whole private/public issue. My own take on it would be that readability is paramount - C sacrificed that a long time ago and C# is, in part, an attempt to make the language intelligible again. On that score, any extra characters, like '_' are a NO-NO, and need to be consigned to the dustbin along with *, ^, @ and their relatives. (Unfortunatley '@' still survives courtesy of the lingering evil of printf).
Prefix camel notation wins for a simple reason: a complete stranger can take a look at the code and work out what's going on (as long as they have the basic logical ability), without having to wonder if there's some arcane messaging that he/she is missing.
I spend enough of my professional life inwardly screaming at the problems junior (and often senior) docs have at providing properly intelligible message streams, so I'm sensitive to this :).
Mutant_Fruit
28th January 2006, 17:18
@dimzon:
What do you mean by this warning you put in:
#warning use Property pattern for this
if(player == null)
player = new Player();
What do you mean by Property Pattern?
Mutant_Fruit
28th January 2006, 17:52
Patch for the calculator up in SourceForge. Fixes quite a few bugs, increases max length to 24 hours, 59 mins, 59 secs (doesn't seem to have any reprecussions that i know of). Added DVD-9 as a destination medium.
Fixed a bug in the main form aswell when you tried to queue a job with no input selected.
berrinam
29th January 2006, 01:25
There's a discrepancy in AR handling between x264 and xvid and lavc ASP. x264 uses Sample Aspect Ratio, lavc ASP uses PAR, and xvid has to use a rounded version of PAR. I was going to suggest that MeGUI removes this discrepancy by modifying the SARX and SARY properties so that subclasses of VideoCodecSettings override them in the correct way. This would mean that every interface would just have to select the PAR (which seems more intuitive to me), and MeGUI would convert that into the correct format.
The problem is that the conversion requires knowledge of the videos resolution. As it is, the AR in MeGUI is all wrong, and the code is hard to manage. What do you suggest?
Kostarum Rex Persia
29th January 2006, 17:12
Peoples, can anyone post a link to newest build of MeGUI, 0.2.3.2055, because I can't find download link on the MeGUI official project page on SourceForge.
Thanks.
Doom9
29th January 2006, 17:37
look who's popping up on my radar the same day they got unsuspended. There's a sticky with a guide and a download link.
@berrinam: what's the diff between x264's SAR and lavc's PAR anyway? Isn't it the same (and by the same token the same as XviD's custom PAR option). Am I correct to assume that if custom PAR were implemented, the exact same code could be used?
SeeMoreDigital
29th January 2006, 17:48
@berrinam: what's the diff between x264's SAR and lavc's PAR anyway? Isn't it the same (and by the same token the same as XviD's custom PAR option). Am I correct to assume that if custom PAR were implemented, the exact same code could be used?Agreed... There's no difference as far as I have been able to determine ;)
stax76
29th January 2006, 18:00
@SeeMoreDigital
Thanks for clearing this, everytime I read terms like AR, PAR, SAR, DAR and the likes I feel a sudden headache.
SeeMoreDigital
29th January 2006, 18:10
You're not the only one :eek:
berrinam
29th January 2006, 22:25
Agreed... There's no difference as far as I have been able to determine ;)Well, when I was testing it out, I entered the same two numbers into lavc and x264 in MeGUI, and x264 was properly scaled, whereas lavc was not.....
I thought that lavc was Picture Aspect Ratio, or Display Aspect Ratio, whereas x264 was Sample Aspect Ratio. Perhaps I got incredibly confused, because it seems not to be working for me, although it does for everyone else....
Doom9
29th January 2006, 22:36
I've finally had a look at the sources to look for possible refactoring in the future, and made some (rather random) notes:
configAudioButton_Click -> explore possible simplifications
videoConfigButton_Click -> explore possible simplifications
difference between video and audio: for video there's but one settings object per codec, for audio the settings of a stream do not necessarily correspond to a settings object accessible via dropdowns
isFirstPass, verifyVideoSettings -> VideoUtil
verifyOutputFile -> jobUtil
verifyInputFile -> jobUtil
startEncoding -> jobUtil
startNextJobInQueue -> jobContainer
loadJobs -> jobContainer
getFreeJobNumber -> jobContainer
addJobToQueue -> ??
getVideoJobs, addVideoJob -> jobUtil
removeJobFromQueue -> jobContainer
ideas: automatic script checking upon opening even if preview is not being opened. store properties of the script right away
getAudioJob() -> move to another place
addVideoJob(bool autostart) -> move to another place
improve profile -> dropdown mapping
discard audio streams only when accessing the auto encoder -> the two audio streams are always accessible in the main gui
jobs should provide a means to get a string array with everything required to create a ListViewItem for the queue
Use ListViewItem.Tag to attach the job to the listviewitem
improve profile management.. attach profiles to dropdown in a way
move containment to a new ProfileManager
Other things I'd like to achieve: easy encoding for specific devices (like PSP, video iPod). In case of the PSP that will require running an additional job.
I also found that ffmpeg can mux raw avc into AVI and generally mux AVIs so I'll be using that as a muxer in the future (I haven't found the syntax for splitting yet). Would it perhaps make sense to use ffmpeg only for raw -> video avi and then use a tool like avimuxgui for muxing/splitting.. the advantage of that would be multiple audio tracks, splitting, more allowed input types. The downside is job generation that gets more complex.
I also think the automated job generation for video should look something like this: you send the I/O and configuration and the desired output type. The JobUtil has to ask the VideoEncoder if it can provide the output type. If not, it should return a list of alternatives. JobUtil would then ask the Muxer if it has a muxing path from one of the possible encoder outputs to the desired output types. If that's the case, a job of the desired type has to be created.
berrinam
30th January 2006, 06:55
Other things I'd like to achieve: easy encoding for specific devices (like PSP, video iPod). In case of the PSP that will require running an additional job.
Well, that's partly what I had in mind for the new types of profiles I added. Profiles could be made for these specific tasks, and distributed, just like Sharktooth's AVC video profiles.
I've made one according for the iPod to the arstechnica settings. I can't test this, as I don't have a video iPod, but I've attached the group of profiles so you can get an idea as to how they work.
While it would be possible to make a profile that works with PSP (restricting the width to 320 maximum), from what I've read, this wouldn't get the best out of the PSP, as it supports a maximum of 76800 (320x240), but they can be at different ratios, like 368x208. I can't see a way to make the current OneClick structure (I presume OneClick is the way to go if you want an easy way for the users) manage both. Perhaps it needs another way of signalling the resolution than just maximum width?
dimzon
30th January 2006, 11:13
I've finally had a look at the sources to look for possible refactoring in the future, and made some (rather random) notes
WOW! Seems like you change your mind :cool:
Perfectly!!!
By the way: what I can do now? I'm planning to write Cropping dialog (like one in VirtualDub) but I can switch to refactoring
What do you mean by Property Pattern?
Somethink like this (not shure yet)
private Player playerInstance;
private Player player
{
get
{
if(playerInstance==null)
playerInstance = new Player()
return playerInstance;
}
}
@Mutant_Fruit
I'm still waiting avi samples wich you are not able open via DirectShow without direct FPS specification
Inc
30th January 2006, 11:48
Well, when I was testing it out, I entered the same two numbers into lavc and x264 in MeGUI, and x264 was properly scaled, whereas lavc was not.....
I thought that lavc was Picture Aspect Ratio, or Display Aspect Ratio, whereas x264 was Sample Aspect Ratio. Perhaps I got incredibly confused, because it seems not to be working for me, although it does for everyone else....
Imho "Lavc" uses Aspect or AR (here DAR) and "x264" SAR (here PAR).
Doom9
30th January 2006, 11:54
I'm planning to write Cropping dialogUh, why is this necessary? We already have a video player that can do everything.. just showing the video, setting of intro end and credits start frames, zone management and even crop preview (keep in mind cropping is done via the AviSynth script creator window). Of course, we could have a BasePreview class, and subclasses that expose additional capabilities, but then we'd once again have to pick the proper class somewhere and end up needing a lot if/then/else or case statement.
@berrinam: couldn't we use the level enforcement to adjust the resolution for the PSP? That should take AR into account and thus always result in the optimal resolution. It only gets complicated if we move outside the one click domain.. e.g. having a "PSP" and "iPod" checkbox in the AviSynth script creator..
berrinam
30th January 2006, 11:58
@berrinam: couldn't we use the level enforcement to adjust the resolution for the PSP? That should take AR into account and thus always result in the optimal resolution. It only gets complicated if we move outside the one click domain.. e.g. having a "PSP" and "iPod" checkbox in the AviSynth script creator..I thought of that, but there's no suitable level: http://forum.doom9.org/showthread.php?t=101345
Level 1.2 doesn't allow 320x240 at 29.97, and Level 1.3 allows up to 352x288, which is too high.
Imho "Lavc" uses Aspect or AR (here DAR) and "x264" SAR (here PAR).
I've given up trying to work out what the situation with all of the various ARs is. There is more about it here: http://forum.doom9.org/showthread.php?t=105809, where some people say they've had no problems with MeGUI's AR handling, and others say it is useless. I remember that when I did AR signalling for OneClick, I tried it out and it worked on my samples. I have no idea what the current situation is now, and no-oen seems to agree with anyone else.
dimzon
30th January 2006, 12:06
keep in mind cropping is done via the AviSynth script creator window
it means i need to set crop values and open file in preview to see - does I perform proper cropping or not and return to AviSynth creator window again and fix croppping values if not etc...
And I want to do something like this:
http://img89.imageshack.us/img89/7026/untitled5uc.jpg
berrinam
30th January 2006, 12:09
it means i need to set crop values and open file in preview to see - does I perform proper cropping or not and return to AviSynth creator window again and fix croppping values if not etc...Huh? It automatically opens a preview window that updates as you change the cropping values.
Inc
30th January 2006, 12:17
My next step is to include an auto-cropper code based on a border luma threshold and an individual count of samples to be parsed to the new avsredirect.dll, so Dimzon could merge that future piece of c++ code to his AvsWrapper which is used in MeGui. Also it would be imho helpful to build a dll from PARanoias internal resize routines so that feature also could be used in MeGUI.
I've given up trying to work out what the situation with all of the various ARs is. There is more about it here: http://forum.doom9.org/showthread.php?t=105809, where some people say they've had no problems with MeGUI's AR handling, and others say it is useless. I remember that when I did AR signalling for OneClick, I tried it out and it worked on my samples. I have no idea what the current situation is now, and no-oen seems to agree with anyone else.
There are only a few things I have to know:
As I catched in here that PAR equals to SAR, then the values could be easely calculated, BUT! Maybe Im wrong as I also heared that the PAR values should be vice versa if using as SAR? Like 128/117 in PAR is 117/128 in SAR mode ?
Also how does x264's decoder show the image when using a non 1:1 SAR? Means will the image resized in the decoder correctly to its final state by resizing the height or the width?
In PAL a 720x576 should later be shown as 788x576 (1:1) for example.
dimzon
30th January 2006, 12:44
Huh? It automatically opens a preview window that updates as you change the cropping values.
Anyway i think VirtualDub - like window is much more comfortable (you can drag cutting lines with mouse)
Doom9
30th January 2006, 12:46
@dimzon: as berrinam pointed out.. the minute you load a file into the avisynth creator, a preview pops up and you can see the effects of any cropping changes in real-time.
@incredible: we already have these two features in MeGUI.. and they work quite well.
Doom9
30th January 2006, 12:56
Level 1.2 doesn't allow 320x240 at 29.97, and Level 1.3 allows up to 352x288, which is too high.You gotta love Sony.. standards my lower backside...
I have no idea what the current situation is now, and no-oen seems to agree with anyone else.it goes to show that telephony people should stay far away from video. What's wrong with square pixels everywhere and one stretch factor for playback? That's easy and everybody can understand it if you show them three images. I have yet to see anyone who can give a formula on how to relate DAR, image width, height and SAR/PAR.
dimzon
30th January 2006, 14:30
http://img300.imageshack.us/img300/2603/untitled14it.jpg
You can drag blue cropping lines via Mouse - exatly like in VirtualDubMod!
dimzon
30th January 2006, 14:49
0.2.3.2057 30 Jan 2006
Commit by dimzon:
-New experimantal crop dialog (not complete working yet)
Doom9
30th January 2006, 14:57
I don't think using the mouse serves much of a purpose other than being eye candy. When you get right down to it, in the end you have to use the up/down buttons to fine control your cropping. And the AViSynth dialog is closely connected to the reader.. you do realize that by creating another dialog, you'll have to redo everything. Cropping also has to be done either on an avs script or a d2v. Then you have the whole autocrop thing, which also goes straight to the script creator, and the anamorphic story (which requires knowledge about input and output resolution).
VDub also doesn't have autocrop.. a very useful feature.. plus you need to see the results of autocropping.
I also think VDub's ordering of the values is suboptimal.. the way I resolved it, the 4 values are placed with respect to the image in a gamepad like order.. everybody knows immediately which is which.
dimzon
30th January 2006, 15:25
And the AViSynth dialog is closely connected to the reader.. you do realize that by creating another dialog, you'll have to redo everything.
Mostly no. Current VideoReader API is fine - is very easy to create "yet another player connected to VideoReader"... If my solution will be Approved by You we can perfor a little refactoring to make this dialog & player ancessors of same class...
And I really doesn't like how current MeGUI implementation works with cropping preview.
By the way
Using current powerfull avisynth wrapper is possible to mimic VirtualDub (name it standard de-facto) in filters tuning (it's easy to create filter tuning dialog with preview ability)
I also think VDub's ordering of the values is suboptimal.. the way I resolved it, the 4 values are placed with respect to the image in a gamepad like order.. everybody knows immediately which is which.
Ok, I hink You are right...
Doom9
30th January 2006, 15:33
And I really doesn't like how current MeGUI implementation works with cropping preview.Why? What's wrong with it?
dimzon
30th January 2006, 16:13
Why? What's wrong with it?
I'm sorry, but it is uncomfortable for me.
Just get from CVS latest CropDialog (rev 1.2) and compare usability a little... Is'nt CropDialog a more comfortable?
http://img202.imageshack.us/img202/3364/untitled35xo.jpg
Doom9
30th January 2006, 16:24
Is'nt CropDialog a more comfortable?I don't see how. Plus the existing dialog is freely resizeable ;) Being a dialog, once you close it, you no longer get to see anything.. with the existing one.. you can close it all you want, the values stay visible and accessible.
dimzon
30th January 2006, 16:45
Plus the existing dialog is freely resizeable ;)
This feature doesn't need for cropping
Being a dialog, once you close it, you no longer get to see anything.. with the existing one.. you can close it all you want, the values stay visible and accessible.
It means I just must transfer cropping values to AviSynth creator window, is'nt it? My dialog still uncomplete yet...
I don't see how.
Well... If You don't like it I will remove it ASAP. Just answer - to remove or not to remove (to be or not to be ;) )
Doom9
30th January 2006, 17:09
This feature doesn't need for croppingUmm.. I know my screen can handle HDTV natively, but most people are not that lucky.. which results in a window that is larger than their screen and that's not very convenient, would you not agree?
What I like about my approach (and GKnot, where I took the idea from), is that you can theoretically crop without ever seeing the preview, and that you can tend to other related tasks with the preview still on screen. I just don't see how the new approach is better, not just different.
it's easy to create filter tuning dialog with preview abilityNow that would be a useful feature. Even more useful would be a before - after view.
SeeMoreDigital
30th January 2006, 17:32
Hi dimzon,
For those (few) of us who like to keep the black mattes....
Would it be possible to add a function that could intentionally "add" black mattes to a source that's found to have furry and/or poorly aligned matte-to-image edges?
Cheers
Dayvon
30th January 2006, 18:00
Hey guys... I posted this earlier, but it either got ignored or missed since it was at the bottom of a page. So I'm reposting it....
I was messing around in Paint Shop the other day, and I decided to make an icon for MeGUI. I use this dock thing and the default icon looks pretty boring so I made this thing up. I figured I'd let you guys have at it if you want, if not, then by all means it'll just be my personal MeGUI icon.
If you do like it however, you're totally free to use it. The fonts are freeware fonts, and the I have a higher resolution version if you want it. I tried to run with the same colors as Gordian Knot just for familiarities sake.
Anyway, I can't do code developing, but I can do this. So let me know what you think...
http://church.crossingatwoodland.com/ChurchFiles/SermonText/MeGUI2Icon.png
dimzon
30th January 2006, 18:03
@SeeMoreDigital
Sorry, misunderstood you. Can You repeat it using a little more cmplex english?
@Dayvon
Looks fine for me, waiting for Doom9 response
dimzon
30th January 2006, 18:06
0.2.3.2058 30 Jan 2006
Commit by dimzon:
-Some refactoring (AVS generation code moved from VideoUtil to ScriptServer)
@Doom9
please, take look @ changed files, does You approve such refactoring?
SeeMoreDigital
30th January 2006, 18:41
@SeeMoreDigital
Sorry, misunderstood you. Can You repeat it using a little more cmplex english?Sure...
If I had a source with poor looking mattes, like this: -
http://img235.imageshack.us/img235/1180/badmattesexample5ip.jpg
Would it be possible to configure your application to "overlay" mattes, so the source/encode could (in theory) look like this: -
http://img371.imageshack.us/img371/5404/overlaymatte9wz.jpg
Cheers
Doom9
30th January 2006, 18:53
why would you not simply cut away bad borders? Keeping black bars is detrimental to image quality.
And the last time I checked, we have a feature request thread ;)
dimzon
30th January 2006, 18:57
why would you not simply cut away bad borders?
Agreed
@Doom9
I'm waiting for your solution about crop Dialog (remove or continue) and for futher refactoring.
SeeMoreDigital
30th January 2006, 19:08
why would you not simply cut away bad borders? Keeping black bars is detrimental to image quality.Agreed.... but far less so if the matte is razor sharp, ie: pixel perfect. As true "black" does not require many bits to process.
And the last time I checked, we have a feature request thread ;)Sorry about that, it's easy to get carried away in the excitement. Please move my posts accordingly ;)
Cheers guys
berrinam
30th January 2006, 21:51
I had cleaned up the suggestResolution method, and documented the algorithm for calculating the Sample Aspect Ratio (which is, as I see it, a stretching amount, when taken as a fraction, sarx/sary). As I said earlier, I believe the problem with all of this is that only x264 uses sarx and sary -- I think lavc uses an overall ratio like DAR, which prescribes the ratio of displayWidth / displayHeight. SMD says it doesn't but from my testing..... I think it does.
Anyway, assuming I am correct about what methods of signalling these codecs use, how would you do the MeGUI architecture? I still think that it would be nice for the user if they could enter the same number in any codec in MeGUI and have the correct aspect ratio come out. Similarly, the programmer would want to avoid codec-specific handling of AR. It should just work out one AR and tell it to each codec, which works out how to convert that.
That would mean that MeGUI would have to handle conversion between AR methods. So here's the problem: the algorithm for conversion between formats is not so hard, but it requires that it knows the number of pixels. In some cases, the number of pixels is only known at the moment the job is run (look at the case where you add a non-working AviSynth script to the job and you then fix it up later -- this could happen in three cases I see: prerendering, two-pass scripts, and the user just being annoying). Perhaps the solution would be to regenerate the commandline just before the job is run, and tell the commandline generator what the resolution is (it does make sense that it should convert it -- it is just a triviality of what to put in the commandline:D)
So..... what do you think?
Also, for your reference, the cleaned up suggestResolution code:
public static int suggestResolution(double readerHeight, double readerWidth, double customDAR, CropValues cropping, int horizontalResolution,
bool signalAR, out int sarX, out int sarY)
{
double fractionOfWidth = (readerWidth - (double)cropping.left - (double)cropping.right) / readerWidth;
double inputWidthOnHeight = (readerWidth - (double)cropping.left - (double)cropping.right) /
(readerHeight - (double)cropping.top - (double)cropping.bottom);
double sourceHorizontalResolution = readerHeight * customDAR * fractionOfWidth;
double sourceVerticalResolution = readerHeight - (double)cropping.top - (double)cropping.bottom;
double realAspectRatio = sourceHorizontalResolution / sourceVerticalResolution; // the real aspect ratio of the video
realAspectRatio = getAspectRatio(realAspectRatio); // Constrains DAR to a set of limited possibilities
double resizedVerticalResolution = (double)horizontalResolution / realAspectRatio;
int scriptVerticalResolution = ((int)Math.Round(resizedVerticalResolution / 16.0)) * 16;
if (signalAR)
{
resizedVerticalResolution = (double)horizontalResolution / inputPixelCountRatio; // Scale vertical resolution appropriately
scriptVerticalResolution = ((int)Math.Round(resizedVerticalResolution / 16.0) * 16);
// sarX
// ---- must be the amount the video needs to be stretched horizontally.
// sarY
//
// horizontalResolution
// -------------------------- is the ratio of the pixels. This must be stretched to equal realAspectRatio
// scriptVerticalResolution
//
// To work out the stretching amount, we then divide realAspectRatio by the ratio of the pixels:
// sarX horizontalResolution realAspectRatio * scriptVerticalResolution
// ---- = realAspectRatio / -------------------------- = --------------------------------------------
// sarY scriptVerticalResolution horizontalResolution
sarX = (int)Math.Round(realAspectRatio * resizedVerticalResolution);
sarY = (int)Math.Round(horizontalResolution);
return scriptVerticalResolution;
}
else
{
sarX = 0;
sarY = 0;
return scriptVerticalResolution;
}
}
berrinam
30th January 2006, 21:53
@dimzon: I find the current way of cropping nicer, in that it gives white bars instead of a line where you are cropping to. My reason for saying this is nicer is that you can look at it and see what the film you are going to get is, and you won't be distracted by the junk on the outside. It is harder to see exactly if there is any black on one side of a line (your approach) than if there is any black at all.
Finally, you can't crop by odd values in YV12.
SeeMoreDigital
30th January 2006, 22:10
I had cleaned up the suggestResolution method, and documented the algorithm for calculating the Sample Aspect Ratio (which is, as I see it, a stretching amount, when taken as a fraction, sarx/sary). As I said earlier, I believe the problem with all of this is that only x264 uses sarx and sary -- I think lavc uses an overall ratio like DAR, which prescribes the ratio of displayWidth / displayHeight. SMD says it doesn't but from my testing..... I think it does.I still maintain there "shouldn't" be any difference ;)
Cheers
Doom9
30th January 2006, 23:42
Perhaps the solution would be to regenerate the commandline just before the job is run, and tell the commandline generator what the resolution isUh.. regeneration is okay by me (I was meaning to do that myself), but I don't think there should be any knowledge of resolution in the commandline generator. When doing things manually (so from the avisynth script creator).. you should assume the resolution won't change anymore. In case of one click job series, it should be taken care off. And then I guess I will have to wonder why we have that prerender job that breaks things ;) It's that sort of inter job type dependency (the dgindex postprocessing and automated job series consisting of audio and video put that to the extreme) that makes it really hard to have a structure where each job is really separated.
BTW, I haven't heard a word about my brainstorming on refactoring.
berrinam
31st January 2006, 06:54
0.2.3.2059 31 Jan 2006
Commit by berrinam:
-Fixed up AR handling in MeGUI. Everything is now set as PAR, and any conversions required are done just in time for encoding
-Fixed up compile errors
-Applied Mutant_Fruit's bitrate calculator patch
ChronoCross
31st January 2006, 07:22
Damn I just compiled 2058 about an hour ago. doesn't matter cause the anoncvs won't be updated for a few hours. I'l prepare another release before work.
dimzon
31st January 2006, 11:33
BTW, I haven't heard a word about my brainstorming on refactoring.
http://forum.doom9.org/showthread.php?p=777457#post777457
@Doom9 && @berrinam
I do not like current cropping solution bcz of window overlapping problem. Really, crop controls are placed in one window && preview is in another window. When you trying to change cropping values AvsGenarator window && underlayng MeGUI main vindow overlaps preview window. And when I clicking to preview window it overlaps AvsGenarator window incl. cropping controls.
@berrinam
I still waiting answer for a question: where I can get sources of MessageBoxExLib.dll
berrinam
31st January 2006, 12:15
@Doom9 && @berrinam
I do not like current cropping solution bcz of window overlapping problem. Really, crop controls are placed in one window && preview is in another window. When you trying to change cropping values AvsGenarator window && underlayng MeGUI main vindow overlaps preview window. And when I clicking to preview window it overlaps AvsGenarator window incl. cropping controls.I agree. That should just be fixed by correcting the ordering of the windows, though. It doesn't warrant a redesign of the cropping.
I still waiting answer for a question: where I can get sources of MessageBoxExLib.dll
I've added the sources to the CVS repository. They come from a codeproject sample, with some stripping down by me. However, there is still a lot left there which isn't used.
dimzon
31st January 2006, 12:19
I agree. That should just be fixed by correcting the ordering of the windows, though. It doesn't warrant a redesign of the cropping.
Unfortunally no - it can't be complete solved via windows ordering. It can be solved only bying monitor with bigger resolution and/or placing preview & crop controls in same window
Doom9
31st January 2006, 12:28
my main beef with having everything in one window is that crop values and preview don't necessarily go together. I sometimes make scripts where I already know the crop values so I don't need any preview.. same goes for autocrop.. basically you could live without preview. That's where the separation approach comes in very handy. And it's also important to point out that my approach comes from GKnot.. people with a GKnot background are used to it. You apparently are more used to VDub (which I've given up on ages ago.. except for VfW encoding I do nothing in VDub anymore) which explains your liking of that approach. But let's not forget that in VDub, once the dialog disappears, so does your opportunity to make any further changes.
I'm further assuming that your screen solution is rather smallish.. is it not?
berrinam
31st January 2006, 12:32
Unfortunally no - it can't be complete solved via windows ordering. It can be solved only bying monitor with bigger resolution and/or placing preview & crop controls in same window
It hasn't really caused me much problems (except for the main window coming back on top), but it would also be good if you could look at what I said about your cropping window: http://forum.doom9.org/showthread.php?p=777764#post777764
verifyOutputFile -> jobUtil
verifyInputFile -> jobUtil
startEncoding -> jobUtil
startNextJobInQueue -> jobContainer
loadJobs -> jobContainer
getFreeJobNumber -> jobContainer
addJobToQueue -> ??
getVideoJobs, addVideoJob -> jobUtil
removeJobFromQueue -> jobContainer
addJobToQueue sounds like it should go in jobContainer. Similarly for addVideoJob. I think jobUtil should be able to generate the jobs, but not be at all connected to management of the queue, because jobcontainer is about managing the queue.
Also, your refactoring using the IJobProcessor interface means that vEnc, aEnc, muxer, indexer can all be put into one variable -- processor. Since we are only running one thing at once, we only need one processor, and it saves all the if statements which are all over the place.
ideas: automatic script checking upon opening even if preview is not being opened.Agreed
store properties of the script right awayWhy? If there are any problems that can be fixed, they can be fixed immediately. If not, the user might have fixed them without MeGUI realizing it, and storing the values would mean that MeGUI thinks the script still doesn't work even if it does. I think it would be better to call checkVideo() twice.
Other things I'd like to achieve: easy encoding for specific devices (like PSP, video iPod). In case of the PSP that will require running an additional job.What is the situation with this? iPod is perfectly feasible, as I think I have shown you. Should this be distributed? Perhaps also the other method of choosing resolution I mentioned (maximum total pixels)?
Doom9
31st January 2006, 12:53
your refactoring using the IJobProcessor interface means that vEnc, aEnc, muxer, indexer can all be put into one variable -- processor.Yup, that's definitely the plan. The main form should only link the buttons to the appropriate processor commands.
Should this be distributed?Yup. For the PSP I guess we could define a virtual level which is a combination of actual buffer requirements and resolutions compatible with the PSP. And once encraw is up to the task and I add levels there as well, we can do the same for xvid.
It is harder to see exactly if there is any black on one side of a line (your approach) than if there is any black at all.I second that. Initially, I thought about just drawing a line over the video like VDub, but thinking of how hard it is to take arbitrary rectangular screenshots with the line rectangle, I opted for blanking out everything that's going to be cropped away.
dimzon
31st January 2006, 13:20
my main beef with having everything in one window is that crop values and preview don't necessarily go together.
100% Agreed. It means we must keep crop controls & AvsGenerator form BUT allow opening CropDialog with it's own crop controls (We can combine this 4 Numeric UpDown in custom control for better reusing)
You apparently are more used to VDub which explains your liking of that approach.
Actually I'm using VirtialDub for cropping only. I'm opening uncropped AVS via VD, then going to cropping, perform visual cropping and coping crop values to my script back...
But let's not forget that in VDub, once the dialog disappears, so does your opportunity to make any further changes.
You can open this dialog again && it will "remember" it's cropping values. Just only one think you lost is current frame. My CropDialog does not complete yet (development is frozen && i'm waiting for Doom9 decision) so it does'nt do it...
I second that. Initially, I thought about just drawing a line over the video like VDub, but thinking of how hard it is to take arbitrary rectangular screenshots with the line rectangle, I opted for blanking out everything that's going to be cropped away.
Seems like You && berrinam take my CropDialog as comlete solution. But it still incomplete, I know about odd cropping for YV12 and it's no problem to replace blue lines by white regions (we can even add checkbox right @ CropDialog ;) )
stax76
31st January 2006, 13:56
And it's also important to point out that my approach comes from GKnot.. people with a GKnot background are used to it. You apparently are more used to VDub (which I've given up on ages ago.. except for VfW encoding I do nothing in VDub anymore) which explains your liking of that approach.
It's just too obvious where both approaches are derived ;), personally I don't have high requirements regarding advanced crop features and also did't had/denied too many advanced crop requests (don't recall anything I could understand and reproduce) and I didn't get much positiv or negativ feedback about the cropping feature. I like to do things quick and easy which I achieve by mouse hovering, clicking, dragging and wheel, needs some habituating but then I think it's fun.
dimzon
31st January 2006, 14:18
0.2.3.2060 31 Jan 2006
Commit by dimzon:
-Using NicMPASource instead of MPASource in AviSynthAudioEncoder.cs
Inc
1st February 2006, 01:22
I had cleaned up the suggestResolution method, and documented the algorithm for calculating the Sample Aspect Ratio (which is, as I see it, a stretching amount, when taken as a fraction, sarx/sary). As I said earlier, I believe the problem with all of this is that only x264 uses sarx and sary -- I think lavc uses an overall ratio like DAR, which prescribes the ratio of displayWidth / displayHeight. SMD says it doesn't but from my testing..... I think it does.
I did some tests on Lavc's ASP and x264's AVC, both muxed into mp4.
I used a straight 16:9 (in here I mean anamorph) Pal stream left at 720x576.
When using the mp4 container in my tests x264 uses SAR or PAR where Lavc ASP and lavc XVID do use the DAR. Both (x264 and lavc ASP) played back properly in a std. Dshow appl. like MPC or Zoomplayer (via FFdshow) but not the xvid one. VLC and its internal routines/codecs did show the x264, lavc ASP and lavc XVID ones properly. - But VLC compensates the SAR by squeezing the height!
When using the avi container (mencoder/Lavc's ASP or mencoder/Xvid ) the DAR-Flag isn't recognised when using a std. Dshow appl. (see above).
VLC does playback these avis properly.
Also ...
When I do enter the avisynth Script creator and importing a d2v (PAL 720x576) it shows me a DAR of straight 16:9 1,778 which isnt correct D1 ITU anamorph 720 results in 1.832 which equals almost to 175/96.
http://img494.imageshack.us/img494/3408/unbenannt18gw.gif (http://imageshack.us)
When using PARanoia's SAR of 35/24 in x264 or DAR of 175/96 in lavcASP .. each muxed into a mp4 container the circle results 1:1 round in a sw/player like Zoomplaer or MPC:
http://img471.imageshack.us/img471/2964/720x576anamorph5gy.th.gif (http://img471.imageshack.us/my.php?image=720x576anamorph5gy.gif)
At the very end of my resulted script I do see that here the therm "SAR" is used for the "16:9" -DAR-.
# Set SAR in encoder to 16 : 9
I think that could result in confusings? Or is it only Lavc ASP encoding related?
berrinam
1st February 2006, 08:37
@incredible: Thanks for doing the tests
When using the mp4 container in my tests x264 uses SAR or PAR where Lavc ASP and lavc XVID do use the DAR.Hang on, XviD isn't part of libavcodec. I assume you simply mean through mencoder?
Both (x264 and lavc ASP) played back properly in a std. Dshow appl. like MPC or Zoomplayer (via FFdshow) but not the xvid one. VLC and its internal routines/codecs did show the x264, lavc ASP and lavc XVID ones properly. - But VLC compensates the SAR by squeezing the height!Yep, in my testing, I used mplayer for checking my results, and everything worked in mplayer, although not necessarily in all the other players. mplayer also upscales, instead of downscaling (or so it claims). I am somewhat surprised that XviD works so reliably, because, from my testing, mencoder has a bug with signalling XviD's AR, which means that it can only be set using one of XviD's four presets. As a hack, MeGUI rounds any AR to the closest preset (see the function VideoUtil.roundXviDPar), so there can be quite a discrepancy with the AR.
Also ...
When I do enter the avisynth Script creator and importing a d2v (PAL 720x576) it shows me a DAR of straight 16:9 1,778 which isnt correct D1 ITU anamorph 720 results in 1.832 which equals almost to 175/96.This is also the case when not doing anamorphic encodes. It's not my area, though -- Doom9 decided against ITU resizing, and I have had no problems with the resulting resizing (as in, no stretching-related problems. Perhaps there is a slight distortion, but too small for me to notice).
At the very end of my resulted script I do see that here the therm "SAR" is used for the "16:9" -DAR-.I've added that to the list of bugs. Perhaps it will be fixed sometime.
Inc
1st February 2006, 09:41
Hang on, XviD isn't part of libavcodec. I assume you simply mean through mencoder?Yep, sorry, I meant the mencoder way via its inlcuded xvid library
from my testing, mencoder has a bug with signalling XviD's AR, which means that it can only be set using one of XviD's four presets.
yep, I figured that out too this mornig. Only the ntsc/pal preset DARs do work.
It's not my area, though -- Doom9 decided against ITU resizing, and I have had no problems with the resulting resizing
ok, his decision, but if a ITU compilant input is assumet as 1,7778 then finally you "could" end up in a 1024/1050 error factor if not treating the source ITU compilant as a 720x576 content just gets scaled to 1024x576 and not to 1050 in the sw/player ... but everything depends on the specific users eyes ;).
dimzon
1st February 2006, 11:10
to ALL
Maybe just drop LMP4 support at all (XviD is better in all - it's free, faster and provide better quality...
Why you are spenting time writing workaround for unusable codec - let's spent this time for more important things
dimzon
1st February 2006, 11:17
0.2.3.2061 1 Feb 2006
Commit by dimzon:
-Upmix stereo to 5.1 seems to work now
http://forum.doom9.org/showthread.php?p=778156#post778156
Doom9
1st February 2006, 14:25
@dimzon: actually.. the workaround is for xvid because there's no commandline tool that properly signals custom DARs. Custom DARs work fine for LMP4.
Inc
1st February 2006, 14:32
I do think its also up on the used containerformat and the Playback appl.
As said, VLC does recognise the DAR or SAR signals of menc_XVID, menc_ASP and x264 properly (all in mp4), if I do remeber even in Avis. But when using Dshow decoders via Dshow playback apps. then the mess begins in case of menc_XVID and btw. AVIS in general.
dimzon
1st February 2006, 19:09
Just now first time take look @ Avisynth_c API embeded into avisynth.dll
Seems like I can remove AvisynthWrapper.dll at all (maybe not right now, bcz i'm a little busy)
dimzon
1st February 2006, 19:17
0.2.3.2062 1 Feb 2006
Commit by dimzon:
-Fixed bitrate parameter when encoding FAAC via BeSweet
Doom9
1st February 2006, 21:07
@dimzon: I'm looking forward to the removal of avisynthwrapper.dll ;)
Now, compiling the latest build returns a bunch of warnings:
VideoUtil.cs(54,10): warning CS1030: #warning: 'Seems like no one call this
method!'
AviSynthWindow.cs(1019,26): warning CS0618: 'MeGUI.VideoUtil.getResizeLine(int,
int, int)' is obsolete: 'Use ScriptServer.GetResizeLine instead. Use
ScriptServer.ListOfResizeFilterType to fill your comboboxes'
AviSynthWindow.cs(1020,28): warning CS0618:
'MeGUI.VideoUtil.getDenoiseLines(bool, int)' is obsolete: 'Use
ScriptServer.GetDenoiseLines instead. Use
ScriptServer.ListOfDenoiseFilterType to fill your comboboxes'
JobUtil.cs(761,28): warning CS0618: 'MeGUI.VideoUtil.getDenoiseLines(bool, int)'
is obsolete: 'Use ScriptServer.GetDenoiseLines instead. Use
ScriptServer.ListOfDenoiseFilterType to fill your comboboxes'
JobUtil.cs(762,26): warning CS0618: 'MeGUI.VideoUtil.getResizeLine(int, int,
int)' is obsolete: 'Use ScriptServer.GetResizeLine instead. Use
ScriptServer.ListOfResizeFilterType to fill your comboboxes'
Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
I don't know who added them but as a general rule, double clicking on compile.bat should not return any warnings whatsoever. If there's unused code, get rid of it, if methods in one class are not to be used anymore, make sure nobody uses them anymore.
Inc
1st February 2006, 22:13
Just now first time take look @ Avisynth_c API embeded into avisynth.dll
Seems like I can remove AvisynthWrapper.dll at all (maybe not right now, bcz i'm a little busy)
An 'approach' of accessing the dll .... (till now I didnt went into the C Interface, so you have to try)
AVS_ScriptEnvironment * env =
avs_create_script_environment(AVISYNTH_INTERFACE_VERSION);
AVS_Value arg = avs_new_value_string(script);
AVS_Value args = avs_new_value_array(&arg, 1);
AVS_Value res = avs_invoke(env, "Eval", args, 0);
if (avs_is_error(res))
{
// Error mess. here
return -1 ;
}
arg = res;
res = avs_invoke(env, "ConvertToRGB32", args, 0);
AVS_Clip * clip = avs_take_clip(res, env);
avs_release_value(res);
const AVS_VideoInfo * inf = avs_get_video_info(clip);
Doom9
1st February 2006, 22:17
if anybody has an idea how to get x264's output if it aborts immediately (see http://forum.doom9.org/showthread.php?t=106667) please let me know.. it's pretty annoying not to get any feedback.. obviously that indicates something went terribly wrong, but having the error right there in the log would make things easier.
Doom9
1st February 2006, 22:58
here's one for dimzon: I'm finally trying out avisynth audio encoding.. works like a charm. I'm just curious about the first pass.. I sorta figured that would go away with AviSynth.. so exactly what is happening during the first pass? Oh, and can we parallelize that because right now only one core is busy ;)
By the way, during the second pass, the cores seem better utilized.. and while I haven't verified yet, I think I'm even seeing a speed boost (akin what you get when encoding in VfW for single threaded codec thanks to the separation of input reading/decoding and encoding.. ).
dimzon
2nd February 2006, 11:32
@dimzon: I'm looking forward to the removal of avisynthwrapper.dll ;)
After analyzing Avisynth_C API i decide to recall this proposal. Unfortunally Avisynth_C API is callable via PInvoke but is very nonoptimal for it.
Mosly every function in this API recieve STRUCT like AVS_Value by value.
int someFunc(AVS_Value value)
It means dotNet Marshaller will be used for every invokation and there are no way for optimization... And Avisynth_C API is more atomic - You need 4x more invocation to achive same effect (and mostly every invocation recieve struct ByVal)
In other way using ByRef (like AvisynthWrapper.dll)
int someFunc(AVS_Value* value)
Is much more friendly for dotNet PInvoke bcz You can create GCHandle and pin your structure in memory then just transmit structure address directly into function.
I don't know who added them but as a general rule, double clicking on compile.bat should not return any warnings whatsoever.
First of all please point me @ this rule.
Second - using custom warnings allows and ObsoleteAttribute is very helpfull when you working @ big project with many developers. I does not wont to touch too much files at ones bcz I afraid onyone else will change this code @ same time and I dos'nt wont perform merging at all... But using custom warnings and ObsoleteAttribute I can tell to other developers and it will act as reminder @ every compilation. As You can see this warnings will be eluminated by me or other developers during 5-10 commits...
I'm just curious about the first pass.. I sorta figured that would go away with AviSynth.. so exactly what is happening during the first pass?
first pass (I name it prepocessing) is 100% controlled by AviSynth. it caused by using Normalize() function.
dimzon
2nd February 2006, 14:53
@Doom9
I still waiting meaningfull response from You
What I must do now?
Doom9
2nd February 2006, 15:16
I does not wont to touch too much files at ones bcz I afraid onyone else will change this code @ same time and I dos'nt wont perform merging at allAre you the same guy who started out telling everybody megui needs to be redone from scratch? Shouldn't the first rule of refactoring be that you must realize you're going to create conflicts and break a lot of stuff? I recall 300 compiler errors just when putting dgindex processing in as a job instead of something the form does.
What I must do now?There are no musts in a volunteer project. But perhaps a should. For instance, I could imagine a job having a method/property to return a string array that can be used to construct a listviewitem being something useful since the whole bind job to listview will have to be rethought during refactoring. I noted that we can use the ListViewItem.tag to attach a job to the GUI, but then the item and object are still not bound and ideally they ought to be (so if you move an item up/down, its position element gets incremented/decremented, likewise for setting status, etc).
Then you can consider what a generic jobprocessor and jobqueue will have to do. The processor will implement ijobprocessor of course, but there's the little annoying detail that somebody someplace needs to be aware of jobtypes (and not the job itself) and does the proper postprocessing. For instance, after audio encoding comes video encoding so we have to update the bitrate (of 1 up to 3 video jobs). Or after indexing comes audio processing so you first have to find those audio files.. that kind of thing. Make sure you step through the current handling in the debugger once to get a feeling what really has to be done.. there's a lot of interdependency between jobs I'm afraid.
dimzon
2nd February 2006, 15:43
Are you the same guy who started out telling everybody megui needs to be redone from scratch?
FYI: refactoring != from_scratch
Shouldn't the first rule of refactoring be that you must realize you're going to create conflicts and break a lot of stuff?
No. The first rule of refactoring is: ALL DEVELOPMENT ARE FROZEN DURING REFACTORING PROCESS (nobody adds new features etc). Refactoring reques EXCLUSIVE source lock until it will be done (to avoid merge hell).
There are no musts in a volunteer project. But perhaps a should.
Sorry, this is my poor english ;)
For instance, I could imagine a job having a method/property to return a string array that can be used to construct a listviewitem being something useful since the whole bind job to listview will have to be rethought during refactoring. I noted that we can use the ListViewItem.tag to attach a job to the GUI, but then the item and object are still not bound and ideally they ought to be (so if you move an item up/down, its position element gets incremented/decremented, likewise for setting status, etc).
I believe you need update position property only before saving joblist. In this case can just enumerate ListViewItem collection and reassign it
For instance, after audio encoding comes video encoding so we have to update the bitrate (of 1 up to 3 video jobs).
Just fast incomplete proposal - Add something like "Content Job" term - job wich produce some data to be included in target file (Audio, Video). Set of "Content Job" may be managed by special manager:
JobManager m = new ContentJobManager();
m.RegisterJob(audioJob, JobSubtype.IntermediateData)
m.RegisterJob(videoPass1Job, JobSubtype.TempData || JobSubType.AdjustBitrate)
m.RegisterJob(videoPass2Job, JobSubtype.IntermediateData|| JobSubType.AdjustBitrate)
m.RegisterJob(muxJob, JobSybtype.FinalData || JobSubType.UseAsBitrateProvider)
Or after indexing comes audio processing so you first have to find those audio files.. that kind of thing.
Maybe better to write our own VOB parser to know dgindex output before job start?
Doom9
2nd February 2006, 15:58
Maybe better to write our own VOB parser to know dgindex output before job start?VOB isn't the only input ;) You seem to be forgetting about the multitude of different things megui supports quite a lot. Digital TV is becoming more and more important..
No. The first rule of refactoring is: ALL DEVELOPMENT ARE FROZEN DURING REFACTORING PROCESS (nobody adds new features etc). Refactoring reques EXCLUSIVE source lock until it will be done (to avoid merge hell).well.. if more than one person works at it, manual merges are still a very real possibility.. and that isn't limited to a refactoring process.. it can happen all the time, especially since there's so much intelligence sitting in the main class.
cc979
2nd February 2006, 16:23
i've re-install windows, avisynth and megui and that
i setup megui plugins using "C:\Program Files\GordianKnot\AviSynthPlugins"
but it wants decomb.dll in the "C:\Program Files\AviSynth 2.5\plugins" is that normal or a little bug ?
dimzon
2nd February 2006, 16:38
VOB isn't the only input ;) You seem to be forgetting about the multitude of different things megui supports quite a lot. Digital TV is becoming more and more important..
Maybe I can take look @ DGIndex code and split it into 2 parts (or we can ask neuron2 to do it) - stream parsing library (Dll) and GUI (exe). In this case we can use this stream parsing library directly ;)
well.. if more than one person works at it, manual merges are still a very real possibility.. and that isn't limited to a refactoring process..
Yes, but during refactoring process merging is headbreaking, really!
it can happen all the time, especially since there's so much intelligence sitting in the main class.
It's the reason why we need split it ASAP.
Dayvon
2nd February 2006, 16:40
i've re-install windows, avisynth and megui and that
i setup megui plugins using "C:\Program Files\GordianKnot\AviSynthPlugins"
but it wants decomb.dll in the "C:\Program Files\AviSynth 2.5\plugins" is that normal or a little bug ?
LOL. Wrong thread buddy, and possibly even wrong sub-forum. Go post this question in this thread (http://forum.doom9.org/showthread.php?t=105920).
Doom9
2nd February 2006, 17:21
[qutoe]stream parsing library (Dll) and GUI (exe). In this case we can use this stream parsing library directly[/quote]That's not nearly good enough. Didn't I already tell you once the major issue with digital TV streams? A TS can contain multiple PIDs, audio and video. You could have a TS that contains broadcasts from multiple channels. You can't have any sensible mapping with a TS player that allows you to pick the chain and in function of the video makes different audio streams available.. And if the input is VOB, we have the DVD Decrypter info file so we know the output.. not the precise name since we have the delay in the filename, but extension and the beginning of the track name.
Yes, but during refactoring process merging is headbreaking, really!Remember that I was up till 4 am one Sunday when I merged in my new audio encoding and muxing code.. I consider it inevitable. Even if you refactor your own software, I actually like to just move things around without too much help.. then I break things all over the place, but fixing them shows me all the code that I need to recheck to make sure nothing has been broken in the end. If you just have your refactoring tools that rename anywhere, and you still screwed up somewhere.. it'll be so much harder to find where things went wrong. And you know how I am when it comes to testing what changes you've made.. there's no such thing as testing enough.. only testing too little. My major change releases generally come out hours after I finished coding.. in between all I do is testing various scenarios.
dimzon
2nd February 2006, 18:07
That's not nearly good enough. Didn't I already tell you once the major issue with digital TV streams? A TS can contain multiple PIDs, audio and video. You could have a TS that contains broadcasts from multiple channels.
Sorry, never read about it, i doesn't know nothing about TVStreams
And if the input is VOB, we have the DVD Decrypter info file so we know the output.. not the precise name since we have the delay in the filename, but extension and the beginning of the track name.
That's why I don't like current solution at all. We are using to many dependecies ( DVDDecrypter is dead, isn't it). And we have no full control over them ( filenames is unpredictable etc). That's why we need better solution (like parsers in Dll's or rewritten in C# from scratch). When I take look @ OneClickMode implementation I decide NEVER USE IT MYSELF (really) bcz I don't trust such potencial-unstable solution... And as You can see this solution create a huge problems in MeGUI architecture
Remember that I was up till 4 am one Sunday when I merged in my new audio encoding and muxing code.. I consider it inevitable. Even if you refactor your own software, I actually like to just move things around without too much help.. then I break things all over the place, but fixing them shows me all the code that I need to recheck to make sure nothing has been broken in the end. If you just have your refactoring tools that rename anywhere, and you still screwed up somewhere.. it'll be so much harder to find where things went wrong. And you know how I am when it comes to testing what changes you've made.. there's no such thing as testing enough.. only testing too little. My major change releases generally come out hours after I finished coding.. in between all I do is testing various scenarios.
Actually I do not understand what does you want to tell me. I know what is refactoring well, I perform it @ my work.
Doom9
2nd February 2006, 21:05
DVDDecrypter is dead, isn't itNot really.. combine it with any on-the-fly decryption layer and it'll live forever.
bcz I don't trust such potencial-unstable solutionPhew, that's just what you want to tell the potential user. Come on.. it works quite well for those who've actually tried it.
Actually I do not understand what does you want to tell me.If you're just going to rename methods, using the built-in tools is fine. But if you're going to change parameters (and thus logic inside the method), it's better to actually break things, compile, see where the errors are, and thus finding all the places that could potentially cause problems. Say you're changing video job creation.. then you need to test every scenario where video jobs are being created to know your changes didn't silently break something that you'll only see at runtime. Any fancy pants refactoring help tool can't figure that one out, in fact they make you forget about those things, where plain manual refactoring results in a lot of break then fix scenarios.. and during the fixing you can strategically place breakpoints for later testing.
dimzon
3rd February 2006, 11:14
But if you're going to change parameters (and thus logic inside the method), it's better to actually break things, compile, see where the errors are, and thus finding all the places that could potentially cause problems. Say you're changing video job creation.. then you need to test every scenario where video jobs are being created to know your changes didn't silently break something that you'll only see at runtime. Any fancy pants refactoring help tool can't figure that one out, in fact they make you forget about those things, where plain manual refactoring results in a lot of break then fix scenarios.. and during the fixing you can strategically place breakpoints for later testing.
Agreed by 100%. Just one exception - at starting refactoring phase I strongly prefer to keep original methods (redirecting it on newer one inside) and mark original methods by [Obsolete]
berrinam
3rd February 2006, 11:19
My 2 cents: with the various function changes (like you moving some things to ScriptServer), I think MeGUI is small enough for that not to be a particularly serious problem. Those functions were only called in at most two places (AviSynth Creator, and OneClick encoder), and so the changes are small. Merging with that sort of thing should not be a problem.
WinMerge, from my experience, is able to pick that sort of thing up. The real problems come from trying to merge WinForms generated code....
dimzon
3rd February 2006, 15:56
0.2.3.2063 3 Feb 2006
Commit by dimzon:
-New very experimental stereo->5.1 upmix modes (using Sox avisynth filter) - try it && report!
thanx to NorthPole
http://forum.doom9.org/showthread.php?p=779538#post779538
berrinam
4th February 2006, 09:11
configAudioButton_Click -> explore possible simplifications
I'm working on this at the moment, and I am trying to do this by making all of the configuration dialogs extend a VideoConfigurationDialog, and this also uses visual inheritance, like described in the Feature Request thread. The thing I am wondering is whether it is worth extending this to the entire GUI, which would mean making a ProfilableConfigurationDialog class, which handles profiles. This could be extended by the four things that use profiles (video, audio, avs, oneclick), and that would save using all the profile code multiple times. However, it's a lot of work, and I thought that (a) it is better to check whether you agree first, and (b) it might be easier to do it for the Video config dialogs, then extend it to all of MeGUI later. Well, option (b) is clearly not easier, but it is for the present time.
So, what do you think?
Doom9
4th February 2006, 11:29
The audio configuration dialogs already use visual inheritance (dimzon introduced that). Do all dialogs that contain profiles really act the same? If so, a three tiered architecture (ProfileDialog, AudioDialog: ProfileDialog, NaacConfigurationDialog: AudioDialog) could make sense.. but it really comes down to how much in common there is. I know audio and video have a lot but I'm somewhat unsure about the rest. I guess in the spirit of breaking the least amount, going just for video might be preferable as an intermediate step.
BTW, I have no plans for the weekend so chances are I go on a refactoring spree. so please keep Form1 and JobUtil untouched, or at least everything that concerns the generation and management of jobs.
Doom9
4th February 2006, 13:18
@dimzon: with the avisynth encoding (I haven't heard anything negative about it.. people just need to set it up properly but with berrinam's guide that's not really a problem either and so I'm even considering disabling the radiobutton to see where it leads.. ) we can now look into more encoders again. You already have a winamp aac encoder wrapper so perhaps we could support that now. And then there's vorbis for mkv.
Richard Berg
4th February 2006, 20:49
So, what do you think?
I think better to keep the AudioConfig & VideoConfig inheritance hierarchies separate. But make a general Profile class that all of them use. So that if we decide something like "nullable means don't overwrite current value" (idea from another thread), it automatically applies to all dialogs that use profiles.
berrinam
4th February 2006, 21:30
but it really comes down to how much in common there is. I know audio and video have a lot but I'm somewhat unsure about the rest. I guess in the spirit of breaking the least amount, going just for video might be preferable as an intermediate step.The bit that they all have in common is the profile management. At the moment, the occurrences of profiles behave slightly differently -- video profiles have a load defaults button, as well as safe profile alteration. But yes, the way I am currently looking at would make changes throughout the program, because it would mean reducing everything to a Profile and a Settings base class, and there would be a lot more casting as the result. While I think it would be a worthwhile change, I'll stick with the video for the moment.
I think better to keep the AudioConfig & VideoConfig inheritance hierarchies separate. But make a general Profile class that all of them use. So that if we decide something like "nullable means don't overwrite current value" (idea from another thread), it automatically applies to all dialogs that use profiles.
There is already a Profile class which Video-, Audio-, AviSynth-, and OneClick- Profiles all extend, but all it has is a Name value. I don't see how something like that can be used easily in all dialogs... I think I've missed something
pcaca
4th February 2006, 23:56
About the problem in x64 discused here:
http://forum.doom9.org/showthread.php?t=106740
I managed to do anonymous CVS checkout and get the latest source files. I changed platform to x86 in configuration properties for MeGUI and neroraw projects in VS2005 and succsesfuly compiled the solution. Now the bug is fixed in Windows XP x64 and task manager shows that MeGUI is 32-bit application, so I can open d2v files and avs scripts in MeGUI.
I am student of Computer Science and maybe sometimes in future (when i learn more C#) i will join the developement of MeGUI.
Doom9
5th February 2006, 00:48
Major announcement: since I started refactoring (currently doing profiles.. with the provider as dropdown items as dimzon suggested), and considering all the changes that lie ahead, I decided to dump conditional compilation effective immediately. I'll make a commit after redoing the profiles so that you can resynch and I think it would be prudent to let development rest until then as this is a major change that affects every single file.
Doom9
5th February 2006, 13:28
grr.. SN25P is at it again.. won't boot from my Raptor anymore. Thank good I kept the somewhat messed up XP on my Deathstar.
Doom9
5th February 2006, 17:55
Man was that a bad idea moving profiles out of form1.. I'm still working on it, but I'll leave something for berrinam. A few points to be considered: attach profiles to dropdowns like I did with codecsettings in the main form (see dimzon's sample code). Make the dropdown non editable.. right now adding, switching and deleting is sort of a chance game.. you don't really know if it works the way you intended. E.g. you select a profile, then type something, then press delete.. the profile you selected is being deleted.. but on screen you have a profile name that doesn't exist. So that could be made to be perfectly deterministic.
Also, in my next commit you'll see that the audio dialog launching has been extremely streamlined.. the same should be done for video.. the reason I didn't do this yet is because the different video dialogs have different parameters that are given to it so the streamlining has to start there.
Mutant_Fruit
5th February 2006, 22:35
What files other than the ones i've listed below could be updateable from the AutoUpdate window? I got that list from all the "filepaths" in the settings section.
mencoder
besweet
mp4box
mkvmerge
x264
xvid_encraw
dgindex
faac
neroraw
Basically, anything that is needed by MeGUI that a user might need should be included in this list. This will allow for on-the-fly downloading (if the user wants) so if a plugin isn't found, it can be downloaded and set up in the background.
Doom9
5th February 2006, 22:39
I wouldn't worry about besweet anymore.. it's going to be phased out. For mp3 encoding via avisynth we need lame. On top of that, for audio processing via avisynth we need nic's audio plugins.
Doom9
5th February 2006, 23:12
0.2.3.2053 5 Feb 2006
Commit by Doom9
- Moved all profile handling to the new ProfileManager class
- Use of List<> and IDictionary<,> instead of ArrayList and HashTable (not all classes have been checked)
- Refactored audio / video codec settings in the main GUI. Using the SettingsProvider approach dimzon suggested
- Simplified a bunch of methods in the main GUI
- Output name textboxes are disabled where applicable if the output selection button is disabled
- Conditional compilation removed
I also tried to live up to the coding guidelines I outlined a few pages ago.. at times it was news for me too so I hope I managed to do a halfway passable job.
Now for the future:
@berrinam: if you're going to create a common base class for the video codec settings, you might also want to look into the possibility to attach profiles to the dropdown as I did with video/audio settings in the main GUI.. and then propagate that throughout the program.
My next stop will be the encoding refactoring now to further cut down the size of the main class and while I'm add it, give the whole avi thing a serious review.
berrinam
6th February 2006, 06:55
What files other than the ones i've listed below could be updateable from the AutoUpdate window? I got that list from all the "filepaths" in the settings section.Have a look at my MeGUI guide in the sticky. It should have a list of everything that might possibly be required (in particular, various dlls, like audio encoding dlls, avisynth filter dlls). Just go through the first post and find all the links. The second post should have no links, just instructions. Also, don't forget that AviSynth should be downloadable. I didn't think of putting that in my guide, because everyone on this forum already knows about AviSynth.
This will allow for on-the-fly downloading (if the user wants) so if a plugin isn't found, it can be downloaded and set up in the background.
I think that AviSynth plugins should also be checked for. As far as they go, you will either have to find the location of the AviSynth plugins folder by using the registry, and then check whether the files exist, OR you could have a series of test scripts to see if each particular plugin works. Basically, the scripts would look as follows:
blankclip(possibly some settings, like colorspace here)
TDeint()
And then dimzon's AviSynth wrapper could tell us whether this produces an error, basically telling us whether the plugin is correctly set up. However, I just realised you would need to know the AviSynth plugins location anyway, so that you can install them there. Still, I think the second approach is better, because it is actually testing what we want to know, instead of doing another test to approximate it.
berrinam
6th February 2006, 06:57
Does anyone know if YV12 codecs are still required for MeGUI? Doesn't dimzon's Avisynthwrapper.dll remove the need for the YV12 codecs?
Doom9
6th February 2006, 09:23
Does anyone know if YV12 codecs are still required for MeGUI? Doesn't dimzon's Avisynthwrapper.dll remove the need for the YV12 codecs?Afaik, the encoders still use AVIFile to read the AviSynth script.. so while MeGUI could live without it, the encoder chain still needs it.
Has anybody ever thought the audio handling was cumbersome (at least for programmers), there are a lot of checks in there to make sure the output name and settings for each audio stream are correct. Would it be bad if instead of having so many checks, just have the encoder check if a stream is properly set up and return an error if it's not (possibly with an option to adjust whatever is wrong.. I'd tend to say the settings should override the output extension)?
dimzon
6th February 2006, 11:51
@dimzon: with the avisynth encoding (I haven't heard anything negative about it.. people just need to set it up properly but with berrinam's guide that's not really a problem either and so I'm even considering disabling the radiobutton to see where it leads.. ) we can now look into more encoders again. You already have a winamp aac encoder wrapper so perhaps we could support that now. And then there's vorbis for mkv.
I'm happy after you refactoring ;) It's easy to add new encoders now!
dimzon
6th February 2006, 12:19
@Doom9
just proposals:
private void initializeDropdowns()
{
this.fileType.SelectedIndex = (int)VideoJob.FileType.MP4; // MP4
this.videoCodec.Items.AddRange(new object[] { new LavcSettingsProvider(), new X264SettingsProvider(), new SnowSettingsProvider(), new XviDSettingsProvider() });
this.videoCodec.SelectedIndex = (int)VideoJob.CodecType.AVC;
this.audioCodec.Items.AddRange(new object[] { new NeroAACSettingsProvider(), new LameMP3SettingsProvider(), new FaacSettingsProvider() });
this.audioCodec.SelectedIndex = 0;
}
1) I prefer to use Singleton pattern
public class LavcSettingsProvider : IVideoSettingsProvider
{
...
private static IVideoSettingsProvider instance = new LavcSettingsProvider();
public static IVideoSettingsProvider Instance {get{return instance}}
}
So yor array initialization code can look like this:
new object[] { NeroAACSettingsProvider.Instance...)
2) I strongly prefer to use static readonly field wich contains encoders array:
public static readonly object[] VideoCodecs = new object[] {...}
...
this.videoCodec.DataSource=VideoCodecs;
3) Using Singleton pattern you can use such code:
this.videoCodec.SelectedItem = X264SettingsProvider.Instance;
instead this:
his.videoCodec.SelectedIndex = (int)VideoJob.CodecType.AVC;
so you does'nt need to add items in predefined order
dimzon
6th February 2006, 12:26
Does anyone know if YV12 codecs are still required for MeGUI? Doesn't dimzon's Avisynthwrapper.dll remove the need for the YV12 codecs?
By the way - I think "installed XviD" is good requemrnt for your guide. I do not recommend Helix YV12 at all - it caused bugs (HW falture, system halts) @ my office PC...
dimzon
6th February 2006, 14:57
0.2.3.2065 6 Feb 2006
Commit by dimzon
- Fixed bug opening Avs Generator window
- Fixed BlockAlign bug in AviSynthAudioEncoder
- Simplified d2vReader code (now it just forwards it's calls to AvsReader executed on Mpeg2Source(fileName) script)
@Doom9
d2vReader still experimental, we can undo it any time ;)
dimzon
6th February 2006, 15:48
0.2.3.2066 6 Feb 2006
Commit by dimzon
- AvsSettings && AvsGenerator window refactoring - now it's easy to add new denoisers/resizers
- AvsSettings && AvsGenerator window refactoring - complete moving from int to enum for denoisers/resizers
WARNING: Moving from int to enum caused serialization error on old Avisynth profiles
old profiles (from previous versions) doesn't load now!
@ automatic deinterlacer author
I want to perform same settings with Deinterlace methids, unfortunally there are too complex code here. Can You take look @ current denoisers/resizers processing (including how are they using in GUI) and do the same for deinterlacer?
Doom9
6th February 2006, 16:48
@dimzon: berrinam wrote the automatic interlace detection
I'll look into implementing your suggestions.
I've also been musing about job generation and I think I'll go into this direction. There's a muxerfactory where you send your desired video codec type and audio codec types as well as subtitle types to. The factory performs a two pass iteration over all registered muxers.. if it finds a direct way, it returns the muxer. If it does not, a second iteration is performed, in which the first match for the video format is taken. Then the output format of that muxer is sent to another iteration with the audio and subtitle streams. That way, we can cover indirect cases like x264.exe -> raw, then raw -> avi with avc2avi, then avi to avi with audio with avimuxgui (I'm thinking about that.. it offers splitting, multiple audio tracks and even aac audio support).
A similar mechanism could be used for the video encoders.. or perhaps even an integration. Say I want x264 in AVI (and I'm dumping mencoder for that scenario.. maintaining two encoders for the same thing is a major pain), the encoder would report "I can do raw, mp4 and mkv output", so we'd pick the first output format, then ask the muxer factory for a muxing path from raw avc to avi. Another option would be to prevent any muxing for simple video encoding.. right now muxing jobs are added even in plain video encoding (say you want snow in mkv.. ).. but perhaps muxing should only be taken into account in automated modes? (and thus asking for snow with output type mkv and then pressing queue would return in a warning telling the user that the encoder cannot provide the desired output format and that the auto mode has to be used. That would also simplify job generation.. we have the same codepath for auto mode and one click mode.. if simple encoding no longer includes any muxing, the existing codepath for the automated encoding can be used.. you just don't send it any of the additional configuration options available in auto mode.
The point of these factories is of course to have one jobprocessor, which takes a job, finds the proper processor for it and initiates processing.
What do you think.. is this flexible enough to handle use cases we cannot see right now?
dimzon
6th February 2006, 16:58
if it finds a direct way, it returns the muxer. If it does not, a second iteration is performed, in which the first match for the video format is taken.
Very close to DirectShow GraphBuilder isn't it :D :D :D
but perhaps muxing should only be taken into account in automated modes?
Yes, it's good decision
What do you think.. is this flexible enough to handle use cases we cannot see right now?
Hmmm. It's really hard to say. At first look everything seems Ok...
By the way
I'm now contacting with AviMUX_GUI author asking him to add some functionality to be able provide good integration between MeGUI and AviMux_GUI. Seems like we can use it for AVIMuxing (AFAIK AviMux_GUI is the best tool for AVI muxing)
ChronoCross
6th February 2006, 17:03
I won't be able to make a new release build until late tonight(which is the usual weekday time for new builds.)
I'm considering making a Utility Kit in which I've gathered all the needed programs and dll's and organized them to be super efficient folders. I'll put this on the site as well I'm just working out some of the kinks.
I wanted to ask you if you preferred if I addeda GPL thing to my builds. I haven;'t been doing so simply because the ones on sourceforge never had it. Let me know.
Doom9
6th February 2006, 17:12
well.. AVIMuxGUI has a powerful scripting language.. while running a GUI program doesn't offer any feedback, I think we can live with that if the rest works out and if I can throw out all the ugly container check code.
I wanted to ask you if you preferred if I addeda GPL thing to my builds. I haven;'t been doing so simply because the ones on sourceforge never had it. Let me know.I think to be fully compliant, the file or at least a file telling you where to get the license should be added. I've never much cared for it though.. those who download the sources will see the GPL notice in the majority of files, so it should be clear to anybody what they can and cannot do with the code.
foxyshadis
6th February 2006, 17:15
By the way
I'm now contacting with AviMUX_GUI author asking him to add some functionality to be able provide good integration between MeGUI and AviMux_GUI. Seems like we can use it for AVIMuxing (AFAIK AviMux_GUI is the best tool for AVI muxing)
Everyone I know says that Avimux-gui creates files with bad indices that cause seeking problems, and that virtualdubmod is significantly better. Maybe that's only older versions, I don't know, but I was chewed out for using it. ^^;
dimzon
6th February 2006, 17:22
well.. AVIMuxGUI has a powerful scripting language.. while running a GUI program doesn't offer any feedback, I think we can live with that if the rest works out and if I can throw out all the ugly container check code.
:D :D :D
In Russia there are proverb (approx):
Fools has the same thought
Hi!
I'm working on MeGUI ( http://forum.doom9.org/showthread.php?t=96032 ) and I'm searching for sutable AviMuxer now. Your AviMuxGUI is perfect, unfortunally there are no easy way to obtain current muxing progress from external process.
Is it possible to add such features:
1) ability to read scripts ( http://www-user.tu-chemnitz.de/~noe/Video-Zeug/AVIMux%20GUI/script.html ) from stdin - it will allow as to avoid temporaly files
2) ability to write progress, diagnostic messages and log into stdout
thanx!
Dmitry Alexandrov wrote:
> Hi!
> I'm working on MeGUI ( http://forum.doom9.org/showthread.php?t=96032 )
> and I'm searching for sutable AviMuxer now. Your AviMuxGUI is perfect,
> unfortunally there are no easy way to obtain current muxing progress
> from external process.
> Is it possible to add such features:
> 1) ability to read scripts (
> http://www-user.tu-chemnitz.de/~noe/Video-Zeug/AVIMux%20GUI/script.html
> <http://www-user.tu-chemnitz.de/~noe/Video-Zeug/AVIMux%20GUI/script.html>
> ) from stdin - it will allow as to avoid temporaly files
I'm not sure how this would be supposed to work: How would AVI-Mux
GUI, once it has been launched, notice that you want to send a file
using stdin? Or did you just think about a command line parameter
telling AVI-Mux GUI to load a script file from stdin on startup? Even
that would require some changes, because AVI-Mux GUI relies on knowing
the file size of any file it opens for reading. Also, AVI-Mux GUI
relies on being able to seek in any file it opens.
> 2) ability to write progress, diagnostic messages and log into stdout
That's certainly possible.
Alex
Hi
2006/2/6, Alexander Noe' <alexander.noe@s2001.tu-chemnitz.de>:
Dmitry Alexandrov wrote:
using stdin? Or did you just think about a command line parameter
telling AVI-Mux GUI to load a script file from stdin on startup? Even
Yes, i think actually about this!
that would require some changes, because AVI-Mux GUI relies on knowing
the file size of any file it opens for reading. Also, AVI-Mux GUI
relies on being able to seek in any file it opens.
You can read all stdin to temporally buffer ( i really doesn't think somebody can provide script larger than 64k )
> 2) ability to write progress, diagnostic messages and log into stdout
That's certainly possible.
Fine!
Bye.
FYI: There are yet another way how to obtain progress from GUI application: it's possible to get text from any window via Win32 API ;)
Mutant_Fruit
6th February 2006, 20:52
Ok... so i have a few requests so i can get cracking on some more parts of the AutoUpdate section.
The files are just going to be hosted on a standard HTTP site (not FTP?) so can i get some write access to somewhere where i can stick up a few files for testing purposes?
Richard Berg
6th February 2006, 23:03
@Mutant_Fruit: PM on the way.
berrinam
7th February 2006, 11:03
@ automatic deinterlacer author
I want to perform same settings with Deinterlace methids, unfortunally there are too complex code here. Can You take look @ current denoisers/resizers processing (including how are they using in GUI) and do the same for deinterlacer?
Using enums and stuff? The problem is (which I'm sure you also encountered) that there are multiple variables which determine the filtering done. In particular, the field order can be TFF, BFF or not set at all, and the source can be anime or not. This means that it is much simpler to dynamically generate the filters than to have them all listed statically. If there is some way of using EnumProxy to dynamically create a data provider, then I could do that. But if not, then the enums I would have to make are:
-progressive source (empty)
-interlaced source, TFF
-interlaced source, BFF
-interlaced source, use d2v info
-film source, TFF anime
-film source, TFF non-anime
-film source, BFF anime
-film source, BFF non-anime
-film source, use d2v anime
-film source, use d2v non-anime
-hybrid interlaced/progressive, TFF
-hybrid interlaced/progressive, BFF
-hybrid interlaced/progressive, use d2v
-hybrid film/progressive with all of those
-hybrid film/interlaced with all of those.
You get the point.
berrinam
7th February 2006, 11:54
One thing that can't be distributed so easily is profiles that use CQMs. I don't know how many people want to use CQMs, but it is still a restriction, because it means that things like Sharktooth's profiles must be limited to the standard 'flat' or 'jvt' QMs. The reason that the CQMs can't also be (easily) distributed with the profiles is that CQMs are stored in MeGUI as an absolute pathname. Is there some way to reorganise this to make it more flexible?
dimzon
7th February 2006, 12:48
0.2.3.2067 7 Feb 2006
Commit by dimzon
- EnumProxy improvements
- ScriptServer refactoring - now it's possible to add new resizers/denoisers just via Enum modification
2 all dvelopers.
Now you can attach any object to enum member and access it via EnumProxy::Tag property.
Take look @ ScriptServer.cs for sample - it's fine!
Doom9
7th February 2006, 13:08
does anybody have an idea how I can get x264.exe to give me all its stdout and stderr output (see stuff like this: http://forum.doom9.org/showthread.php?t=106951 .. has been posted a couple times recently).. if x264 exists immediately with an error, no matter what I tried, I never get to see the actual error line, even though I'm making sure that I'm reading stdout and stderr till the end even if the process has already exited. Also, does anybody have an overview over the x264 exit codes?
shon3i
7th February 2006, 15:37
When you add support to encode audio via Coding Tehnologies. and please fix shutdown feature
dimzon
7th February 2006, 16:00
0.2.3.2068 7 Feb 2006
Commit by dimzon
- ScriptServer refactoring
- Some ResizeType enum members are renamed
dimzon
7th February 2006, 17:44
@ AutoUpdate feature developer
http://www.codeproject.com/tools/updater.asp
dimzon
7th February 2006, 19:39
0.2.3.2069 7 Feb 2006
Commit by dimzon
- Better diagnostics for d2v
- Fixed some resource leak in VideoUtil
Doom9
7th February 2006, 21:10
found a couple nasty bugs:
avs creator: when opening a d2v, then closing the preview and subsequently trying to preview again, we're trying to resurrect the disposed preview window.. that won't work. The preview window has to be reinitialized completely anew.. using would actually come in handy here as it prevents you from reusing a reference that has been disposed.
filename check: if you set x264 to 3 pass first pass, then try to access the autoencode, the autoencodewindow constructor throws an exception.
berrinam
8th February 2006, 09:37
This means that it is much simpler to dynamically generate the filters than to have them all listed statically. If there is some way of using EnumProxy to dynamically create a data provider, then I could do that.
I've figured out how to convert it all into your EnumProxy versions, but it doesn't make it any more readable :(. I still think it should be done dynamically, otherwise too many enums must be created, and I thought of something which can't be done by enums: the ScriptServer function, Portionize. It adds trim statements so that the filter is only applied on selected parts. This must be done at runtime, as we don't know beforehand where the trimming is going to take place.
I realize you are a much better coder than me, so if you have any suggestions, I'm open to them.
dimzon
8th February 2006, 12:58
@berrinam
according current solution (deintelace filters generates dynamically) what does AviSynthSettings::DeinterlaceMethod property means?
dimzon
8th February 2006, 13:27
0.2.3.2070 8 Feb 2006
Commit by dimzon
- Fixes in d2vReader (d2v parsing now work fine on non en-US locales)
- Cosmetics in AviSynthWindow (better controls enabling/disabling)
- Compile.bat now force x86 compilation
dimzon
8th February 2006, 13:44
0.2.3.2071 8 Feb 2006
Commit by dimzon
- Fixed languages bug in settings form
dimzon
8th February 2006, 14:05
0.2.3.2072 8 Feb 2006
Commit by dimzon
- Fixed languages bug in mkvMuxer / mp4Muxer forms
dimzon
8th February 2006, 14:25
0.2.3.2073 8 Feb 2006
Commit by dimzon
- Refactored LanguageSelectionContainer, removed 2 languages with duplicate ISO code
dimzon
8th February 2006, 15:17
0.2.3.2074 8 Feb 2006
Commit by dimzon
- Initial profiles refactoring @ audio dialogs - it look's much more understandable now (still need more refactoring yet)
dimzon
8th February 2006, 15:39
0.2.3.2075 8 Feb 2006
Commit by dimzon
- Fixed bug in Form1.cs (losted EventHandler @ audioProfile.OnSelectedIndexChange event)
dimzon
8th February 2006, 16:09
0.2.3.2076 8 Feb 2006
Commit by dimzon
- MeGUISettings.AvisynthPluginsPath is now static. It read/write value from/to HKLM\SOFTWARE\AviSynth\Plugindir2_5 registry key directly
- SettingsForm now override avisynth plugins dir in registry (using MeGUISettings.AvisynthPluginsPath)
ChronoCross
8th February 2006, 16:13
Jesus. I go to sleep for 5 hours and now there have been 7 updates lol!!!. I won't be able to make another build for a few hours as I'm at work. I wanted to know what the platform x86 does in relation to native 32-bit systems? Is it just a compatibility flag fo 64-bit systems or does it actually change the way it compiles?
dimzon
8th February 2006, 16:17
0.2.3.2077 8 Feb 2006
Commit by dimzon
- CropValues are now class (not struct) - it allows to transmit null value
dimzon
8th February 2006, 16:20
Is it just a compatibility flag fo 64-bit systems or does it actually change the way it compiles?
I don't check it, but I believe it's same...
godhead
8th February 2006, 17:15
I'e been super busy with real life and work, so I haven't had much free time for other projects. but I just wanted to say, DAMN! I come check the thread and Dimzon has been on a tear with updates. Good Job!
Were the language changes you made, the fix I had originally signed up for? If so, thanks for picking up my slack.
I should have some more time in a couple of weeks and I'll try to catch up with MeGUI Development at that time.
dimzon
8th February 2006, 17:26
@all developers
may be this is reason of non-working shutdown checkbox?
http://www.csharpfriends.com/Forums/ShowPost.aspx?PostID=39822
Doom9
8th February 2006, 17:33
hmm.. it also prevents you from logging out (I have such apps at work.. but the behavior is always desired as those apps are receiving logging events at a central place (logging to the HD is also in effect but the logs go to separate files depending on the kind of event)).
But somebody who has that problem would have to state if the app was minimized to the tray or not. I also think it couldn't hurt adding a "automated shutdown is enabled.. initiating shutdown now" to the log so that we know how far the app actually got.. there's already a log entry in case a shutdown was tried but failed.
dimzon
8th February 2006, 17:42
according non-working shutdown checkbox:
dwReason
[in] Reason for initiating the shutdown. This parameter must be one of the system shutdown reason codes.
If this parameter is zero, the SHTDN_REASON_FLAG_PLANNED reason code will not be set and therefore the default action is an undefined shutdown that is logged as "No title for this reason could be found". By default, it is also an unplanned shutdown. Depending on how the system is configured, an unplanned shutdown triggers the creation of a file that contains the system state information, which can delay shutdown. Therefore, do not use zero for this parameter.
dimzon
8th February 2006, 17:55
0.2.3.2078 8 Feb 2006
Commit by dimzon
- Attempt to fix shutdown problem under WindowsXP
(providing SHTDN_REASON_MAJOR_APPLICATION | SHTDN_REASON_MINOR_NONE | SHTDN_REASON_FLAG_PLANNED as reason in ExitWindowsEx)
dimzon
8th February 2006, 18:52
0.2.3.2079 8 Feb 2006
Commit by dimzon
- fixed stupid bug in ScriptServer.ListOfDenoiseFilterType (thanx to The Link)
berrinam
8th February 2006, 20:56
@berrinam
according current solution (deintelace filters generates dynamically) what does AviSynthSettings::DeinterlaceMethod property means?
Absolutely nothing. It shouldn't be there. It was in there before automatic deinterlacing, and nobody removed it when automatic deinterlacing was added. If you have a look in the AviSynth profile configuration window, second tab, you will see that there is a list of deinterlacing filters. The DeinterlaceMethod property corresponds to that, but it is now ignored when generating the script.
Richard Berg
8th February 2006, 22:18
I wanted to know what the platform x86 does in relation to native 32-bit systems? Is it just a compatibility flag fo 64-bit systems or does it actually change the way it compiles?
It doesn't change the compiled MSIL. It just sets a flag within the image that tells the .net loader it should be JIT'd to x86 machine code. By default the loader JITs it to the platform's native instruction set, which if you install dotnetfx64 on an x64 machine is x64. On 32bit platforms the native instruction set is x86 to begin with so there's no difference.
berrinam
9th February 2006, 09:49
0.2.3.2080 9 Feb 2006
Commit by berrinam
- Removed the deinterlace filter type in the AviSynthSettings and its corresponding combobox in the settingsdialog
- Fixed up AviSynth profiles
- Fixed up enabling/disabling of controls in AviSynthWindow: the avs profiles are accessible without loading a file, and the script box is disabled without a loaded file
This commit still doesn't use dimzon's EnumProxy syntax. It could be changed to use these, but they still wouldn't use enums.
dimzon
9th February 2006, 11:17
I still think it should be done dynamically, otherwise too many enums must be created, and I thought of something which can't be done by enums: the ScriptServer function, Portionize. It adds trim statements so that the filter is only applied on selected parts. This must be done at runtime, as we don't know beforehand where the trimming is going to take place.
Ok, just one proposal
Current solution reques 2 complimentare arrays - array with titles and array with script itself. Maybe it's better to create such class:
public class PieceOfScript
{
public string Script;
private string title;
public PieceOfScript(string title, string script)
{
this.title = title;
this.Script = script;
}
public override string ToString()
{
return this.title
}
}
in this case you need only one array:
ArrayList arr = new ArrayList();
You can add deinterlacer using constructor:
arr.Add(new PieceOfScript("my deinterlacer" , "bla-bla-bla"));
and populate array via DataBinding:
deintarlaceCombo.DataSource = arr;
to get script you can use something like this:
string deinterlaceLines = (deintarlaceCombo.SelectedItem as PieceOfScript).Script
berrinam
9th February 2006, 11:50
0.2.3.2081 9 Feb 2006
Commit by berrinam:
- Enabled Vorbis calculation in the bitrate calculator
- Renamed SAR (Sample Aspect Ratio) to DAR (Display Aspect Ratio) in a few places
- Fixed empty pathname in One Click Encoder bug
- Fixed bug with the Bitrate Calculated bitrate not propogating onto the codec
@dimzon: Your suggestion sounds like a good medium. And while I'm at it, I'll convert it to List<PieceOfScript>.
dimzon
9th February 2006, 12:18
And while I'm at it, I'll convert it to List<PieceOfScript>.
Feel free to do it BUT I really think ArrayList is enought (just my opinion, I really does'nt like to use generics everythere even without explicit needs).
Really - seems like you does not need to address to arr items via indexer.
You are using foreach construction - in this case ICollection is used and strongly typed generic is not requed at all
ComboBox.DataSource use IList interface, in this case strongly typed generic is not requed too...
dimzon
9th February 2006, 12:29
@Doom9
about cropping
As I said before I don't like current cropping look & feel:
Window overlaping problem - when i trying to change crop values AvisynthWindow && underlayng main form overlap preview and via versa
I does not view which data is cropped (all cropped regions are filled by white)
I does not view resolution after crop and MOD information
You are asked me to remove CropDialog, I can do it but mentoined above problems still exists in current solution
Doom9
9th February 2006, 12:55
Window overlaping problem - when i trying to change crop values AvisynthWindow && underlayng main form overlap preview and via versaIt's just a preview.. it doesn't matter much where exactly on the screen it is (and how large it is for that matter.. it can be resized) There is no absolute need to have no overlap at all unlike your solution.
I does not view which data is cropped (all cropped regions are filled by white)That is desired behavior. In fact, years of freeform image capturing for guides have thaught me the hard way that lines on top of things just don't work properly.. if it's either there or gone you know exactly what is happening.. with a thin line, it's so much harder to discern borders.
# I does not view resolution after crop and MOD informationI don't get that.
dimzon
9th February 2006, 13:13
There is no absolute need to have no overlap at all unlike your solution.
This overlapping is very annoyng for me, really.
That is desired behavior. In fact, years of freeform image capturing for guides have thaught me the hard way that lines on top of things just don't work properly.. if it's either there or gone you know exactly what is happening.. with a thin line, it's so much harder to discern borders.
As I said before i propose to make it optional - fill all cropped area by white or draw lines - it can be controlled via checkbox.
I don't get that.
Sorry, don't understand your answer...
By the way - as I said before I propose to keep both cropping variants. We can place cropping "gamepad" on AviSynth window and duplicate it @ CropDialog.
dimzon
9th February 2006, 13:22
by the way:
there are new Nero7 AAC beta
http://www.mp3-tech.org/content/?48kbps%20AAC%20public%20test
http://www.mp3-tech.org/tests/aac_48/nd_audio_02_feb_2006.7z
Doom9
9th February 2006, 13:35
This overlapping is very annoyng for me, really.And on the other hand of the spectrum we have people telling me it's not enough like GKnot (GKnot does it the way I do it). It's just a matter of approach.. I like the GKnot one. And I have yet to hear one single complaint about this way of doing things.. now I'm sure you can dig up some VDub fans to make your point.. but GKnot has been around for years and it separates controls from preview as well.
dimzon
9th February 2006, 13:52
And on the other hand of the spectrum we have people telling me it's not enough like GKnot (GKnot does it the way I do it). It's just a matter of approach.. I like the GKnot one. And I have yet to hear one single complaint about this way of doing things.. now I'm sure you can dig up some VDub fans to make your point.. but GKnot has been around for years and it separates controls from preview as well.
as I said before I propose to keep both cropping variants. We can place cropping "gamepad" on AviSynth window and duplicate it @ CropDialog.
stax76
9th February 2006, 14:09
You could make a poll about what cropping approach people like most, I propose to include as poll options VD, GK, StaxRip, MeGUI and all other applications that have good cropping support.
dimzon
9th February 2006, 14:11
You could make a poll about what cropping approach people like most, I propose to include as poll options VD, GK, StaxRip, MeGUI and all other applications that have good cropping support.
as I said before I propose to keep both cropping variants. We can place cropping "gamepad" on AviSynth window and duplicate it @ CropDialog. Using this option we can satisfy mostly all users ;)
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.