Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
4th April 2024, 11:34 | #22 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 7,079
|
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.p...82#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
__________________
BeHappy, AviSynth audio transcoder. |
4th April 2024, 16:22 | #23 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 7,079
|
WARNING: in the last (LSMASHSource.dll 2024/04/02) LSMASHAudioSource is broken (wrong channels and decode), use always LWLibavAudioSource than seems work fine.
__________________
BeHappy, AviSynth audio transcoder. Last edited by tebasuna51; 5th April 2024 at 09:09. Reason: add issue link |
5th April 2024, 14:12 | #24 | Link | ||
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 7,079
|
LSMASHAudioSource problem encoding a standard 5.1 wav
Quote:
MediaInfo problem open eac3 with 8 channels: Quote:
Using AviSynth 3.7.3 the MediaInfo data must be ignored and use the AvsChannelMask defined here: https://github.com/AviSynth/AviSynth...ude/avisynth.h
__________________
BeHappy, AviSynth audio transcoder. Last edited by tebasuna51; 5th April 2024 at 14:21. |
||
7th April 2024, 11:40 | #25 | Link |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,719
|
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.
__________________
@turment on Telegram Last edited by tormento; 16th April 2024 at 15:46. |
8th April 2024, 08:42 | #26 | Link | ||
Registered User
Join Date: Nov 2022
Location: Aix en Provence, France
Posts: 52
|
Quote:
Quote:
Last edited by Kurt.noise; 8th April 2024 at 08:45. |
||
8th April 2024, 10:45 | #27 | Link | ||
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 7,079
|
Quote:
Quote:
Code:
// 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. 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.
__________________
BeHappy, AviSynth audio transcoder. |
||
9th April 2024, 11:26 | #28 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 7,079
|
I see you have my last downmix functions:
Quote:
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 and work fine. Now we need use the MaskChannel provided by Avs+ 3.7.3 How we can do that with MeGUI?
__________________
BeHappy, AviSynth audio transcoder. |
|
9th April 2024, 14:07 | #29 | Link | |
Registered User
Join Date: Nov 2022
Location: Aix en Provence, France
Posts: 52
|
Quote:
Just for testing, I tried this kind of script in order to have an idea how to get the maskchannels values : Code:
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) Last edited by Kurt.noise; 9th April 2024 at 14:47. |
|
9th April 2024, 23:45 | #30 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 7,079
|
For what you need the String(s)?
I test that avs: Code:
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) } We need know the maskchannel value for the most common channels layouts: Code:
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
__________________
BeHappy, AviSynth audio transcoder. |
10th April 2024, 07:38 | #31 | Link | |
Registered User
Join Date: Nov 2022
Location: Aix en Provence, France
Posts: 52
|
Mainly for debugging...
Quote:
|
|
10th April 2024, 11:00 | #32 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 7,079
|
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:
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
__________________
BeHappy, AviSynth audio transcoder. Last edited by tebasuna51; 10th April 2024 at 11:14. |
16th April 2024, 15:52 | #34 | Link |
Registered User
Join Date: Mar 2003
Posts: 97
|
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? |
16th April 2024, 21:53 | #35 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 7,079
|
__________________
BeHappy, AviSynth audio transcoder. |
17th April 2024, 11:05 | #36 | Link | |
Registered User
Join Date: Nov 2022
Location: Aix en Provence, France
Posts: 52
|
Quote:
|
|
21st April 2024, 16:50 | #38 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 7,079
|
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): Code:
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 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.
__________________
BeHappy, AviSynth audio transcoder. |
21st April 2024, 17:10 | #39 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,671
|
Thank you for clearing that up, tebasuna51 !
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." |
21st April 2024, 21:17 | #40 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 7,079
|
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) 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).
__________________
BeHappy, AviSynth audio transcoder. |
Thread Tools | Search this Thread |
Display Modes | |
|
|