Log in

View Full Version : MeGUI 6.6.6.6 20260403 released


Pages : [1] 2 3 4 5 6 7 8 9 10

Kurt.noise
14th March 2024, 14:48
Hi,

I recently forked (https://github.com/Kurtnoise29/megui) the latest megui from there (https://sourceforge.net/p/megui/)and decided to update few things on it. Yeah, it's still alive more than 20+ years ago :D

As A/V encoders I plan to add svt-av1 and exhale.

I'll post here some builds if some people are interested.

Note that I use mainly x64 tools. So, don't expect some enhancements in the x86/32 bits world.

If you have some ideas or bugs to be fixed, please let me know.

The releases are available there : https://github.com/Kurtnoise-zeus/megui/releases

Barough
14th March 2024, 19:51
Please share some builds here or on your github page :)

kalehrl
14th March 2024, 19:58
Great news for MeGUI lovers!
Thank you.

Kurt.noise
22nd March 2024, 15:20
Here you go,

https://github.com/Kurtnoise29/megui/releases/tag/6666.2203

Nothing really new from the latest beta official release except :

- Added time modification 23 <-> 24 for audio conversion (https://sourceforge.net/p/megui/feature-requests/690/).
- Allowed UTF8 encoding format as Reader/Writer for avisynth input files.

Provide only x64 builds.


Have fun.

kalehrl
22nd March 2024, 21:37
Thank you.
Have you updated the tools to their latest versions?

Kurt.noise
23rd March 2024, 11:30
Only MediaInfo and the required Avisynth Wrapper libraries. The rest can be replaced manually easily.

tebasuna51
23rd March 2024, 11:54
Glad to read you Kurt, thank you for your effort to revive MeGUI.

I can make some test always with the development server versions:
Options -> Extended -> Use development update server
Tools -> Update -> Show all packages (enable and update all)

About last tools we can see https://forum.doom9.org/showthread.php?p=1981982#post1981982
But we need test if work correctly with MeGUI.

Some questions about AviSynth:

1) To work with Avs+ remember the AviSynth Wrapper (https://forum.doom9.org/showthread.php?p=1913117#post1913117)

2) I work always with the installed, now AviSynthPlus r4067, but MeGUI must work at least with AviSynth+ v3.7.3 with many important improvements over 3.5.1.

3) Of course I recommend the last plugins versions of DGtools, ffms2, lsmash, ...

Also I recommend the lasts eac3to versions with improvements managing EAC3 audio very common now.

Kurt.noise
23rd March 2024, 12:46
Thanks Tebasuna.

1/ Yes, the build uses the Avisynth wrapper you have linked. I forgot to mention it previously. It's included.
2/ Yes, Im using the latest Avisynth+ v3.7.3 official release without issues for the moment. Not tested anything else though.
3/ Yes, of course. It's better to use the latest tools available around there. Feel free to test them. But personally, I'm using my own compile tools without issues with the MeGUI I released.

VoodooFX
23rd March 2024, 15:16
Look there for the bugs -> https://sourceforge.net/p/megui/bugs

This is one of the bigger ones -> https://sourceforge.net/p/megui/bugs/990/

Kurt.noise
24th March 2024, 08:10
This is one of the bigger ones -> https://sourceforge.net/p/megui/bugs/990/
How can I reproduce this with so few informations ? Whats the input ? Whats the avs script ? Any log ?

von Suppé
24th March 2024, 10:20
Good to see MeGUI is still being worked on. Kudos @Kurt.noise :thanks:

tebasuna51
24th March 2024, 12:33
This is one of the bigger ones -> https://sourceforge.net/p/megui/bugs/990/

I can't reproduce the problem with MeGUI32,64 or 6666, using DGindex, ffms2 or Lsmash decoders. It is ok for me.

VoodooFX
24th March 2024, 16:18
How can I reproduce this with so few informations ? Whats the input ? Whats the avs script ? Any log ?

I didn't encountered it, just seen this issue posted in a lot of places, maybe it was solved.

I've seen this bug -> https://sourceforge.net/p/megui/bugs/976/?limit=25#7445

Kurt.noise
2nd April 2024, 10:07
New fresh build available : https://github.com/Kurtnoise-zeus/megui/releases/latest

tebasuna51
2nd April 2024, 13:09
New fresh build available : https://github.com/Kurtnoise-zeus/megui/releases/latest

Thanks. Then we need download new 6666 versions from github instead with the MeGUI Updater tool.

BTW when I try to update dgindexnv-250 fails because try upload dgindexnv-250-231115-64-64.7z, maybe there are a extra "-64"

Kurt.noise
2nd April 2024, 15:42
BTW when I try to update dgindexnv-250 fails because try upload dgindexnv-250-231115-64-64.7z, maybe there are a extra "-64"
I cannot access to this server...so, I cannot check whats the real name of the package.

Kurt.noise
3rd April 2024, 09:54
fyi, I just uploaded a fresh build for x86 plateform (not tested though). Some people seems to be interested by using it.

Same link as above.

VoodooFX
3rd April 2024, 10:44
If Zathor is MIA then maybe talk to Wilbert -> https://forum.doom9.org/showthread.php?t=185020

Kurt.noise
3rd April 2024, 12:25
I will. Thanks for the tips.

tormento
3rd April 2024, 15:01
What about having a proper and functioning update repository?

I keep MeGUI for its autoupdate feature but it's a long time that some tools are obsolete.

Kurt.noise
4th April 2024, 08:48
What about having a proper and functioning update repository?

I keep MeGUI for its autoupdate feature but it's a long time that some tools are obsolete.
the current one is working...the problem is to have/find somebody who is capable of doing the upgrade regularly.

tebasuna51
4th April 2024, 11:34
Yes, the problem is check if all the new versions works fine with MeGUI.

Like I say before the last versions can be found here https://forum.doom9.org/showthread.php?p=1981982#post1981982
Feel free to check it.
I can help with the audio management involved with last versions of:
avisynth, ffms2, lsmash, eac3to and audio encoders.

And there are some ones, not obsolete but discontinued and still usefull like:
avi-mux_gui-1.17.8.3
haali_2859
besplit-0.9b8
NeroAacEnc 1.5.4.0
pgcdemux_1.2.0.5
vsrip_1007

tebasuna51
4th April 2024, 16:22
WARNING: in the last (LSMASHSource.dll 2024/04/02) LSMASHAudioSource is broken (https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues/63) (wrong channels and decode), use always LWLibavAudioSource than seems work fine.

tebasuna51
5th April 2024, 14:12
LSMASHAudioSource problem encoding a standard 5.1 wav

-[Warning] Log for job1 (audio, 6p321.wav -> 6p321.ac3
...
--[Information] [04/04/2024 16:03:26] Successfully opened the file with LWLibavAudioSource()
--[Warning] [04/04/2024 16:03:27] Channel count mismatch! The input file is reporting 6 channels and the AviSynth script is reporting 2 channels
...
---[NoImage] LSMASHAudioSource("C:\tmp\6p321.wav", drc_scale=0.0)
---[NoImage] # detected channels: 6
---[NoImage] # detected channel positions: 3/2/0.1
...
--[Information] [04/04/2024 16:03:28] Output Decoder
---[Information] [04/04/2024 16:03:28] Channels: 2

For what say "Successfully with LWLibavAudioSource" and after open it with LSMASHAudioSource?

MediaInfo problem open eac3 with 8 channels:

---[Information] Audio
----[Information] Format: E-AC-3
----[Information] Channels: 8
----[Information] ChannelPositionsString2: 3/2/0.1
...
---[NoImage] LWLibavAudioSource("C:\tmp\8w341.eac3", drc_scale=0.0)
---[NoImage] # detected channels: 8
---[NoImage] # detected channel positions: 3/2/0.1
---[NoImage] c6_dpl2(ConvertAudioToFloat(last))
...
--[Error] [05/04/2024 11:02:57] An error occurred: Script error: There is no function named 'c6_dpl2'.

Wrong ChannelPositionsString2: 3/2/0.1 (only 6 channels) and try load c6_dpl2 when I want a c71_c51 downmix.
Using AviSynth 3.7.3 the MediaInfo data must be ignored and use the AvsChannelMask defined here:
https://github.com/AviSynth/AviSynthPlus/blob/master/avs_core/include/avisynth.h

tormento
7th April 2024, 11:40
the current one is working...the problem is to have/find somebody who is capable of doing the upgrade regularly.
If the various licences allow it, a github repository perhaps would be more than enough. I know you can set different automations to mirror the last github builds but no idea how.

Kurt.noise
8th April 2024, 08:42
LSMASHAudioSource problem encoding a standard 5.1 wav

For what say "Successfully with LWLibavAudioSource" and after open it with LSMASHAudioSource?
its because the demuxer is changed internally during decoding...



Wrong ChannelPositionsString2: 3/2/0.1 (only 6 channels) and try load c6_dpl2 when I want a c71_c51 downmix.
Using AviSynth 3.7.3 the MediaInfo data must be ignored and use the AvsChannelMask defined here:
https://github.com/AviSynth/AviSynthPlus/blob/master/avs_core/include/avisynth.h
will fix issue about the downmix but do you have more information how to apply AvsChannelMask in avs script ?

tebasuna51
8th April 2024, 10:45
its because the demuxer is changed internally during decoding...

Talking of audio decode use always LWLibavAudioSource, only .m4a can take advantage (internal index and don't need .lwi) of use LSMASHAudioSource, and don't support some common raw audio like .eac3 and .aac

will fix issue about the downmix but do you have more information how to apply AvsChannelMask in avs script ?

In AviSynth.h (3.7.3) there are:
// V10.1
bool (VideoInfo::* IsChannelMaskKnown)() const;
void (VideoInfo::* SetChannelMask)(bool isChannelMaskKnown, unsigned int dwChannelMask);
unsigned int (VideoInfo::* GetChannelMask)() const;
// Unshifted channel mask constants like in WAVEFORMATEXTENSIBLE
// in AvsImageTypeFlags they are shifted by 4 bits
enum AvsChannelMask {
MASK_SPEAKER_FRONT_LEFT = 0x1,
MASK_SPEAKER_FRONT_RIGHT = 0x2,
MASK_SPEAKER_FRONT_CENTER = 0x4,
MASK_SPEAKER_LOW_FREQUENCY = 0x8,
MASK_SPEAKER_BACK_LEFT = 0x10,
MASK_SPEAKER_BACK_RIGHT = 0x20,
MASK_SPEAKER_FRONT_LEFT_OF_CENTER = 0x40,
MASK_SPEAKER_FRONT_RIGHT_OF_CENTER = 0x80,
MASK_SPEAKER_BACK_CENTER = 0x100,
MASK_SPEAKER_SIDE_LEFT = 0x200,
MASK_SPEAKER_SIDE_RIGHT = 0x400,
MASK_SPEAKER_TOP_CENTER = 0x800,
MASK_SPEAKER_TOP_FRONT_LEFT = 0x1000,
MASK_SPEAKER_TOP_FRONT_CENTER = 0x2000,
MASK_SPEAKER_TOP_FRONT_RIGHT = 0x4000,
MASK_SPEAKER_TOP_BACK_LEFT = 0x8000,
MASK_SPEAKER_TOP_BACK_CENTER = 0x10000,
MASK_SPEAKER_TOP_BACK_RIGHT = 0x20000,
// Bit mask locations used up for the above positions
MASK_SPEAKER_DEFINED = 0x0003FFFF,
// Bit mask locations reserved for future use
MASK_SPEAKER_RESERVED = 0x7FFC0000,
// Used to specify that any possible permutation of speaker configurations
// Due to lack of available bits this one is put differently into image_type
MASK_SPEAKER_ALL = 0x80000000
};

#define VARNAME_dwChannelMask "OPT_dwChannelMask" // Integer audio channel mask. See description of WAVEFORMATEXTENSIBLE for more info.

We can use IsChannelMaskKnown, if is unknow or invalid (0< mask <= MASK_SPEAKER_DEFINED) use the default for the AudioChannels and SetChannelMask.

With mask = GetChannelMask we can do the appropiate downmix, if required, and after modify the SetChannelMask

At end we must output the audio with WAVE_FORMAT_EXTENSIBLE header. All audio encoders must accept that format, and even send error messages if the channel layout is not supported by the encoder.

tebasuna51
9th April 2024, 11:26
I see you have my last downmix functions:

...
8<=Audiochannels(last)?c71_c51(ConvertAudioToFloat(last)):last
...
# As AudioLimiter.dll is not available, SoftClipperFromAudX() cannot be used MESSAGE NOT NEEDED NOW
# 7.1 Channels L,R,C,LFE,BL,BR,SL,SR -> standard 5.1
function c71_c51(clip a)
{
front = GetChannel(a, 1, 2, 3, 4)
back = GetChannel(a, 5, 6)
side = GetChannel(a, 6, 7)
mix = MixAudio(back, side, 0.5, 0.5).SoxFilter("compand 0.0,0.0 -90,-84,-8,-2,-6,-1,-0,-0.1")
return MergeChannels(front, mix)
}
# 5.1.2 Channels L,R,C,LFE,SL,SR,TFL,TFR -> standard 5.1
function c512_c51(clip a)
{
front = GetChannel(a, 1, 2)
midch = GetChannel(a, 3, 4, 5, 6)
topfr = GetChannel(a, 7, 8)
mix = MixAudio(front, topfr, 0.5, 0.5).SoxFilter("compand 0.0,0.0 -90,-84,-8,-2,-6,-1,-0,-0.1")
return MergeChannels(mix, midch)
}

But we need check the maskchannel to use c71_c51 or c512_c51
I will make test about that.

By the moment we have other problem:
How pass the maskchannel to the encoders?

Using wavs with header WAVE_FORMAT_EXTENSIBLE like input for ffmpeg the maskchannel is read and encoded correctly, but using MeGUI ffmpeg encode all with the default channelmask for the NumChannels.

In BeHappy we can send manually the MaskChannel and create the wav header in the procedure writeHeader (https://github.com/jones1913/BeHappy/blob/master/src/Encoder.cs) and work fine.
Now we need use the MaskChannel provided by Avs+ 3.7.3

How we can do that with MeGUI?

Kurt.noise
9th April 2024, 14:07
In BeHappy we can send manually the MaskChannel and create the wav header in the procedure writeHeader (https://github.com/jones1913/BeHappy/blob/master/src/Encoder.cs) and work fine.
Now we need use the MaskChannel provided by Avs+ 3.7.3

How we can do that with MeGUI?
This is the same function as BeHappy...:)

Just for testing, I tried this kind of script in order to have an idea how to get the maskchannels values :
LoadPlugin("C:\Users\LionelDUCHATEAU\Downloads\megui_git\megui\bin\x64\Debug\tools\lsmash\LSMASHSource.dll")
LWLibavAudioSource("C:\Users\LionelDUCHATEAU\Downloads\AC3 Samples\8w3D.eac3", drc_scale=0)
AudioDubEx(BlankClip(length=Int(1000*AudioLengthF(last)/Audiorate(last)), width=720, height=720, fps=25), last)
m=IsChannelMaskKnown()
g=GetChannelMask()
s=SetChannelMask(true,g)

Info()
Subtitle(
\ "\nAudioLength = " + String(AudioLength)
\ + "\nAudioLengthS = '" + AudioLengthS + "'"
\ + "\nAudioLengthF = " + String(AudioLengthF)
\ + "\nAudioLengthLo= " + String(AudioLengthLo)
\ + "\nAudioLengthHi= " + String(AudioLengthHi)
\ + "\nIsChannelMaskKnown= " + String(m)
\ + "\nGetChannelMask= " + String(g)
\ + "\nSetChannelMask= " + String(s)
\ , font="courier", text_color=$ffffff, size=32, align=4, lsp=0)

but String(s) returns nothing here whereas it's available in Info()...probably because it's a void function. How to get the value returned from s in this case ?

tebasuna51
9th April 2024, 23:45
For what you need the String(s)?

I test that avs:
LWLibavAudioSource("C:\tmp\8w341.wav", drc_scale=0) #L,R,C,LFE,BL,BR,SL,SR
#LWLibavAudioSource("C:\tmp\8w3D.wav", drc_scale=0) #L,R,C,LFE,SL,SR,TFL,TFR
ConvertAudioToFloat()
g=GetChannelMask()
22031==g?c512_c51():last
1599==g?c71_c51():last
SetChannelMask("1551")
# 7.1 Channels L,R,C,LFE,BL,BR,SL,SR -> standard 5.1
function c71_c51(clip a)
{
front = GetChannel(a, 1, 2, 3, 4)
back = GetChannel(a, 5, 6)
side = GetChannel(a, 7, 8)
mix = MixAudio(back, side, 0.5, 0.5).SoxFilter("compand 0.0,0.0 -90,-84,-8,-2,-6,-1,-0,-0.1").ConvertAudioToFloat()
return MergeChannels(front, mix)
}
# 5.1.2 Channels L,R,C,LFE,SL,SR,TFL,TFR -> standard 5.1
function c512_c51(clip a)
{
front = GetChannel(a, 1, 2)
midch = GetChannel(a, 3, 4, 5, 6)
topfr = GetChannel(a, 7, 8)
mix = MixAudio(front, topfr, 0.5, 0.5).SoxFilter("compand 0.0,0.0 -90,-84,-8,-2,-6,-1,-0,-0.1").ConvertAudioToFloat()
return MergeChannels(mix, midch)
}
And work fine with the two sources making the correct downmix.

We need know the maskchannel value for the most common channels layouts:
NumCh MaskCh Name Present Channels
----- ------ ------------- ------------------------------------...
1 4 mono -- -- FC --- -- -- --- --- -- -- --
2 12 1.1 -- -- FC LFE -- -- --- --- -- -- --
2 3 stereo FL FR -- --- -- -- --- --- -- -- --
3 11 2.1 FL FR -- LFE -- -- --- --- -- -- --
3 7 3.0 FL FR FC --- -- -- --- --- -- -- --
3 259 3.0(back) FL FR -- --- -- -- --- --- BC -- --
4 15 3.1 FL FR FC LFE -- -- --- --- -- -- --
4 263 4.0 FL FR FC --- -- -- --- --- BC -- --
4 51 quad FL FR -- --- BL BR --- --- ----- --
4 1539 quad(side) FL FR -- --- -- -- --- --- -- SL SR
5 59 quad.1 FL FR -- LFE BL BR --- --- ----- --
5 55 5.0 FL FR FC --- BL BR --- --- -- -- --
5 1543 5.0(side) FL FR FC --- -- -- --- --- -- SL SR
5 271 4.1 FL FR FC LFE -- -- --- --- BC -- --
6 63 5.1 FL FR FC LFE BL BR --- --- -- -- --
6 1551 5.1(side) FL FR FC LFE -- -- --- --- -- SL SR
6 1799 6.0 FL FR FC --- -- -- --- --- BC SL SR
6 1731 6.0(front) FL FR -- --- -- -- FLC FRC -- SL SR
6 311 hexagonal FL FR FC --- BL BR --- --- BC -- --
7 1807 6.1 FL FR FC LFE -- -- --- --- BC SL SR
7 319 6.1(back) FL FR FC LFE BL BR --- --- BC -- --
7 1739 6.1(front) FL FR -- LFE -- -- FLC FRC -- SL SR
7 1591 7.0 FL FR FC --- BL BR --- --- -- SL SR
7 1735 7.0(front) FL FR FC --- -- -- FLC FRC -- SL SR
8 1599 7.1 FL FR FC LFE BL BR --- --- -- SL SR
8 255 7.1(wide) FL FR FC LFE BL BR FLC FRC -- -- --
8 1743 7.1(wide-side) FL FR FC LFE -- -- FLC FRC -- SL SR
8 1847 octagonal FL FR FC --- BL BR --- --- BC SL SR
8 184371 cube FL FR -- --- BL BR --- --- -- -- -- -- TFL --- TFR TBL --- TBR
8 20543 7.1(top) FL FR FC LFE BL BR --- --- -- -- -- -- TFL --- TFR
8 22031 5.1.2 front FL FR FC LFE -- -- --- --- -- SL SR -- TFL --- TFR
8 165391 5.1.2 side FL FR FC LFE -- -- --- --- -- SL SR -- --- --- --- TBL --- TBR
18 -- speaker_all FL FR FC LFE BL BR FLC FRC BC SL SR TC TFL TFC TFR TBL TBC TBR

That value must be set in the WAVE_FORMAT_EXTENSIBLE header

Kurt.noise
10th April 2024, 07:38
For what you need the String(s)?
Mainly for debugging...

We need know the maskchannel value for the most common channels layouts:
NumCh MaskCh Name Present Channels
----- ------ ------------- ------------------------------------...
1 4 mono -- -- FC --- -- -- --- --- -- -- --
2 12 1.1 -- -- FC LFE -- -- --- --- -- -- --
2 3 stereo FL FR -- --- -- -- --- --- -- -- --
3 11 2.1 FL FR -- LFE -- -- --- --- -- -- --
3 7 3.0 FL FR FC --- -- -- --- --- -- -- --
3 259 3.0(back) FL FR -- --- -- -- --- --- BC -- --
4 15 3.1 FL FR FC LFE -- -- --- --- -- -- --
4 263 4.0 FL FR FC --- -- -- --- --- BC -- --
4 51 quad FL FR -- --- BL BR --- --- ----- --
4 1539 quad(side) FL FR -- --- -- -- --- --- -- SL SR
5 59 quad.1 FL FR -- LFE BL BR --- --- ----- --
5 55 5.0 FL FR FC --- BL BR --- --- -- -- --
5 1543 5.0(side) FL FR FC --- -- -- --- --- -- SL SR
5 271 4.1 FL FR FC LFE -- -- --- --- BC -- --
6 63 5.1 FL FR FC LFE BL BR --- --- -- -- --
6 1551 5.1(side) FL FR FC LFE -- -- --- --- -- SL SR
6 1799 6.0 FL FR FC --- -- -- --- --- BC SL SR
6 1731 6.0(front) FL FR -- --- -- -- FLC FRC -- SL SR
6 311 hexagonal FL FR FC --- BL BR --- --- BC -- --
7 1807 6.1 FL FR FC LFE -- -- --- --- BC SL SR
7 319 6.1(back) FL FR FC LFE BL BR --- --- BC -- --
7 1739 6.1(front) FL FR -- LFE -- -- FLC FRC -- SL SR
7 1591 7.0 FL FR FC --- BL BR --- --- -- SL SR
7 1735 7.0(front) FL FR FC --- -- -- FLC FRC -- SL SR
8 1599 7.1 FL FR FC LFE BL BR --- --- -- SL SR
8 255 7.1(wide) FL FR FC LFE BL BR FLC FRC -- -- --
8 1743 7.1(wide-side) FL FR FC LFE -- -- FLC FRC -- SL SR
8 1847 octagonal FL FR FC --- BL BR --- --- BC SL SR
8 184371 cube FL FR -- --- BL BR --- --- -- -- -- -- TFL --- TFR TBL --- TBR
8 20543 7.1(top) FL FR FC LFE BL BR --- --- -- -- -- -- TFL --- TFR
8 22031 5.1.2 front FL FR FC LFE -- -- --- --- -- SL SR -- TFL --- TFR
8 165391 5.1.2 side FL FR FC LFE -- -- --- --- -- SL SR -- --- --- --- TBL --- TBR
18 -- speaker_all FL FR FC LFE BL BR FLC FRC BC SL SR TC TFL TFC TFR TBL TBC TBR

That value must be set in the WAVE_FORMAT_EXTENSIBLE header
Thanks for this mapping table. That's exactly what I'm looking for.

tebasuna51
10th April 2024, 11:00
Of course we can't do in MeGUI, or BeHappy, all possible downmix but is good to know than AC3 and DTS (image) can have even more:
https://forum.doom9.org/attachment.php?attachmentid=14686&d=1427424323

Like you can see only the 7.1 A have a exact correlation with WAV channels FL FR FC LFE BL BR SL SR
But other with Ls-Rs (surround) can be decoded/recoded with BL-BR (back) or SL-SR (side) pairs.
Until 5.1 it is not important because the channel order in wav not change, but a downmix to stereo from 6.1 or 6.1(back) is different

tormento
16th April 2024, 15:48
How we can do that with MeGUI?
Where did you find that new version of BeHappy?

Repo build is way older.

Shandra
16th April 2024, 15:52
Just found the great News today, so a somewhat late "Thank you!" from me!
& a question (how could it be otherwise ?):
If I want to go with a clean install with the 64bit build, should I use just this unzipped structure and add everything else manually (folder struct/tools) - or is it safe to do a full install of the legacy build and after that is installed/updated its components (dev branche) to overwrite its content with the one from this package & where applicable to replace the content in megui\tools\<tool>\ with the corresponding/up2date 64bit counterparts?

tebasuna51
16th April 2024, 21:53
Where did you find that new version of BeHappy?

From here (https://forum.doom9.org/showthread.php?p=1984387#post1984387), but is deleted.

If you want my actual copy is here (https://www.sendspace.com/file/ebfxbe)

Kurt.noise
17th April 2024, 11:05
If I want to go with a clean install with the 64bit build, should I use just this unzipped structure and add everything else manually (folder struct/tools) - or is it safe to do a full install of the legacy build and after that is installed/updated its components (dev branche) to overwrite its content with the one from this package & where applicable to replace the content in megui\tools\<tool>\ with the corresponding/up2date 64bit counterparts?
the safest way would be to create a dedicated folder for this build and update the tools afterwards. Storage space is not an issue anymore nowadays.

tormento
17th April 2024, 12:32
If you want my actual copy is here
:thanks:

tebasuna51
21st April 2024, 16:50
I'm making some tests about multichannel audio encoders supported by MeGUI: flac, ffmpeg (ac3,eac3,m4a), NeroAacEnc (m4a), fdkaac (m4a), qaac (m4a), ogenc2, opusenc.
I encode aac always to .m4a because the raw aac with ADTS header is very limited, with mp4 container there are more options.

1) All of them support WAVE_FORMAT_EXTENSIBLE header with the maskchannel set (some ones W64 or RF64 headers), and format samples (Supported/Not):
MeGUI encoders: WFE W64 RF64 24i 32i 32f
-------------- --- --- ---- --- --- ---
ffmpeg ac3,mp2,aac S S S S S S
fdkaac m4a S N S S S S
Flac S S S S - -
Lame S N N S S S
NeroAac S N N S S S
opus S N N S N S
Qaac S N S S S S
Vorbis ogg S N N S S S

For me the 32 int is useless and the 32 float have the same precission than 24 int. Then I recommend that line always in the avs script:

32==Audiobits(last)?ConvertAudioTo24bit(last):last

instead to 16bit like now. For what lose precission? The human ear can difference until 20 bit precission.

2) Only flac support all the maskchannels layouts included in my previous post.
That include the correct maskchannel in the MediaInfo of the encoded flac but also recover the exact wav file layout when decode.
In next test I will inform the behaviour of all encoders.

3) For the AviSynth decode I used always LWLibavAudioSource, the output for lossy formats is always 32 float samples, from flac or others lossless formats is the original precission.
Can be used also FFAudioSource or BSAudioSource but for lossless formats (flac, dtsma,...) output 32 int I don't know for what. One more reason to use the last ConvertAudioTo24bit.

Emulgator
21st April 2024, 17:10
Thank you for clearing that up, tebasuna51 !

tebasuna51
21st April 2024, 21:17
ffmpeg AC3/EAC3 encoder (of course tested out of MeGUI until it can output WFE to ffmpeg):

1) All channel layouts from 'stereo' to '5.1' work fine, only 'quad.1' have a problem: the LFE channel is missing (bug reported (https://trac.ffmpeg.org/ticket/10971))

2) Inputs with pair BL-BR (quad, 5.0, 5.1) and with pair SL-SR (quad(side), 5.0(side), 5.1(side)) output the same AC3/EAC3 layout with SurroundLeft-SurroundRight pair.
When they are decoded both output always SL-SR pair.

3) All the rest of channel layouts from 6.0 to 5.1.2 are downmixed automatically, more or less correctly, to 5.0.
And all LFE channels are missing (also reported).

tebasuna51
22nd April 2024, 01:36
The rest of encoders have diferent behaviour, sometimes show error or say nothing or for instance read the mask but ignore it like oggenc2:

WARNING: Unknown WAV surround channel mask: 165391
blindly mapping speakers using default SMPTE/ITU ordering.

Then only some channel layouts can be encoded safely:

NumCh MaskCh Name Present Channels qaac nero fdk. ffm. opus ogg
----- ------ ---------- --------------------------------- ---- ---- ---- ---- ---- ----
3 7 3.0 FL FR FC S S S S S S
4 263 4.0 FL FR FC BC S S S S - -
4 51 quad FL FR BL BR (SL SR) S S - S S S
5 55 5.0 FL FR FC BL BR (SL SR) S S S S S S
6 63 5.1 FL FR FC LF BL BR (SL SR) S S S S S S
6 311 hexagonal FL FR FC BL BR BC (SL SR) S - - - - -
7 319 6.1(back) FL FR FC LF BL BR BC (SL SR) S S - - S S
7 1591 7.0 FL FR FC BL BR SL SR S - - - - -
8 255 7.1(wide) FL FR FC LF BL BR FLC FRC (SL SR) S S S - - -
8 1599 7.1 FL FR FC LF BL BR SL SR S - S S S S
8 1847 octagonal FL FR FC BL BR BC SL SR S - - - - -

Like we can see the qaac encoder have more options (and best quality for me)

Kurt.noise
22nd April 2024, 09:35
Thanks for your tests Tebasuna. :goodpost:

You did them with wav as source, right ? because LWLibavAudioSource does not support some multichannel lossy format (7.1 eac3 for instance)

tebasuna51
22nd April 2024, 21:05
LWLibavAudioSource can support 7.1 eac3 and work recoding them to flac with MeGUI 6666, but the channel mask is the default, the same for 8w341.eac3 and for 8w3D.eac3 (https://www.sendspace.com/file/mapj57).

Without recognize the channelmask detected by LWLibavAudioSource:

Kurt.noise
26th April 2024, 09:48
https://github.com/Kurtnoise-zeus/megui/releases/tag/6666.2604

Please, report any issues regarding audio transcoding in this release. Probably, that needs to be polished here and there. Enjoy.

tebasuna51
26th April 2024, 18:38
Sorry, but recoding the attached 4 ac3's, with different channel mask, output the same default channelmask.
Seems the WAVE_FORMAT_EXTENSIBLE header is not sended to ffmpeg when do:
ffmpeg.exe -i - -y -acodec ac3 -ab 384k "4_3.1.ac3"

About flac encode:
[Information] [26/04/2024 17:47:36] Job command line: C:\Portablz\MeGUI_66\tools\flac\flac.exe --force --force-raw-format --endian=little --sign=signed -5 - -o "C:\tmp\8w3D.flac" --channels=8 --bps=24 --sample-rate=48000

If you use --force-raw-format for flac encode the channelmask is ignored, only pcm samples are sended.
That command line is used before than flac support --ignore-chunk-sizes parameter or w64/rf64 headers

Use: - --ignore-chunk-sizes --silent -o "X.flac"
Or better use w64/rf64 header to avoid some warnings of flac:

#### Encoder StdErr ####
INFO: Make sure you know what you're doing when using --ignore-chunk-sizes.
Improper use can cause flac to encode non-audio data as audio.
-: WARNING: 'data' chunk has non-zero size, using --ignore-chunk-sizes is probably a bad idea
-: INFO: hit EOF with --ignore-chunk-sizes, got 958464 samples

Tested with BeHappy and Flac 1.4.3 and work fine.

Kurt.noise
11th May 2024, 10:32
Hi,

Back from vacations...

Sorry, but recoding the attached 4 ac3's, with different channel mask, output the same default channelmask.

Which output format did you select ? which nb channels did you select as output ?

Will fix the remaining issues you've listed. Thanks again.

tebasuna51
11th May 2024, 21:18
Which output format did you select ? which nb channels did you select as output ?

Only AC3 to AC3 without modify nothing, to avoid problems on encoders.

When you modify the flac encode we can use also it, with the best performance preserving the channelmask.

Kurt.noise
14th May 2024, 13:10
Guys, lets try latest release : https://github.com/Kurtnoise-zeus/megui/releases/tag/6666.1405

tebasuna51
17th May 2024, 12:19
Thanks Kurt.

- Now the flac encodes preserve fine the channelmask with the simple command line, do you send W64/RF64 headers or check if size > 4 GB to add the parameter --ignore-chunk-sizes ?

- Direct ac3 encodes preserve also the channelmask but I have a doubt, recoding a 3.1 ac3 the relevant log lines show:
--[Information] [17/05/2024 11:55:00] MediaInfo
---[Information] File: C:\tmp\wav\4_3.1.ac3
----[Information] ChannelLayout: L R C LFE
...
--[Information] [17/05/2024 11:55:03] AviSynth script
---[NoImage] LoadPlugin("C:\Portablz\MeGUI_66\tools\lsmash\LSMASHSource.dll")
---[NoImage] LWLibavAudioSource("C:\tmp\wav\4_3.1.ac3", drc_scale=0)
---[NoImage] # Detected Channels: 4
---[NoImage] # Detected Channels Layout: L R C LFE
---[NoImage] cm=GetChannelMask(last)
---[NoImage] # Detected Channel Mask: cm=15
---[NoImage] # Applied Channel Mask
---[NoImage] SetChannelMask("15")
---[NoImage] 32==Audiobits(last)?ConvertAudioTo24bit(last):last
---[NoImage] return last
...
--[Information] [17/05/2024 11:55:04] MediaInfo
----[Information] ChannelLayout: L R C LFE

The output is correct, but for what you SetChannelMask("15") if it's already correct?:
cm=GetChannelMask(last)
# Detected Channel Mask: cm=15

I saved the precedent avs and I try encode it:
--[Information] [17/05/2024 12:22:42] MediaInfo
---[Information] File: C:\tmp\wav\0new_avsac3.avs
---[Information] AVS input file detected. Getting media information from AviSynth.
----[Information] ChannelsString: 4 channels
...
--[Information] [17/05/2024 12:22:45] AviSynth script
---[NoImage] Import("C:\tmp\wav\0new_avsac3.avs")
---[NoImage] # Detected Channels: 4
---[NoImage] # Detected Channels Layout:
---[NoImage] cm=GetChannelMask(last)
---[NoImage] # Detected Channel Mask: cm=3
---[NoImage] # Applied Channel Mask
---[NoImage] SetChannelMask("3")
---[NoImage] 32==Audiobits(last)?ConvertAudioTo24bit(last):last
---[NoImage] return last
...
--[Information] [17/05/2024 12:22:46] MediaInfo
----[Information] ChannelLayout: L R C Cb

1) MediaInfo can't extract the ChannelLayout from an avs
2) # Detected Channel Mask: cm=3 can't be obtained from cm=GetChannelMask(last) it's "15"
3) Seems apply stereo default L R, I don't know for what with 4 channels
4) ffmpeg ignore that channelmask and apply the default for 4 channels 4.0 instead the correct 3.1

Seems you trust in MediaInfo and ignore the cm=GetChannelMask(last)
I think you must trust in cm=GetChannelMask(last) unless it is invalid.

tebasuna51
17th May 2024, 14:42
To know if a channelmask is valid for the Detected channels I can use:
cm = GetChannelMask(last)
nc = AudioChannels(last)
cm0 = cm
nc0 = 0 #AudioChannels
for (i=1, 18) {
nc0 = nc0 + cm0 % 2
cm0 = int(cm0 / 2)
}
if (nc0 != nc ) {
cm = Select(nc, 3, 4, 3, 7, 263, 55, 63, 319, 1599)
SetChannelMask(String(cm))
}

If it's invalid (nc0 != nc ) we select the default for the Detected channels