Log in

View Full Version : MeGUI development


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 [77] 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92

Kurtnoise
22nd June 2008, 09:19
What's the status of this bug (https://sourceforge.net/tracker/index.php?func=detail&aid=1858101&group_id=156112&atid=798476)? The OP claims that when "Automatically set number of threads" is set, the xvid commandline has "-threads 1". However, I just tested and it clearly has "-threads 0", which I have verified does actually cause xvid to auto-set the threadcount. However, I can't see any bugfixes in the log which would have changed "-threads 1" to "-threads 0", so it seems like the OP was just wrong. Shall I close it?
I think yes...

stax76
22nd June 2008, 09:24
In StaxRip I demux all, there was only one request in 7 years to give control over this but it don't fit into StaxRip's philosophy (do what's practical automatically). It's however possible to read the language in the IFO file (assuming it was ripped without stream processing (normal case)) using MediaInfo, StaxRip does this to rename the audio files with a much better name:

VTS_01_1 01 en-English 3_2ch 384Kbps DELAY -192ms.ac3
VTS_01_1 02 de-German 3_2ch 384Kbps DELAY -192ms.ac3
VTS_01_1 03 hu-Hungarian 3_2ch 384Kbps DELAY -192ms.ac3
VTS_01_1 04 en-English Director's comments 2_0ch 192Kbps DELAY -128ms.ac3

check
22nd June 2008, 13:26
Would you guys like me to setup a Trac install or something for the MeGUI project? Personally, I am not a fan of the sourceforge tools at all, and prefer most alternatives to them. If you'd like something like Trac or Bugzilla setup, please just ask.

arrirc
22nd June 2008, 17:30
I would like to install the development version as the last stable version is not working. But I can not compile from source, so could someone please post a link to the development version compiled for Windows XP SP2 32 bit?

Any help please?

The latest stable version seems to having issues with .NET....:confused:

Maccara
22nd June 2008, 17:46
Any help please?

The latest stable version seems to having issues with .NET....:confused:

If you have .net sdk installed but can't compile from sources, you can fix this also by using corflags to force 32bit execution (or uninstall 64bit framework).

Like so: F:\Program Files\Microsoft.NET\SDK\v2.0 64bit\Bin\corflags.exe /32BIT+ megui.exe

This will change the clr header for the exe.

BiO-HaZaRd
22nd June 2008, 21:27
Wich version of megui is the last stable one? cause in the sourceforge page theres only the 0.2.6.1046 one, and sice i updated tu the 1048 i'm having really weird problems...

Shoud i just not update to that version?

arrirc
22nd June 2008, 21:45
If you have .net sdk installed but can't compile from sources, you can fix this also by using corflags to force 32bit execution (or uninstall 64bit framework).

Like so: F:\Program Files\Microsoft.NET\SDK\v2.0 64bit\Bin\corflags.exe /32BIT+ megui.exe

This will change the clr header for the exe.

Sorry but I have no idea how to compile...I'm not a programmer.

berrinam
23rd June 2008, 00:35
@arrirc, Maccara, BiO-HaZaRd: please take your discussion to the MeGUI troubleshooting thread. This thread is about MeGUI development.

berrinam
23rd June 2008, 00:39
Would you guys like me to setup a Trac install or something for the MeGUI project? Personally, I am not a fan of the sourceforge tools at all, and prefer most alternatives to them. If you'd like something like Trac or Bugzilla setup, please just ask.

I've had no experience with Trac or Bugzilla, so I don't know. I have seen Trac used on a number of sites, though, and it looks quite nice... it's got some kind of wiki integration as well, doesn't it?

berrinam
23rd June 2008, 00:43
I think yes...Done.

berrinam
23rd June 2008, 00:45
as developper, that will be the easier solution but in the other hand as end user point of view, that could be seen as a feature regression...:)

We could try doing it and see if anyone complains.:) Although that is perhaps not the nicest thing to do to the users.

Stax's renaming trick seems quite useful.

rebkell
23rd June 2008, 01:03
Is there anyway to disable/enable cleanup on autoencode and one step encodiing? I sometimes have audio problems on captured HDTV, local stations screw up the audio and it would be easier if I had the raw video available to mux with when I get the audio straightened out?

berrinam
23rd June 2008, 01:39
@rebkell: Please do not post on the development thread. The "General questions and troubleshooting" thread is the appropriate place.

berrinam
23rd June 2008, 01:40
I think 0.3.x.x is getting quite stable now. Most of the bugs on the SF tracker are either fixed or can't be reproduced.

As there are a number of small features in the feature request tracker that I'd like to implement, I would like to tag 0.3.x.x now and -- after the new DGIndex code and my zones code is committed -- only commit bug fixes. Also, I think we should put 0.3.x.x on the stable autoupdate servers.

I think this point is actually becoming more valid now. The audio bugs in 0.2.6.1047-8 cannot easily be diagnosed because error messages are not properly logged. 0.3.x.x does properly log the error messages.

rebkell
23rd June 2008, 01:49
@rebkell: Please do not post on the development thread. The "General questions and troubleshooting" thread is the appropriate place.

Sorry, it was actually a request, I didn't realize the capability existed.

check
23rd June 2008, 04:38
I've had no experience with Trac or Bugzilla, so I don't know. I have seen Trac used on a number of sites, though, and it looks quite nice... it's got some kind of wiki integration as well, doesn't it?
Yes, the official site probably explains its much better than I can. This page (http://trac.edgewall.org/wiki/TracGuide) has a good list of its features. The one thing it misses you guys might need is a 'forum'. You get support tickets instead, which can be harder to users to search through. Setting up a separate forum would be dead simple though.

Basically, I'm happy to setup any sort of infrastructure you guys would like for managing MeGUI, just let me know what you'd like (or if you want me to shortlist alternatives.

Kurtnoise
23rd June 2008, 06:44
We could try doing it and see if anyone complains.:) Although that is perhaps not the nicest thing to do to the users.

Stax's renaming trick seems quite useful.
renaming tracks is not a problem...Problem is : if we want to demux only 1 track using the last DGindex interface, tracks IDs are required.

Either we delete this feature, or we keep it and we try to make something useable with it. All I can say depends mainly on *when* and *what* we want to have in the 0.3.xxx stable version.


All in all, I'm interested to release it as soon as possible.

Kurtnoise
23rd June 2008, 06:46
Yes, the official site probably explains its much better than I can. This page (http://trac.edgewall.org/wiki/TracGuide) has a good list of its features. The one thing it misses you guys might need is a 'forum'. You get support tickets instead, which can be harder to users to search through. Setting up a separate forum would be dead simple though.

Basically, I'm happy to setup any sort of infrastructure you guys would like for managing MeGUI, just let me know what you'd like (or if you want me to shortlist alternatives.
Trac is quite great...but what about the download page for end-users ?

check
23rd June 2008, 07:44
Trac is quite great...but what about the download page for end-users ?It includes a wiki for documentation. Either that can be the frontpage, or a static HTML frontpage can be put in front of the whole Trac install. The latter seems to be a common way of dealing with this question.

Sharktooth
23rd June 2008, 14:48
stable0.2.6.1049
- (berrinam) Added locking around getJobToProcess() to eliminate race condition on job starting (should fix #1932378: Two workers started working on same job)
- (berrinam) MediaInfo should now properly detect .m4v files. (Fixes adaptive muxing for .m4v files)
- (berrinam) Removed MP4 output from xvid_encraw, since it was never actually supported.
- (berrinam) Fixed #1870331 (User specified sizes in bitrate calcs not remembered)
- (berrinam) [AvisynthAudioEncoder] Log audio error messages.

dev0.3.0.1010 (includes the fixes and additions up to ver. 0.2.6.1049)
- (berrinam) Better rationalisation of ARs in AVS window. Patch by i_a


Dev version installer: http://www.webalice.it/f.corriga/megui/megui-0_3_0_1010.exe

berrinam
23rd June 2008, 15:02
"Log audio error messages" was actually done on the stable build. The dev build already has good logging for that.

Sharktooth
23rd June 2008, 15:05
my mistake. ill correct it in the next build.

berrinam
24th June 2008, 01:21
Apparently the new NicAudioSource cannot support some files which the old one could. See this bug (https://sourceforge.net/tracker/index.php?func=detail&aid=2000167&group_id=156112&atid=798476) for details.

berrinam
24th June 2008, 01:25
This adds zones support back, in the main window. I've attempted to do the minimum changes simply to get it working:

http://www.box.net/shared/97swopctcg

Can I commit this?

Kurtnoise
24th June 2008, 06:37
Apparently the new NicAudioSource cannot support some files which the old one could. See this bug (https://sourceforge.net/tracker/index.php?func=detail&aid=2000167&group_id=156112&atid=798476) for details.
I'll check out but this guy could try to transcode his input file directly instead of using the wav...


edit: yes, i confirm this bug...:-/

Kurtnoise
24th June 2008, 06:38
Can I commit this?
sure...it looks ok for me. :)

check
25th June 2008, 04:26
Who is in control the megui.org domain? I need the password for SSH access to the master autoupdate cache again, my mirror has not been updating itself properly.

Sharktooth
25th June 2008, 14:27
IIRC: http://forum.doom9.org/member.php?u=1704

tebasuna51
25th June 2008, 19:51
I'll check out but this guy could try to transcode his input file directly instead of using the wav...


edit: yes, i confirm this bug...:-/

NicAudio.dll support wav container with mp3 or ac3 streams, extracted from VDM like wav but with 'Direct Stream Copy' mode, with the appropriate methods NicMPG123Source or NicAc3Source.


Apparently the new NicAudioSource cannot support some files which the old one could. See this bug for details.
No changes about this from old/new NicAudio.dll

Kurtnoise
25th June 2008, 21:47
This adds zones support back, in the main window. I've attempted to do the minimum changes simply to get it working
I'm just testing it...(I had only review the code before ;))

Few notes:
quantizers values should be clamped according to the video codec selected I think (i.e for xvid >> not much higher than 31).
video preview shouln't be closed when we hit the "edit zones" button first...ok, there is the preview button in the form.



@check: could you try to build a trac system and give an access in private to the all devs for beta testing or something ? that could be great.

berrinam
26th June 2008, 03:24
quantizers values should be clamped according to the video codec selected I think (i.e for xvid >> not much higher than 31).The problem with this is it introduces a sensitive dependence on which profile is currently selected. Imagine: you set up your zones carefully in x264 at very high quantizers (>31) and then you are changing video profiles and accidentally select xvid. All of a sudden, your zones have been clamped to the xvid range.

Although we wouldn't have had this problem if we kept zones inside the codec config, we had similar problems before: specifically, whenever the user changed selected profile, they would have to copy their zone settings to the new profile.

For simplicity, I would like to avoid adjusting the zones config according to what profile is selected. The best solution I can think of at the moment is:
In the zones config, don't provide access to quantizer, but instead let the user choose the abstract "quality level" -- a choice of Even lower Lower Higher Even higher
Each codec profile allows you to set the quantizer for each quality level. So, for instance, in x264, you might have the standard CRF at 22, with lower at 24, even lower at 26, etc. Whereas in xvid you might set CQ=4, lower=5, even lower=6, higher=3, even higher=2.
As far as I can see, this handles the standard use of zones while avoiding explicit dependence on the codec used.

video preview shouln't be closed when we hit the "edit zones" button first...ok, there is the preview button in the form.The zones preview window is slightly different from the standard one, so it makes sense to close the original one. However, it probably makes sense to automatically open the zones preview window; maybe a settings option to automatically open zones preview? Maybe just use the option "automatically open preview window"?

berrinam
26th June 2008, 03:27
@check: could you try to build a trac system and give an access in private to the all devs for beta testing or something ? that could be great.

Indeed. :)

Thanks.

check
26th June 2008, 03:29
Sure. I am taking some annual leave this weekend and early next week, so it will happen sometime late next week or (more likely) next weekend.

EDIT: this estimate might turn out to be optimistic. I am planning a few 'architectural' changes to my infrastructure to take place before I get any new services up and running, so the wait might be two weeks now. Sorry to get everyone excited about Trac and then to have such a long wait :P

tebasuna51
26th June 2008, 11:25
...
And I suggest use also RaWavSource (included in NicAudio v2.0) for wav (WAVE_FORMAT_EXTENSIBLE header supported) and also other uncompressed formats always supporting files > 4GB.
See the Kurtnoise MeGui Feature request (http://sourceforge.net/tracker/index.php?func=detail&aid=1830524&group_id=156112&atid=798479):
case ".wav":
case ".w64":
case ".aif":
case ".au":
case ".caf":
case ".bwf":
script.AppendFormat("RaWavSource(\"{0}\", 2){1}", audioJob.Input, Environment.NewLine);
break;
...

Maybe the problem with the mp3/ac3 in wav container from VirtualDubMod, was this suggestion to replace the standard procedure WavSource with RaWavSource without support for compressed data in wav container. My fault.

The solutions are:
1) return to WavSource losing the support for WAVE_FORMAT_EXTENSIBLE wav headers (until AviSynth v2.5.8) and the support for files > 4GB. If the compress format is ac3 is decoded always using DRC, undesired for transcode.

2) say the users to rename this files to the appropriate extension mp3 or ac3 like now we need rename the wavdts.wav to wavdts.dts. Or best, use the DEMUX button in VDM.

3) try to detect the internal wav data format to send the file to the appropriate method: WavSource, RaWavSource, NicAc3Source, NicMPG123Source. Maybe also we can detect wavdts (with wrong wav header) not supported now, and send the data to NicDtsSource.

Of course the best choice is 3) but need some code effort. The job can't be do by NicAudio because WavSource with internal decoders have support for many formats not supported in NicAudio (ADPCM, ALAW, MULAW, ...).

Kurtnoise
26th June 2008, 17:47
The problem with this is it introduces a sensitive dependence on which profile is currently selected. Imagine: you set up your zones carefully in x264 at very high quantizers (>31) and then you are changing video profiles and accidentally select xvid. All of a sudden, your zones have been clamped to the xvid range.

Although we wouldn't have had this problem if we kept zones inside the codec config, we had similar problems before: specifically, whenever the user changed selected profile, they would have to copy their zone settings to the new profile.
yes, completely agreed...

For simplicity, I would like to avoid adjusting the zones config according to what profile is selected. The best solution I can think of at the moment is:
In the zones config, don't provide access to quantizer, but instead let the user choose the abstract "quality level" -- a choice of Even lower Lower Higher Even higher
Each codec profile allows you to set the quantizer for each quality level. So, for instance, in x264, you might have the standard CRF at 22, with lower at 24, even lower at 26, etc. Whereas in xvid you might set CQ=4, lower=5, even lower=6, higher=3, even higher=2.
As far as I can see, this handles the standard use of zones while avoiding explicit dependence on the codec used.
sounds good to me...but this needs to be tested. ;) Anyway, my comments were more for the next releases (0.4.xxx), not the current ones.

The zones preview window is slightly different from the standard one, so it makes sense to close the original one. However, it probably makes sense to automatically open the zones preview window; maybe a settings option to automatically open zones preview? Maybe just use the option "automatically open preview window"?
well...I'm ok to let the user to choose this via the settings.

Kurtnoise
26th June 2008, 17:49
Maybe the problem with the mp3/ac3 in wav container from VirtualDubMod, was this suggestion to replace the standard procedure WavSource with RaWavSource without support for compressed data in wav container. My fault.

The solutions are:
1) return to WavSource losing the support for WAVE_FORMAT_EXTENSIBLE wav headers (until AviSynth v2.5.8) and the support for files > 4GB. If the compress format is ac3 is decoded always using DRC, undesired for transcode.

2) say the users to rename this files to the appropriate extension mp3 or ac3 like now we need rename the wavdts.wav to wavdts.dts. Or best, use the DEMUX button in VDM.

3) try to detect the internal wav data format to send the file to the appropriate method: WavSource, RaWavSource, NicAc3Source, NicMPG123Source. Maybe also we can detect wavdts (with wrong wav header) not supported now, and send the data to NicDtsSource.

Of course the best choice is 3) but need some code effort. The job can't be do by NicAudio because WavSource with internal decoders have support for many formats not supported in NicAudio (ADPCM, ALAW, MULAW, ...).
Is there somewhere some code to detect dts/ac3/mp3 data streams from the wav container ?


@all : I hope to commit the new DGindex stuff this weekend...before to take a break during July (yeah...some vacations :)).

tebasuna51
27th June 2008, 13:18
Is there somewhere some code to detect dts/ac3/mp3 data streams from the wav container ?

Maybe something like:
case ".wav":
Stream = fopen(wavfile, "rb");
_fseeki64(Stream, 20, SEEK_SET); // AudioFormat offset

fread(aux, 1, 2, Stream);
AudioFormat = (((aux)[0]&0xff)|((aux)[1]<<8)); // Or something to read a LE int_16


switch (AudioFormat) {

case 0x0001: // PCM Format Int
_fseeki64(Stream, 44, SEEK_SET); // DtsHeader offset

fread(aux, 1, 4, Stream);
DtsHeader = (((aux)[0]&0xff)|((aux)[1]<<8)|((aux)[2]<<16)|((aux)[3]<<24)); // Or something to read a LE int_32

if (DtsHeader = 0xE8001FFF) {
script.AppendFormat("NicDtsSource(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
break;
}
case 0x0003: // IEEE Float
case 0xFFFE: // WAVE_FORMAT_EXTENSIBLE header
script.AppendFormat("RaWavSource(\"{0}\", 2){1}", audioJob.Input, Environment.NewLine);
break;
case 0x0055: // MPEG Layer 3
script.AppendFormat("NicMPG123Source(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
break;
case 0x2000: // AC3
script.AppendFormat("NicAc3Source(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
break;
default:
script.AppendFormat("WavSource(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
}

fclose(Stream);
break;

Underground78
27th June 2008, 15:04
Hello,

As usual it's without garanty but I've tried to improve this log message (http://forum.doom9.org/showthread.php?p=1152953#post1152953) a bit. I'm sure the messages aren't perfect but it can give you a starting point to do better ...

Index: CommandlineVideoEncoder.cs
===================================================================
--- CommandlineVideoEncoder.cs (revision 566)
+++ CommandlineVideoEncoder.cs (working copy)
@@ -74,10 +74,14 @@

LogItem stats = log.Info("Final statistics");

- if (job.Settings.EncodingMode != 1)
+ if (job.Settings.EncodingMode == 1) // QP mode
+ stats.LogValue("Constant quantizer mode", "quantizer " + job.Settings.BitrateQuantizer + " used");
+ else if (job.Settings.EncodingMode == 9) // CRF mode
+ stats.LogValue("Constant quality mode", "quality " + job.Settings.BitrateQuantizer + " used");
+ else
stats.LogValue("Desired video bitrate", job.Settings.BitrateQuantizer + " kbit/s");

- stats.LogValue("Obtained video bitrate (approximate", bitrate + " kbit/s");
+ stats.LogValue("Obtained video bitrate (approximate)", bitrate + " kbit/s");
}
}
catch (Exception e)

Underground78
27th June 2008, 15:31
Just a missing event handler for Xvid max key frame interval :

Index: xvidConfigurationPanel.Designer.cs
===================================================================
--- xvidConfigurationPanel.Designer.cs (revision 566)
+++ xvidConfigurationPanel.Designer.cs (working copy)
@@ -498,6 +498,8 @@
this.xvidKeyframeInterval.Size = new System.Drawing.Size(40, 20);
this.xvidKeyframeInterval.TabIndex = 6;
this.xvidKeyframeInterval.Text = "300";
+ this.xvidKeyframeInterval.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textField_KeyPress);
+ this.xvidKeyframeInterval.TextChanged += new System.EventHandler(this.updateEvent);
//
// xvidKeyframeIntervalLabel
//

Kurtnoise
27th June 2008, 18:34
@tebasuna : what is it "aux" in your code ?

@Underground78 : both applied. thanks...

tebasuna51
28th June 2008, 02:24
@tebasuna : what is it "aux" in your code ?

unsigned char aux[4] = ""; // only a byte buffer

I don't remember if Megui is C, C+, C++, C-, C#, ...
we only need read AudioFormat (Litle Endian 16 bit unsigned) at offset 20 and DtsHeader (Litle Endian 32 bit unsigned) at offset 44.

Kurtnoise
28th June 2008, 05:58
MeGUI is coded in C#...just like BeHappy. ;)

btw, there is no unsigned char type in C#. I'd say that byte is fine for this.

Kurtnoise
28th June 2008, 09:50
Here is something more usable in C# :

Index: AviSynthAudioEncoder.cs
===================================================================
--- AviSynthAudioEncoder.cs (revision 570)
+++ AviSynthAudioEncoder.cs (working copy)
@@ -552,6 +552,46 @@
script.AppendFormat("NicMPG123Source(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
break;
case ".wav":
+ FileStream fs = new FileStream(audioJob.Input, FileMode.Open, FileAccess.ReadWrite);
+ fs.Seek(20, SeekOrigin.Begin); // AudioFormat offset
+ byte[] aux = new byte[4]; // only a byte buffer
+
+ fs.Read(aux, 1, 2);
+ UInt16 AudioFormat = (UInt16)(((aux)[0] & 0xff) | ((aux)[1] << 8)); // Or something to read a LE int_16
+
+
+ switch (AudioFormat)
+ {
+
+ case 0x0001: // PCM Format Int
+ fs.Seek(44, SeekOrigin.Current); // DtsHeader offset
+
+ fs.Read(aux, 1, 4);
+ UInt32 DtsHeader = (UInt32)(((aux)[0] & 0xff) | ((aux)[1] << 8) | ((aux)[2] << 16) | ((aux)[3] << 24)); // Or something to read a LE int_32
+
+ if (DtsHeader == 0xE8001FFF)
+ {
+ script.AppendFormat("NicDtsSource(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
+ break;
+ }
+ break;
+ case 0x0003: // IEEE Float
+ case 0xFFFE: // WAVE_FORMAT_EXTENSIBLE header
+ script.AppendFormat("RaWavSource(\"{0}\", 2){1}", audioJob.Input, Environment.NewLine);
+ break;
+ case 0x0055: // MPEG Layer 3
+ script.AppendFormat("NicMPG123Source(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
+ break;
+ case 0x2000: // AC3
+ script.AppendFormat("NicAc3Source(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
+ break;
+ default:
+ script.AppendFormat("WavSource(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
+ break;
+ }
+
+ fs.Close();
+ break;
case ".w64":
case ".aif":
case ".au":



edit: doesn't seem to work correctly. WavSource(...) is always returned. Tested with MP3 & AC3...

tebasuna51
28th June 2008, 13:56
Here is something more usable in C# :
...
edit: doesn't seem to work correctly. WavSource(...) is always returned. Tested with MP3 & AC3...

This can work in C#:
Index: AviSynthAudioEncoder.cs
===================================================================
--- AviSynthAudioEncoder.cs (revision 570)
+++ AviSynthAudioEncoder.cs (working copy)
@@ -552,6 +552,46 @@
script.AppendFormat("NicMPG123Source(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
break;
case ".wav":
+ BinaryReader r = new BinaryReader(File.Open(audioJob.Input, FileMode.Open));
+
+ try {
+ r.ReadBytes(20);
+ UInt16 AudioFormat = r.ReadUInt16(); // read a LE int_16, offset 20 + 2 = 22
+
+ switch (AudioFormat) {
+ case 0x0001: // PCM Format Int
+ r.ReadBytes(22); // 22 + 22 = 44
+ UInt32 DtsHeader = r.ReadUInt32(); // read a LE int_32
+
+ if (DtsHeader == 0xE8001FFF)
+ script.AppendFormat("NicDtsSource(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
+ else
+ script.AppendFormat("RaWavSource(\"{0}\", 2){1}", audioJob.Input, Environment.NewLine);
+ break;
+ case 0x0003: // IEEE Float
+ case 0xFFFE: // WAVE_FORMAT_EXTENSIBLE header
+ script.AppendFormat("RaWavSource(\"{0}\", 2){1}", audioJob.Input, Environment.NewLine);
+ break;
+ case 0x0055: // MPEG Layer 3
+ script.AppendFormat("NicMPG123Source(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
+ break;
+ case 0x2000: // AC3
+ script.AppendFormat("NicAc3Source(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
+ break;
+ default:
+ script.AppendFormat("WavSource(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
+ break;
+ }
+ }
+
+ catch(EndOfStreamException e) {
+ Console.WriteLine("{0}, wavfile can't be read.", e.GetType().Name);
+ }
+ finally {
+ r.Close();
+ }
+
+ break;
case ".w64":
case ".aif":
case ".au":

Kurtnoise
28th June 2008, 16:00
I found something similar...;)

Index: AviSynthAudioEncoder.cs
===================================================================
--- AviSynthAudioEncoder.cs (revision 570)
+++ AviSynthAudioEncoder.cs (working copy)
@@ -552,6 +552,52 @@
script.AppendFormat("NicMPG123Source(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
break;
case ".wav":
+ using (FileStream fs = new FileStream(audioJob.Input, FileMode.Open, FileAccess.ReadWrite))
+ {
+ using (BinaryReader r = new BinaryReader(fs))
+ {
+ fs.Position = 20; // Offset
+ UInt16 AudioFormat = r.ReadUInt16(); // read a LE int_16
+
+ switch (AudioFormat)
+ {
+ case 0x0001: // PCM Format Int
+ fs.Position = 44; // Offset
+ UInt32 DtsHeader = r.ReadUInt32(); // read a LE int_32
+
+ if (DtsHeader == 0xE8001FFF)
+ {
+ script.AppendFormat("NicDtsSource(\"{0}\"", audioJob.Input);
+ if (audioJob.Settings.AutoGain)
+ script.AppendFormat(", DRC=1){0}", Environment.NewLine);
+ else
+ script.Append(")");
+ break;
+ }
+ break;
+ case 0x0003: // IEEE Float
+ case 0xFFFE: // WAVE_FORMAT_EXTENSIBLE header
+ script.AppendFormat("RaWavSource(\"{0}\", 2){1}", audioJob.Input, Environment.NewLine);
+ break;
+ case 0x0055: // MPEG Layer 3
+ script.AppendFormat("NicMPG123Source(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
+ break;
+ case 0x2000: // AC3
+ script.AppendFormat("NicAc3Source(\"{0}\"", audioJob.Input);
+ if (audioJob.Settings.AutoGain)
+ script.AppendFormat(", DRC=1){0}", Environment.NewLine);
+ else
+ script.Append(")");
+ break;
+ default:
+ script.AppendFormat("WavSource(\"{0}\"){1}", audioJob.Input, Environment.NewLine);
+ break;
+ }
+ r.Close();
+ }
+ fs.Close();
+ }
+ break;
case ".w64":
case ".aif":
case ".au":


thanks btw...

73ChargerFan
28th June 2008, 16:53
Bug Report - Aspect Ratio, Anamorphic
Seems that the aspect ratio is forgotten or not carried through megui.

I transcoded a 16x9 720x480 video from .TS to x264/mp4 last night using a fresh install of latest dev build 0_3_0_1010.


DGIndexProjectFile16
1
P:\New Movies\Hellboy Extras\Minatures - 1 - MPEG2, 480i60.m2v

Stream_Type=0
MPEG_Type=2
iDCT_Algorithm=6
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
Aspect_Ratio=16:9
Picture_Size=720x480
Field_Operation=0
Frame_Rate=29970 (30000/1001)
Location=0,0,0,54c3e


The d2v creator listed the aspect ratio as 16x9, but the preview was 3x4 +/- there and in the main window.
The mp4 resulted renders as a 3x4 +/- in MPC-HC 580.

I dropped the mp4 into mkvmerge, which couldn't determine the aspect ratio, so I specified it as 16x9.
The mkv file is rendered correctly.

Sharktooth
29th June 2008, 03:51
weird. i just did 2 anamorphic encodes and it works well.
ensure you click the "show DAR" in the preview (main window... not avisynth script creator) to check the AR.

berrinam
29th June 2008, 09:00
In AviSynthWindow.openDirectShow(), there is some code which first gets MeGUI to open the file with DirectShow, before telling Avisynth to use DirectShowSource(). I am doing some improvements to the avisynthwindow, and I would like to remove that code.

Is there a reason it is needed? Surely, if it won't render in directshow, then avisynth will tell us that, so there seems no need to check for ourselves first...

Kurtnoise
29th June 2008, 09:29
yep...ok to remove this.

Kurtnoise
29th June 2008, 16:04
guys, I'm tired to support the last DGindex stuff. I tried 2-3 different things, but no one seem to be fine. I hate to code sometimes when nothing work correctly... :(

So,
either we remove the audio tracks selection to use the last release (might be a feature regression for end-users though) as suggested by berrinam.
or we keep that way but we update *only* DGdecode.dll (from the last release) to fix the bug with BT.xxx.


Whatever you choose (as target release for the 0.3.xxxx build), both are ok for me.