Log in

View Full Version : Another flexible and extensible way of multi channel audio encoding using Avisynth.


Pages : 1 [2] 3 4

Rockaria
29th November 2005, 16:26
SMD, I understand your situation. But I (perhaps including many others) am still looking for a proper format to backup the contents with least space usage.
With nero's aac he vbr streaming or any forced quality, I am not still convinced with it for a backup purpose unlike you. So the recode 2 is not of any special interest to me at the moment. I am just trying to focus on the purpose of this thread.

As I've said ever since from the beginning, this thread is intended for introducing the new multi channel transcode method. Because it can handle any channel mess up (with version changes noticed by many already) with it's flexibility, I learned it's not a proper place to go into any further detail's of the unstabilized issue, also because you don't want to believe what is said by anybody normal.

So I will have to agree with you. Some we might need to resolve the issue right now but in a correct place with a proper title please...

SeeMoreDigital
29th November 2005, 17:11
It's not "my situation", it's everybody's situation!

It's vital we establish whether Nero have made a mistake with their AAC codec using their own encoder first.

Once this has been properly established we can then take the appropriate action!

If we discover Nero have made a mistake at their end. It would be a waste of everybody's time here developing "third party" fixes. Even more so if Nero correct the problem on the next release!

Now.... has anybody taking part in this thread, checked to see whether the Nero7 version of Recode2 generates 6Ch AAC streams the wrong way round. If so can you please confirm your findings?


Cheers

dimzon
29th November 2005, 17:46
This is great! I am waiting for the working version already!
Get alpha here: http://www.mytempdir.com/289180

Rockaria
29th November 2005, 17:48
It's open here (http://forum.doom9.org/showthread.php?t=103397) and hope dimizon take the thread. thanks.

Rockaria
30th November 2005, 03:18
It works exactly as the gui prototype.

The channel mapping GetChannel(2,3,1,6,4,5) and GetChannel(1,3,2,5,6,4)
geterate correctly mapped channel orders depending on the encoders(& target decoders) with a mouse click.

By far the most generouse & hassle-free transcoder supporting virtually all the formats!
Only some pipe-in encoders are left for few more unsupported formats.
The interface is so flexible as it can answer to any DSPs and I/O requirements on a single clip.
I've not compared the performance yet but it seems reasonably fast.

Pretty much impressed by dimizon. Wish you continue the good work and everybody share the flexibility with this. :thanks:
But where did the be-happy.xml go?

dimzon
30th November 2005, 09:34
GetChannel(1,3,2,5,6,4)
Read about OggVorbis channel mapping (http://www.hydrogenaudio.org/forums/index.php?showtopic=38618&st=0)

But where did the be-happy.xml go?
look @ DocumentsAndSettings\<YourLogin>\LocalSettings\ApplicationData\dimzon\BeHappy\

dimzon
30th November 2005, 09:41
BeHappy development is paused until next year... (I'm busy IRL again)
BeHappy & BePipe source code is avaluable by request (feel free to PM me or send mail to dimzon541<dog>gmail<dot>com)

Rockaria
30th November 2005, 12:28
OggVorbis channel mapping (http://www.hydrogenaudio.org/forums/index.php?showtopic=38618&st=0)
..
look @ DocumentsAndSettings\<YourLogin>\LocalSettings\ApplicationData\dimzon\BeHappy\
Oggenc appears not to remap 5.1 channel order from WAV order (L/R/C/LFE/BL/BR) to Vorbis order defined by xiph's specifications :

six channels : the stream is 5.1 surround. channel order: front left, front center, front right, rear left, rear right, LFE

Tested with rarewares build 2005-07-10.

The same problem applies to oggdec (again assumes WAV channel order on libvorbis output, so it actually decodes incorrect oggenc output back to correct WAV).
It again backs up my test results : GetChannel(1,3,2,5,6,4) == front left, front center, front right, rear left, rear right, LFE based on the wav order
Other trivials :
. maybe we can share the xml configuration by request.
. for the graphedit DirectShowSource, I couldn't find any way to replace the path inside of the GRF file. So the best way so far is to copy-rename to the predefined path for any media used in the GRF.

BeHappy development is paused until next year... (I'm busy IRL again) Yeah, it has proved everything perfectly, at least to me. See Ya Next Year!

dimzon
30th November 2005, 12:43
. maybe we can share the xml configuration by request.

Seems like You read my mind. I'm thinking about Source/DSP/Encoder import/export feature :)

redfordxx
30th November 2005, 18:23
Hi,
my same issue, but I feel interresting to mention it here too.

WMA 5.1 on WinXP as an input does not work correctly for me. Test SeeMoreDigital's testing WMA 6Ch file on your machine, if you please.

Or, maybe, there is an alternative wma filter for avisynth?

But in general, I consider it cool ;)

R.

Rockaria
1st December 2005, 14:17
Dimzon, you seem to read my mind also ;)

@redfordxx :
It reminds me of this thread (http://forum.doom9.org/showthread.php?p=740887#post740887) which backs up my experience too.

WMA pro 5.1 can be encoded easily using DBPowerAmp, but gets only 2ch from default directShow streaming.
If we can learn the MPC dsfilter usage, I think we can make a GRF contained to an avs to be tested on any dsfilter capable player.
You can also test the encoding using the DirectShowSource("*.GRF") in a BePipe or BeHappy.

I will try to find a way here too. good luck.

redfordxx
1st December 2005, 14:35
It reminds me of this thread (http://forum.doom9.org/showthread.php?p=740887#post740887) which backs up my experience too.yeah I started it...
backs up means... it happened to you too?

WMA pro 5.1 can be encoded easily using DBPowerAmp, but gets only 2ch from default directShow streaming.
If we can learn the MPC dsfilter usage, I think we can make a GRF contained to an avs to be tested on any dsfilter capable player.
You can also test the encoding using the DirectShowSource("*.GRF") in a BePipe or BeHappy.
SeeMoreDigitals and my experitence: GraphEdit makes 2ch too
MPC plays 6ch and VLC plays 6ch with incorrect mapping.
I don't know the architecture of these SW, but maybe there are some filters in MPC or VLC which can be used?

Now I have to keep 6ch do WMV-->Stream Editor-->WMA-->Canopus Procoder-->PCM-->AviSynth script.

Rockaria
1st December 2005, 15:01
I linked the thread because it missed the details : how and in what environment.

VLC uses it's own plugin while MPC uses mostly from DSFs and perhaps from it's own(which I doubt), which begs more of OWN study and tests.

If you have a PCM or wav from the source, you don't have to rely on the avisynth for a transcoding, unless you need the channel remapping or other available DSPs.

As we know avisynth(and BeHappy) having open architecture, if you can play the AVS(including GRF) in MPC correctly, there should be no problem using these tools.

redfordxx
1st December 2005, 19:16
I linked the thread because it missed the details : how and in what environment.WinXPProSP2If you have a PCM or wav from the source, you don't have to rely on the avisynthIt was just for testingif you can play the AVS(including GRF) in MPC correctlyNo, I can play WMA in MPC correctly, but not WMA via AVS in MPC (probably because there is already the M$WMADecoder inbetween, which downmixes it to 2ch

Rockaria
1st December 2005, 21:11
I also noticed the WMA DMO(wmadmod.dll) changing the 6ch to 2ch, which you can see with zplayer graph info. but I am not sure if it is downmixing.
Gomplayer also did this behavior until I changed the ASF reader(qasf.dll) and Window Media source filter merit to 'DO_NOT_USE', then the DMO started to stream 6ch, but still noticed the ASF reader is being used.

So my conclusion is, it's not using any extra plugin besides the DSFs. But there seems to be some option 'not to restrict' passed to the DMO.
In this case we may have to get a newer version of graphedit and see what happens.

My walkaround would be transcoding to a flac or wav 6ch in the VLC(possibly with messed up ch order) and feed to this environment correcting the channel orders....

redfordxx
1st December 2005, 21:34
I changed the ASF reader(qasf.dll) and Window Media source filter merit to 'DO_NOT_USE', then the DMO started to stream 6ch, but still noticed the ASF reader is being used.Can you please describe it more understandable for me (I don't have ZPllayer but I hope I can help with BSPlayer too.)

Current status: when I play WMV, following DSFs are loaded:

WMAudioDecoderDMO (there is written dasf.dll)
WMVideoDecoderDMO (there is written dasf.dll)
EQ (don't know what is it)
AC3Filter (makes again 6ch)
Default DirectSound Device

Rockaria
1st December 2005, 22:21
It is a setting in players overriding the priority of the dsfilters when there are candidates performing the same function.
I am not sure if the bsplayer has this feature, but zplayer's feature seems to be GLOBAL like other DSFILTER merit tools.

The WMA Decoder seems to be internally connected to wmadsod.dll.
My zplayer is an old version and still produces 2ch from 6ch wma.

Yeah, it's end of year! I am gonna be busy too... ;)

redfordxx
1st December 2005, 22:52
There is filter management in BSP.

But when I disable the filter, no other filter is loaded.

Which filter is loaded for you instead?

Rockaria
1st December 2005, 23:28
WM ASF Reader-> WMA Decoder DMO->ffdshow.........->Default DirectSound Device.
From the DMO pin out, it's PCM 6ch or 2ch depending on the players.
And you know that you can right click the content and open with grapheditor.
It (can) auto-render the filter chains.
Also when the GRF is used for the AVS input, you must disconnect the sound device renderer in the graph.

Good luck.

[edit]
Oh, check if foobar is working(mine works charm). I don't know why I forgot it.

guada 2
2nd December 2005, 18:28
Hello dimzon,

Just a question:
Would it be possible to use others plug in, like those of the mastering audio?

dimzon
2nd December 2005, 18:32
Hello dimzon,

Just a question:
Would it be possible to use others plug in, like those of the mastering audio?
You can use ANY AviSynth plugins/functions :)

guada 2
2nd December 2005, 19:01
It is clear, :) :) :) :) :) ; but you think that it is possible: yes or no. ;)

dimzon
2nd December 2005, 19:04
It is clear, :) :) :) :) :) ; but you think that it is possible: yes or no. ;)
Hm. I really dos'nt understand what does you want from me. Can you point me on actual concrete plugin which you want to use?

guada 2
2nd December 2005, 20:03
PSP MasterComp.dll, BIAS SoundSoap Pro.dll, TRackS.dll, L3 Multimaximizer.dll

Rockaria
2nd December 2005, 20:20
By the architecture, there are several places to attach the plugins :

1. as a dsfilter in a graphedit file
2. as an avisyhth plugin
3. as a plugin in an application which can read avs(also in a form of MakeAvis avi)
4. as an application can read pipe-in wav stream
5. as a plugin in an application which can read pipe-in wav stream

IgorC
3rd December 2005, 13:54
Where can I get bse_Nero7WA.dll?

Pendalf
4th December 2005, 02:21
Where can I get bse_Nero7WA.dll?

I also would like to know. :)
Old files have been removed from sharing servers.

dimzon
5th December 2005, 10:05
Where can I get bse_Nero7WA.dll?
I realy can't help you with this dll now - my HDD is dead, all sourcecode/binaries lost...
But source code is really easy ( I remember) so I can rewrite bse_Nero7WA.dll later (but i'm really busy now)

dimzon
5th December 2005, 10:06
PSP MasterComp.dll, BIAS SoundSoap Pro.dll, TRackS.dll, L3 Multimaximizer.dll
I does'nt know this plugins... Which API does them expose?

dimzon
5th December 2005, 12:24
So have you (or anybody else) tried generating an 6Ch AAC encode using my suggested method, or not?

Here's a link to my 6Ch AC3 Speaker Test Sample (http://81.98.148.105/Uploaded_Files/Doom9_Forum_files/6Ch_AC3_Sample.7z)
check this: http://www.mytempdir.com/300341

hitbit
5th December 2005, 15:51
PSP MasterComp.dll, BIAS SoundSoap Pro.dll, TRackS.dll, L3 Multimaximizer.dll
I think they are DirectShow and/or VST filters... AFAIK they can't be used with AviSynth

dimzon
5th December 2005, 15:55
I think they are DirectShow and/or VST filters... AFAIK they can't be used with AviSynth
1) It's possible to use DirectShow Graph as AVI-Synth source
2) I believe it's possible to write generic VST -> AviSynt adapter using VST SDK (http://ygrabit.steinberg.de/users/ygrabit/public_html/index.html)

Rockaria
5th December 2005, 16:15
The WinAmp AAC encoder (http://forum.doom9.org/showthread.php?p=746806#post746806) ,which now supports 6ch cbr & stdin, must be a good addition to this environment.
It worked flawlessly when I check the 'resize to 16bit', muxed to mp4 with the foobar mp4util(cause i did not copy the mp4box yet) but stayed stable @94kbps stable(default bit rate).

When I tested the winamp bundled Kaje - Hey Buddy Aacplus Surround.aac, it showed 130~210kbps vbr. Maybe the option is waiting hidden somewhere. :thanks:

tebasuna51
5th December 2005, 16:43
Congratulations Rockaria, Dimzon!. Good program BeHappy, it remain to much work but is promising. My small comments:

1) DECODERS. I need learn more about this, now:
I test ac3 and dts with NickAudio plugin and works fine.
Problems with DirectShow (ffdshow): wrong wav headers, streams with different duration than original...

2) DSP functions. The best.
Even for a newbie in AviSinth like me is easy write DSP functions:

A problem with BeSweet, resample a multichannel wav with ssrc, works fine with "ssrc 5.1 48000":
#a = last
#f = GetChannel(a, 1, 2).SSRC(48000)
#c = GetChannel(a, 3, 4).SSRC(48000)
#s = GetChannel(a, 5, 6).SSRC(48000)
#MergeChannels(f, c, s)
#EDITED: the precedent lines works but is only necessary:
SSRC(48000)

A typical function of BeSweet-azid, "Downmix dpl II"
a = last
f = GetChannel(a, 1, 2)
c = GetChannel(a, 3)
sl = GetChannel(a, 5)
sr = GetChannel(a, 6)
l = MixAudio(sl, sr, -0.2818, -0.1627) # -0.2222, -0.2222 for dpl (I)
l = MixAudio(l, c, 1.0, 0.2301)
r = MixAudio(sl, sr, 0.1627, 0.2818) # 0.2222, 0.2222 for dpl (I)
r = MixAudio(r, c, 1.0, 0.2301)
st = MergeChannels(l, r)
MixAudio(f, st, 0.3254, 1.0).Normalize()

3) ENCODERS. The hard work.
We need interfaces with encoders like Lame for mp3, ac3enc.dll, ...
The interface with Nero aac (naac) accept only a few parameters.

I know, Dimzon, you are busy until new year. See you later.
Rockaria, is possible to maintain a list in your first post with decoders/encoders checked with BeHappy?

Edited: New coefficients in "Downmix dpl II" from a more efficient matrix.
Second edit: (I'm really newbie in AviSinth) The internal plugin SSRC() works with multichannel streams, then "ssrc 5.1 48000" is very simple.

dimzon
5th December 2005, 16:55
I'm talking with Doom9 about integration BeHappy into MeGUI :)
Rockaria, is possible to maintain a list in your first post with decoders/encoders checked with BeHappy?
As fact - you can use any command-line encoder able to process StdIn:

Ogg Vorbis (avoTuVo oggenc)
AVS: 6==Audiochannels(last)?GetChannel(last,1,3,2,5,6,4):last
Arguments: -Q -q -2 - -o "{0}"

tebasuna51
5th December 2005, 17:28
Based in the example in Lame help:
"Streaming mono 22.05 kHz raw pcm, 24 kbps output:
cat inputfile | lame -r -m m -b 24 -s 22.05 -- > output"

We can use Lame.exe?

Rockaria
5th December 2005, 18:13
'Catenate' is basically for merging raw sources(no header) into stdout, although some readers handle the stream with generosity.
Yes, if you can use the "|" for a input for the following encoder, the encoder is stdin capable.

As I said earlier, I am already satisfied(yeah, introduction) with the flexibility and extensibility this environment provides, and proved by dimson's excellent work in coding & interface design.
Unfortunately I don't touch the source any more especially when there are talented proven. Instead, I can see better through the architecture and resources.
But I will try to contribute in this thread depending on the progress, to keep and enhance the flexibility.

As for the wav source containing other stream inside, check the ffdshow 'pcm' option in more detail and possibly attaching the ac3Filter after the ffdshow may stabilize the sync.

Rockaria
6th December 2005, 12:17
A typical function of BeSweet-azid, "Downmix dpl II" That's exactly what I was thinking, in addition to merging channels or clips from more than one. Also I was thinking the job control on multiple clips, which is what foobar is already doing.
But my second thought is, the DPL II can be done through a 'included' user function(the local variable does not affect the global). I also think other process can be done this way.

The in-line conditional assignment is somewhat weak to replace the IF-THEN-ELSE-ENDIF. Although it is possible to EMULATE the IFs but the efforts would be tremendous.

Also the clip can be previewed inside of the BeHappy, through a temporarily generated avs, played on a dsf capable player.

There are many already from my analysis not mentioned here, and certainly much more from other's contribution I bet.
But the most urgent thing for the flexibility(the integration onto the existing environment) I think is generating an avs for a verification and preview purpose, possibly in addition to the command line launcher script.

And we also know how hard it is to mention 'SOMETHING to be IMPROVED' onto an already PERFECT work. ;)

dimzon
7th December 2005, 10:27
Just additional threads about downmix/upmix via AviSynth:
http://forum.doom9.org/showthread.php?t=103466
http://forum.doom9.org/showthread.php?t=103482

My suggestion about VST to AviSynth adapter:
http://forum.doom9.org/showthread.php?t=103656

Some words about possible assimilation BeHappy by MeGUI (i hope)
http://forum.doom9.org/showthread.php?p=744846#post744846

dimzon
7th December 2005, 10:32
@Rockaria
Please, can you check and provide sample command line for MENCODER or/and FFMPEG for 6ch AC3 encoding? Thanx!

@All
Seem's like this methodology beat BeSweet by all features/formats/filters
Does anybody know any BeSweet feature not implementable by this methodology?

Kurtnoise
7th December 2005, 10:47
Does anybody know any BeSweet feature not implementable by this methodology?
- hybridgain/pregain/postgain functions.
- delay insertion.
- surcode dts encoding.
- lst/mux input files.
..... ;)

dimzon
7th December 2005, 10:53
- hybridgain/pregain/postgain functions.
Wrong!
Pregain is possible using Normalize() AviSynth function. Postgain is encoder feature - it's supported by some encoders, HybridGain is combination of both...

- delay insertion.
Wrong!
Look @ DelayAudio() AviSynth function

- surcode dts encoding.
Wrong?
All what You need - to find command line encoder with StdIn support - I believe - it's possible

- lst/mux input files.
I really don't underdstand what does it mean (Sorry, my english is Poor)

Kurtnoise
7th December 2005, 12:27
Wrong!
Pregain is possible using Normalize() AviSynth function. Postgain is encoder feature - it's supported by some encoders, HybridGain is combination of both...
don't say it's wrong because Postgain is a BeSweet feature...and, HybridGain also. You can't reproduced these features.


Wrong!
Look @ DelayAudio() AviSynth function
good point.

I really don't underdstand what does it mean (Sorry, my english is Poor)
I mean to have the possibilty to encode & merge several files into one directly.

Another good point for BeSweet, this is azid commands (dynamic compression , etc...) and id3 tagging.

dimzon
7th December 2005, 13:25
don't say it's wrong because Postgain is a BeSweet feature...
I believe it's same as ReplayGain (is'nt it?)
lame --longhelp
output:
LAME 32bits version 3.97 (beta 2, Nov 29 2005) (http://www.mp3dev.org/)

... skipped ..

--replaygain-fast compute RG fast but slightly inaccurately (default)
--replaygain-accurate compute RG more accurately and find the peak sample
--noreplaygain disable ReplayGain analysis
--clipdetect enable --replaygain-accurate and print a message whether
... skipped ..


I mean to have the possibilty to encode & merge several files into one directly.
You can achieve same effect using:
SomeSource(..) ++ SomeSource(..) + ... + SomeSource(..) in AviSynth script

Another good point for BeSweet, this is azid commands (dynamic compression , etc...)
Yes! We need it (http://forum.doom9.org/showthread.php?t=103742). I believe it's possible to use some AVS function or external filter to do it.

and id3 tagging
this is container/encoder feature. Lame supports tagging too.

Rockaria
7th December 2005, 23:06
Firstly, Megui and ac3 encoding :

I skimmed the megui development thread and some videohelp info. It looks like a hybrid system adopting several back ends including mencoder, ffmpeg besweet and even mp4box.
The besweet seems to be the audio encoding back end, where include the AC3 and AAC supports. So we seem to be unable to expect more than what the besweet provides currently.
My initial idea was importing existing excellent tools such as johnman's WW which is based on the wav, or at least 6 mono wave splitter mentioned in the first post to support existing(OLD fashioned) encoder such as surcode or softencode(it can read almost any formats even raw).

Secondly, the volume gain :

The replaygain (http://en.wikipedia.org/wiki/Replaygain) seems to be almost a standard adopted in many formats including the general approach in the foobar2k (http://www.replaygain.org/).

As we know, we can process the clip with 'max gain with no clipping'(no parameter : requires a scanning time) or with a given value which can be set by the replaygain contained in the meta info on each clip if we can read the replaygain anyhow in the BeHappy.

DRC and other issue :

The FFDSHOW has two places for the DRC : it has options on DTS and AC3 codec definition. It also has this function on the volume DSP, which is clearer in ac3Filter.
If we anyhow can control the DSF usage like MPC/zPlayer/graphedit.. in the avisynth's altered DirectShowSource method, this would be an easy job in addition to the AC3 encoding.

My opinion on the MeGui integration is almost negative because they are both frontend and the requrements and milestones are supposedly defined already. This system or methodology has strong advantages on the flexibility and extensibility. It's lightweight in itself but accomodates almost any input sources and destination formats, existing and future.

We can just implement the automation and convenience one by one and welcome the new plugins/dsfilters or encoders...one by one.

Sorry for any mistyping because of my rush.. busy for a while.

Kurtnoise
8th December 2005, 09:09
I believe it's same as ReplayGain (is'nt it?)
no...it's not the same thing.


You can achieve same effect using:
SomeSource(..) ++ SomeSource(..) + ... + SomeSource(..) in AviSynth script
it doesn't work for me here...

this is container/encoder feature. Lame supports tagging too.
fortunately no...there are some tagger tools outside encoders. And this feature doesn't concern the container himself.


btw, Avisynth is very powerfull, I didn't say the contrary. I use it almost everyday for my dvds backups but bear in mind that BeSweet is more used for audio transcoding than Avisynth for the moment...Moreover, you make a great stuff with BePipe you know. Keep up the good work dude. :)

Kurtnoise
8th December 2005, 10:58
I just tried with ffmpeg to encode a wav file to ac3 but it seems that ffmpeg failed to do that or I missed something.

BePipe.exe --script "WavSource(^c:\input.wav^)" | "C:\Program Files\FFMpeg\ffmpeg.exe" -i - -ab 256 "E:\output.ac3"

http://kurtnoise.free.fr/ffmpeg.7z

Hint: directly into ffmpeg it works fine...it seems there is a pipe issue. :(

stephanV
8th December 2005, 11:43
fortunately no...there are some tagger tools outside encoders. And this feature doesn't concern the container himself.
Uhm, tagging is a container feature. ID3 was only invented because mp3 (as raw format) lacks a tagging standard. Putting ID3 tags on ogg vorbis or mp4 (aac) is a rather bad thing to do.

Kurtnoise
8th December 2005, 13:26
mmh why we have id3 support in some lossless encoders in this case ?

Rockaria
8th December 2005, 14:27
SomeSource(..) ++ SomeSource(..) + ... + SomeSource(..) in AviSynth script it doesn't work for me here...
I tested it before for joining several files as well as looping and splitting(trim).. even it can join 6 mono waves into a 6ch wav in a step.

I just tried with ffmpeg to encode a wav file to ac3
Thanks for the clarification(videohelp said a bit about it). I am busy for a very long while.

Avisynth is very powerfull, I didn't say the contraryNobody mentioned the weakness of the Be series either.
The thing is it has just started to be enhanced, open , working and already powerful.

Thanks for the contributions. I am on a long travel and dimzon take the thread. :thanks: