View Full Version : madFlac - new DirectShow FLAC source filter + decoder


madshi
3rd October 2007, 18:14
madFlac v1.10

http://madshi.net/madFlac.rar

This is a DirectShow source + decoder filter for FLAC files. It should work with any FLAC files you can throw at it and give out bit perfect results. Supported are both external standalone FLAC files and FLAC tracks inside of containers (e.g. MKV). Please let me know if you find any problems.

Enjoy! :)

Thunderbolt8
3rd October 2007, 19:47
very nice,thank!
any estimation when v2.4 might come?

edit: tiny cosmetics: readme says install.bat, while its register.bat ;)

p.s. any info about cpu usage or something like that? is it better in this field as coreflac or ffdshow audio for example?

edit: have some playback problems with that flac file Ive written about in the eac3to thread. this time madflac wont play the 5.1 dd+ -> flac file (24-bit) inside that .mkv, which played back just fine with coreflac or ffdshow audio. the video is there, but theres absolutely no sound to be heard. when I take that critical 2.0 dd+ -> flac commentary file, which accelerated the fps to 40 with ffdshow audio and coreflac, there are just clicking noises and mpc crashes soon after.
does playback only work with files outside .mka/.mkv ?

madshi
3rd October 2007, 21:48
any estimation when v2.4 might come?
I've no idea.

edit: tiny cosmetics: readme says install.bat, while its register.bat ;)
Ooops.

p.s. any info about cpu usage or something like that? is it better in this field as coreflac or ffdshow audio for example?
Haven't compared that yet.

edit: have some playback problems with that flac file Ive written about in the eac3to thread. this time madflac wont play the 5.1 dd+ -> flac file (24-bit) inside that .mkv, which played back just fine with coreflac or ffdshow audio. the video is there, but theres absolutely no sound to be heard. when I take that critical 2.0 dd+ -> flac commentary file, which accelerated the fps to 40 with ffdshow audio and coreflac, there are just clicking noises and mpc crashes soon after.
does playback only work with files outside .mka/.mkv ?
madFlac is only meant for external files. FLAC files inside of any containers are not supported by madFlac.

ACrowley
4th October 2007, 11:39
THX!

Nice work...-.until now i used illiminable FLAC Source/Decoder.

But it wont decode 24bit Flac (only muxed in mka).
For FALC in Container i use ffdshow ,works perfect.

Is it possible to connect with AC3 Filter at the End in the decodig chain ? I use it to Output AC3 640 SPDIF

Inventive Software
4th October 2007, 12:03
Is there a way to just enable the source filter?

madshi
4th October 2007, 14:52
Is it possible to connect with AC3 Filter at the End in the decodig chain ? I use it to Output AC3 640 SPDIF
Should be no problem. Well, at least I'm not doing anything to disallow that.

madshi
4th October 2007, 14:53
Is there a way to just enable the source filter?
It's a combined source/decoder filter. Currently you cannot disable the decoder. What would you need that for?

Inventive Software
4th October 2007, 17:52
For people that want to use ffdshow, probably with conversion or down-mixing filters, or another decoder.

madshi
4th October 2007, 17:59
For people that want to use ffdshow, probably with conversion or down-mixing filters, or another decoder.
madFlac's decoding is bit perfect (as it should be for a lossless codec). Because of that I see no reason to use another decoder. You can still use ffdshow's "raw" audio processing to do down-mixing, conversion and other stuff. FWIW, ffdshow currently cannot handle 8 audio channels (sound gets distorted). So for 8 channel FLACs ffdshow wouldn't work, anyway.

madshi
4th October 2007, 18:02
madFlac v1.1 released

http://madshi.net/madFlac.rar

* BASS libraries replaced with libFlac
* seeking works now for > 4GB files, too
As far as I can see, the filter should now be "perfect" for external FLAC files. Please let me know if you find any problems.

Inventive Software
4th October 2007, 18:08
Cheers, will test later on. :)

Thunderbolt8
4th October 2007, 18:33
tested v1.1 with my speedy gonzales problem commentary track, placed it with same filename outside the movie .mkv as .flac, used commandline mpc with /dub command, but mpc just crashes then with

AppName: mplayerc.exe AppVer: 6.4.9.1 ModName: coreflacdecoder.ax
ModVer: 0.4.0.46 Offset: 00014e34

edit: allright, crash was caused by coreflacdecoder, which was still active until I unregistrered it, despite all block setting.
still, also with v1.1 those stupid clicks in the commentary track :S

just noticed when playing back that commentary track in .mka with normal media player it reported the same length as the movie track, but the time elapses quite some bit faster. could it be possible that the commentary track was recored with a different number of fps and this might be the reason why he accelerates the video? is there a way to slow it down to 23.976fps then, without having it to sound stupid?

ACrowley
4th October 2007, 18:50
@madshi

Ive Problems with madflac

Ive no correct channel decoding on 5.1 /6.1 FLAC .
FFdshow and illiminabel works perfect. But with madflac ive no Center Channel...i tried all System/Soundcard Speaker Settings, all the same

madshi
4th October 2007, 22:24
still, also with v1.1 those stupid clicks in the commentary track :S
Are you sure that the commentary track is ok? Maybe there's something wrong with that track?

just noticed when playing back that commentary track in .mka with normal media player it reported the same length as the movie track, but the time elapses quite some bit faster. could it be possible that the commentary track was recored with a different number of fps and this might be the reason why he accelerates the video? is there a way to slow it down to 23.976fps then, without having it to sound stupid?
How fast does the track play with madFlac? If the speed is ok with madFlac, the problem must be related to the mka container somehow.

madshi
4th October 2007, 22:26
@madshi

Ive Problems with madflac

Ive no correct channel decoding on 5.1 /6.1 FLAC .
FFdshow and illiminabel works perfect. But with madflac ive no Center Channel...i tried all System/Soundcard Speaker Settings, all the same
That's strange. It seems to work for me. At least I've forced the ffdshow raw audio decoder into the chain and it shows that there's some action on the center channel (see "volume" page, check the bottom most checkbox).

Inventive Software
5th October 2007, 01:15
Checked with an AviSynth script that loads 6 FLAC files representing 6 channels, and all are fine. :)

madshi
5th October 2007, 08:24
Checked with an AviSynth script that loads 6 FLAC files representing 6 channels, and all are fine. :)
Thanks!

So the question is why it doesn't seem to work for ACrowley?

Inventive Software
5th October 2007, 11:28
Mine is 6 seperate FLAC files, his is probably a 5.1 channel FLAC file. It may well be the way it's encoded.

Is it possible to swap the channels in such a file, like with AviSynth, and losslessly encode again?

madshi
5th October 2007, 11:43
Is it possible to swap the channels in such a file, like with AviSynth, and losslessly encode again?
Yes, you can do e.g. "eac3to source.flac dest.flac -0,1,2,3,5,4" to swap the last two channels.

ACrowley
5th October 2007, 16:24
...the encoded FLAC Files are Ok....all Channels present . Thats not the Problem, only the decoding with madflac is wrong.

Friend of mine has the same Problem :) And the PC on my work too
FLAC Output with madflac analog Output has no center channel
Illiminable ffdhow and CoreFLAC are working , i m sure its not a Problem caused by my Setup

Very interesting :

When i add ffdshow Audiio Processor behind madflac the Output is OK !
Without ffdshow Center Channel isnt present (i can hear itvery silent in L R )

madshi
5th October 2007, 17:21
madFlac v1.2 released

http://madshi.net/madFlac.rar

* bugfix: channel mapping was specified correctly

ACrowley
5th October 2007, 17:25
madFlac v1.2 released

http://madshi.net/madFlac.rar

* bugfix: channel mapping was specified correctly

Yep....now it works perfect ! :)

madshi
5th October 2007, 17:37
Yep....now it works perfect ! :)
:)

AC3Filter now connects, too. But only on 5.1, not on 7.1.

ACrowley
6th October 2007, 11:10
yes...AC3 Filter supports only max 5.1

7.1 Support is on the to do List , so far i know

madshi
6th October 2007, 16:45
madFlac v1.3 released

http://madshi.net/madFlac.rar

* property page added
* option for limiting output to max 5.1 channels added

ACrowley
7th October 2007, 08:36
madFlac v1.3 released

http://madshi.net/madFlac.rar

* property page added
* option for limiting output to max 5.1 channels added

The Decoder appears not as "madflac" in the Dshow Player Filter Properties when you play a Flac File as like as other Decoder ? right ?...
http://img520.imageshack.us/img520/3448/sourcegn8.th.png (http://img520.imageshack.us/my.php?image=sourcegn8.png)

Ofcourse you can acces the Options whne you click Filter Options/"Source File :customized Graph" in Zoomplayer or in mpc its in "Play/Filters"

Its marginal, but maybe you can make the Decoder visible as "madflac" for Dshow Playback so that the Decoder is listed in the Filter/Graph Optiones so we can acces the Options from there ...would be more obvious :)

And i have a 6.1 FLAC File reencoded from DTSHD 6.1 with latest eac3to. eac3to info is DTS HD "6.1" 24
and .wavs Output is 7 mono waves

But Madflac Info on 6.1 Flac 7.1 CH
I made a few Tests and all Flac Files reencoded from dts (hd) 6.1 are 7.1 in madflac Properties.
I Dont know if its only a wrong info or madflac decodes them wrong as 7.1
http://img263.imageshack.us/img263/5213/36032700mm5.th.png (http://img263.imageshack.us/my.php?image=36032700mm5.png)

madshi
7th October 2007, 14:08
The Decoder appears not as "madflac" in the Dshow Player Filter Properties when you play a Flac File as like as other Decoder ? right ?...
http://img520.imageshack.us/img520/3448/sourcegn8.th.png (http://img520.imageshack.us/my.php?image=sourcegn8.png)

Ofcourse you can acces the Options whne you click Filter Options/"Source File :customized Graph" in Zoomplayer or in mpc its in "Play/Filters"

Its marginal, but maybe you can make the Decoder visible as "madflac" for Dshow Playback so that the Decoder is listed in the Filter/Graph Optiones so we can acces the Options from there ...would be more obvious :)
I'm using MPC and and not ZoomPlayer, and in MPC the madFlac options are available in the same place where any other decoder's options are available, too. Not sure what madFlac would have to do different (technically) to show up in ZoomPlayer where you want it to show up. If that's important for you, maybe you can ask ZoomPlayer support about this? They might be able to tell you what a decoder needs to do exactly to show up where you want it to show up.

And i have a 6.1 FLAC File reencoded from DTSHD 6.1 with latest eac3to. eac3to info is DTS HD "6.1" 24
and .wavs Output is 7 mono waves

But Madflac Info on 6.1 Flac 7.1 CH
I made a few Tests and all Flac Files reencoded from dts (hd) 6.1 are 7.1 in madflac Properties.
I Dont know if its only a wrong info or madflac decodes them wrong as 7.1
LPCM tracks are 7.1, even if the soundtrack is only 6.1. The back channel is then simply stored twice with identical data. DTS Discrete can be 6.1 or 7.1, I believe. TrueHD is usually 5.1 or 7.1, I think. In order to avoid having so many different channel configurations eac3to is intentionally converting 6.1 channels to 7.1 by doubling the 7th channel. FLAC should handle such situations very efficiently. I expect there to be no noticable disadvantage in file size.

clsid
7th October 2007, 20:12
madFlac crashes for me :(

Could it be because of my old CPU (no SSE)?

madshi
7th October 2007, 20:45
madFlac crashes for me :(

Could it be because of my old CPU (no SSE)?
Can you post the crash report? At least in which dll it crashed? If it's inside of libFlac.dll then it might be SSE related. Honestly I'm not sure which version of libFlac.dll I'm using. You could try replacing that libFlac.dll (which is distributed with madFlac) with a SSE free version to see if that fixes the problem.

Moitah
7th October 2007, 20:45
madFlac crashes for me :(

Could it be because of my old CPU (no SSE)?
I got a similar bug report for my program CUE Tools which uses libFLAC, and indeed there is sometimes a problem with libFLAC's SSE detection routine. I'm pretty sure this is the same problem here because I was able to reproduce it on one of my older computers. Try this compile (http://www.moitah.net/misc/libFLAC_DLL_TryCatch_1.2.1.zip) of libFLAC.dll, I compiled it with USE_TRY_CATCH_FLAVOR defined which changes the way the error handling in the SSE detection works.

clsid
7th October 2007, 23:24
I am happy to report that Moitah's compile of libFLAC.dll works fine :)

ACrowley
8th October 2007, 09:23
@Madhsi

I simply mean that in mpc for example for AC3 the Decoder apperas as AC3 Filter, or for x264 its CoreAVC or ffdshowVideoDecoder etc
You can click on the Decoder to enter Options.

Thats what i mean for madflac too because the Decoder appears not as madflac as like as AC3 Filter for example....but its marginal , forget it :)

madshi
8th October 2007, 10:38
I am happy to report that Moitah's compile of libFLAC.dll works fine :)
That's nice!

I'll distribute Moitah's build with madFlac from now on, then... :) Thanks to Moitah!

madshi
8th October 2007, 10:39
I simply mean that in mpc for example for AC3 the Decoder apperas as AC3 Filter, or for x264 its CoreAVC or ffdshowVideoDecoder etc
You can click on the Decoder to enter Options.

Thats what i mean for madflac too because the Decoder appears not as madflac as like as AC3 Filter for example....but its marginal , forget it :)
Ah, I see what you mean. madFlac shows not with "madFlac", but with the filename of the FLAC file. That should be easy to change.

ACrowley
8th October 2007, 13:33
Ah, I see what you mean. madFlac shows not with "madFlac", but with the filename of the FLAC file. That should be easy to change.

yep...thats all we need ,youre right

Shakey_Jake33
8th October 2007, 22:03
I get an error messege when trying to install this :(

"The module "madFLAC.ax" was loaded but the call to DllResidterServer failed with error code 0x80004005."

I am using Vista X64 mind.

madshi
9th October 2007, 08:21
I get an error messege when trying to install this :(

"The module "madFLAC.ax" was loaded but the call to DllResidterServer failed with error code 0x80004005."

I am using Vista X64 mind.
Ouch. Didn't test madFlac on Vista64 yet. But I've already had trouble with installing the simple "Dump" filter (MS filter which ships with GraphEdit) on Vista64! So it seems that installing 32bit DirectShow filters on Vista64 is a general problem. I'll look into this later. Can't promise a specific date for a fix, though.

TheSof
9th October 2007, 12:07
This is just for playing flac without a container, yes?

I have lots of working 5.1 flacs but as soon as I put them in an mka and mkv and use ffdshow, the sound breaks up every few seconds.

Can I ask what people are using to decoder flac inside a mkv container?

madshi
9th October 2007, 12:14
This is just for playing flac without a container, yes?
Correct.

I have lots of working 5.1 flacs but as soon as I put them in an mka and mkv and use ffdshow, the sound breaks up every few seconds.

Can I ask what people are using to decoder flac inside a mkv container?
Currently I have all my FLACs as external files. I might add decoding support for FLACs in containers, but I'm not sure if I can make it better than ffdshow.

clsid
9th October 2007, 12:15
The Vista problem might be because of UAC. Try disabling that. And of course register the filter with admin privileges.

Shakey_Jake33
9th October 2007, 13:11
The Vista problem might be because of UAC. Try disabling that. And of course register the filter with admin privileges.
You are right! Disabling UAC lets me install it! I've never had to do that with a codec before though.

TheSof
9th October 2007, 15:01
I keep getting a "Cannot render file" when using madflac and mpc. Works fine in graphedit.

madshi
9th October 2007, 15:30
I keep getting a "Cannot render file" when using madflac and mpc. Works fine in graphedit.
Hmmm... Do you have some "strange" filter in the "external filters" section? Don't know what else could stop madFlac from working...

What happens if you just drop a FLAC file into GraphEdit without manually choosing madFlac. Does GraphEdit automatically choose madFlac and does playback work that way?

Maybe you still have another filter installed (e.g. CoreFlac)?

TheSof
9th October 2007, 15:49
When I drop an flac into graphedit I get an error:

"The format is not supported."

I do not have coreflac installed, nor any other flac source filter nor decoder, but clearly somethings wrong on my end, as seems to be more and more often the case:(

madshi
9th October 2007, 17:40
When I drop an flac into graphedit I get an error:

"The format is not supported."

I do not have coreflac installed, nor any other flac source filter nor decoder, but clearly somethings wrong on my end, as seems to be more and more often the case:(
That's a bit strange. Maybe there's another filter which tries to read the FLAC file but fails. Does MPC show you which filter it used for the "cannot render file"?

madshi
10th October 2007, 19:13
madFlac v1.4 released

http://madshi.net/madFlac.rar

* bugfix: "madFlac" is shown in MPC/ZoomPlayer now instead of file name
* bugfix: maybe installation in Vista64 works now without having to deactivate UAC (not tested)
* bugfix: using different libFlac.dll build to avoid crashes on older CPUs
* in addition to the "madFlac Source" there's now a "madFlac Decoder" filter for decoding FLAC inside of MKV (or other containers)
The new "madFlac Decoder" filter for MKV FLAC decoding is not very well tested yet. So I'd be happy about some feedback. Especially I'd like to know if there are audio dropouts or audio sync problems or anything like that. If everything works great, I'd like to know that, too, of course. :) Thanks.

TheSof
12th October 2007, 00:19
Have not had much time to test, but for me it is great. It does not drop out when ffdshow does (for me ffdshow will always drop out now and then in the first 20 seconds but then more or less behaves) nor pop, which core does sometimes.

I also like the information panel.

Great work in all. Thanks so much.

madshi
12th October 2007, 08:27
I'm glad to hear that - thanks for the feedback... :)

Fasola_Jan
13th October 2007, 08:34
Can you add tag support for Windows Media Player 11, pretty please (with cherry on top)?

madshi
13th October 2007, 08:42
Can you add tag support for Windows Media Player 11, pretty please (with cherry on top)?
I don't even know (exactly) what that is. If you give me a few details I might be able to add it.

Fasola_Jan
13th October 2007, 11:22
Sure You do :)
Title, Artist, Album info etc. embedded inside flac file (tags).
Windows Media Player Tag Support Extender (WMPTSE) project link:
http://wmptagext.sourceforge.net/
It sometimes works with flac files (almost)
Maybe You can port some of this to madFlac?

madshi
13th October 2007, 11:57
Can you please send me a short sample of a file with all the tag infos in it that you want to have supported? I only need a few seconds of audio with the tags in. So e.g. 1MB should be plenty enough.

Fasola_Jan
13th October 2007, 13:22
Done.
(to email at madshi.net account)

ACrowley
13th October 2007, 13:29
FLAC muxed in mkv works nice so far now !

madshi
13th October 2007, 22:38
Done.
(to email at madshi.net account)
Received it. Thanks. Will look at this when I find some time.

madshi
13th October 2007, 22:39
FLAC muxed in mkv works nice so far now !
Good to hear! :)

ACrowley
14th October 2007, 14:38
Good to hear! :)

and connects properly to AC3Filter..so i can output FLAC as AC3 640 through SPDIF...not lossless ofcourse, but it sounds still great...imho AC3Filter AC3 on the fly encoder sund better as ffdshow

But AC3Filter supports on 5.1 and wont connect to 6.1/7.1 Flac..i think when i set madflac to 5.1 restricted Output ,it should connect in 5.1 to AC3 Filter again , right ?

I know there a ffdhshow Build which can handle 6.1
But this ffdshow Build wont output (on the fly encode) AC3 640 via SPDIF for any Audio like FLAC or WMA pro. It was working fine with older ffdshow Builds

However, AC3 Filter works fine with madflac :)

madshi
14th October 2007, 14:57
But AC3Filter supports on 5.1 and wont connect to 6.1/7.1 Flac..i think when i set madflac to 5.1 restricted Output ,it should connect in 5.1 to AC3 Filter again , right ?
Yes, it will connect that way. That's what the madFlac option is meant for... :)

madshi
14th October 2007, 14:58
Btw, if there is interest I might include realtime Aften reencoding to madFlac. However, I don't know how fast Aften is. It might cost too much CPU to be useful.

Any opinions?

ACrowley
14th October 2007, 14:59
Yes, it will connect that way. That's what the madFlac option is meant for... :)

Ah, i made a few Test on 6.1 (7.1) FLAC Files.

madflac output from "24 Bit" 6.1 connects to AC3Filter without 5.1 restriction Option!
AC3 Filter decodes only 5.1 from 6.1......i think the BC is skipped
But strange....AC3Filter decodes this Output from madflac (24Bit 7.2) as dts with the "dts decoder" ?!

The same FLAC in 16 bit cant conect to AC3 Filter because its more than 5.1 ,the old Problem.
But now i can set madflac to 5.1 restricted and it works again with AC3 Filter
AC3 Filter decoding is PCM as it should be.

So :
24bit FLAC 6.1 = AC3 Filter decodes it with "dts decoder" as 5.1
16bit FLAC 6.1 = AC3 Filter wont connect without madflac 5.1 restriction. Decoding via PCM as usual

Strange ,isnt it ?

@ Madshi.. it would be a great Coup when you can add AC3 640 Output (SPDIF capable) in madflac ! Maybe you find a Way :)

madshi
14th October 2007, 15:29
@ Madshi.. it would be a great Coup when you can add AC3 640 Output (SPDIF capable) in madflac ! Maybe you find a Way :)
I don't know about SPDIF capable, but adding Aften realtime encoding shouldn't be a big problem. The output will be AC3 640kbps. AC3Filter should be able to connect and transport it to SPDIF, I guess...

But as I said, I'm not sure about CPU usage. I guess that Aften eats more CPU than ffdshow and AC3filter do. But I don't know for sure...

honai
14th October 2007, 16:56
Isn't Aften multi-pass, anyway?

madshi
14th October 2007, 17:05
Isn't Aften multi-pass, anyway?
Nope. It's very straight forward: 48000 PCM samples in, one AC3 frame out.

SBeaver
14th October 2007, 17:28
A 64bit version of the filter would be nice.
I requested something like this in the ffdshow thread a week or so ago.
ffdshow can't play bare FLAC files without a filter and there arn't any for 64bit.
Please have a look and see what can be done.

madshi
14th October 2007, 17:40
A 64bit version of the filter would be nice.
I requested something like this in the ffdshow thread a week or so ago.
ffdshow can't play bare FLAC files without a filter and there arn't any for 64bit.
Please have a look and see what can be done.
No chance in hell right now, I'm sorry. The reason is very simple: I'm using Delphi and there's no native 64bit Delphi compiler/linker available yet.

Why do you need that, anyway? MPC 32bit works just fine in Vista64, as far as I can see.

SBeaver
14th October 2007, 17:44
No chance in hell right now, I'm sorry. The reason is very simple: I'm using Delphi and there's no native 64bit Delphi compiler/linker available yet.

Why do you need that, anyway? MPC 32bit works just fine in Vista64, as far as I can see.

ac3 passthrough only works with 64bit ffdshow on my soundcard (and a lot of others) with vista64.
Therefore: 5.1 FLAC --> 5.1 AC3 --> SPDIF is the only way I can get multichannel sound if audio is not in a container like MKV.
It's really just a minor issue, but I thought I should mention it.

edit: flac decoding in ffdshow works if in container

madshi
14th October 2007, 18:11
ac3 passthrough only works with 64bit ffdshow on my soundcard (and a lot of others) with vista64.
Therefore: 5.1 FLAC --> 5.1 AC3 --> SPDIF is the only way I can get multichannel sound if audio is not in a container like MKV.
Ah ok, didn't know that.

Snowknight26
17th October 2007, 01:17
When playing an .mkv with at least a video and a FLAC audio track, having madFLAC.ax registered and FLAC decoding in ffdshow set to disabled makes WMP crash (Haali Media Splitter is being used). Enabling FLAC decoding in ffdshow through libavcodec works fine (apart from the delay problems) even if madFLAC.ax is registered. Unresgistering the filter and disabling FLAC decoding in ffdshow makes the file play, but with no audio. Therefore, I can assume madFLAC is the problem.

Edit: Standalone .flac files work fine with madFLAC.

madshi
17th October 2007, 08:15
Thanks for the report, I'll see if I can reproduce the problem here.

madshi
23rd October 2007, 14:06
When playing an .mkv with at least a video and a FLAC audio track, having madFLAC.ax registered and FLAC decoding in ffdshow set to disabled makes WMP crash (Haali Media Splitter is being used). Enabling FLAC decoding in ffdshow through libavcodec works fine (apart from the delay problems) even if madFLAC.ax is registered. Unresgistering the filter and disabling FLAC decoding in ffdshow makes the file play, but with no audio. Therefore, I can assume madFLAC is the problem.

Edit: Standalone .flac files work fine with madFLAC.
I've tried to reproduce this problem but there's no crash for me. Can you please create a small sample of your MKV file? You can do so by using mkvtoolnix. Please check if you can reproduce the crash with that sample. If so, please send it to me (or upload it somewhere). Please also let me know about your OS. Another thing worth trying would be if there's also a crash for you when using MPC (Media Player Classic) and GraphEdit (Haali Media Splitter -> madFlac -> Default DirectSound renderer).

Snowknight26
25th October 2007, 01:22
I'm using Vista x86. The file plays fine in MPC (I guess its using madFLAC and its internal splitter) and using GraphEdit (Haali Media Splitter -> madFlac decoder -> Default DirectShow Device).

Not sure if a sample is necessary at this point, but here is a sample just incase:

http://www.stfcc.org/misc/sample.mkv

clsid
25th October 2007, 12:11
Your sample plays OK for me in WMP11 on XP using Haali's splitter. Switching audio tracks works too.

Maybe its a Vista only problem.

nautilus7
4th November 2007, 00:04
Minor cosmetic issue with long paths/filenames. Maybe you want to change something here. It works well by the way. Nice software!

http://img457.imageshack.us/img457/1475/madlacoj5.th.png (http://img457.imageshack.us/my.php?image=madlacoj5.png)

Mc Onyx
4th November 2007, 12:23
Is it possible to include some sort of equalizer in madFLAC decoder, if it's not too much work, if it's a lot of work, don't bother, just a thought, cause i like to "crank up" the bass a little bit. :)

madshi
4th November 2007, 20:35
Minor cosmetic issue with long paths/filenames. Maybe you want to change something here.
Thanks, will fix that with the next version.

madshi
4th November 2007, 20:37
Is it possible to include some sort of equalizer in madFLAC decoder, if it's not too much work, if it's a lot of work, don't bother, just a thought, cause i like to "crank up" the bass a little bit. :)
Possible: Yes. But I don't really have time for that right now. Furthermore I think it would make more sense to create a general DirectShow equalizer filter which works with any sources and not just with madFlac.

honai
4th November 2007, 22:32
I think you can do that by chaining ffdshow after madFLAC.

Thunderbolt8
5th November 2007, 22:01
Possible: Yes. But I don't really have time for that right now. Furthermore I think it would make more sense to create a general DirectShow equalizer filter which works with any sources and not just with madFlac.if this does also include truehd and dts-hd then it would be awsome, yes :P

madshi
5th November 2007, 22:54
if this does also include truehd and dts-hd then it would be awsome, yes :P
Ehm, I didn't mean to say that I would write such an equalizer! :eek: Also, as honai said, doesn't ffdshow already contain such a feature?

madshi
25th November 2007, 22:38
madFlac v1.5 released

http://madshi.net/madFlac.rar

* fixed install/uninstall problems in Vista32/64
* limiting to 5.1 channels correctly drops the back channels now
* added metadata support (artist name, track/album title, date, track number)
Will add downmixing of 7.1 to 5.1 in a later version (back channels will be mixed with lower volume into the surround channels).

madshi
25th November 2007, 22:44
When playing an .mkv with at least a video and a FLAC audio track, having madFLAC.ax registered and FLAC decoding in ffdshow set to disabled makes WMP crash (Haali Media Splitter is being used). Enabling FLAC decoding in ffdshow through libavcodec works fine (apart from the delay problems) even if madFLAC.ax is registered. Unresgistering the filter and disabling FLAC decoding in ffdshow makes the file play, but with no audio. Therefore, I can assume madFLAC is the problem.
I cannot reproduce the problem with your sample on my Vista64 PC with WMP 11. No crash, it works just fine.

Snowknight26
25th November 2007, 22:59
v1.5 works perfectly now. No crashes.

madshi
25th November 2007, 23:30
Strange, I'm not sure what exactly "fixed" the crash. But well, I won't complain... :)

Shakey_Jake33
25th November 2007, 23:37
Excellent release madshi, metadata support was the main thing I was waiting for :)

madshi
25th November 2007, 23:45
Excellent release madshi, metadata support was the main thing I was waiting for :)
You're welcome. So does metadata support work the way you were hoping for? Strangely WMP 11 doesn't show the metadata for me. But MPC does.

shambles
26th November 2007, 09:44
awesome release :D

Will add downmixing of 7.1 to 5.1 in a later version (back channels will be mixed with lower volume into the surround channels).

just one point about this, shouldn't real discrete 7.1 and fake 7.1 with duplicated rear channel be downmixed differently? maybe you could add a switch to do it as it probably would be quite difficult to automatise since in some 7.1 tracks the duplicate rear channels are not bit-for-bit identical even if the waveforms are.

anyway, much thanks and again looking forward to the next version ;)

madshi
26th November 2007, 17:01
just one point about this, shouldn't real discrete 7.1 and fake 7.1 with duplicated rear channel be downmixed differently? maybe you could add a switch to do it as it probably would be quite difficult to automatise since in some 7.1 tracks the duplicate rear channels are not bit-for-bit identical even if the waveforms are.
I'm not sure exactly what you mean with "fake 7.1"? Can you clarify?

Shakey_Jake33
26th November 2007, 17:05
I guess he means matrixed 7.1 (rather than proper discrete).

nautilus7
26th November 2007, 17:11
Minor cosmetic issue with long paths/filenames. Maybe you want to change something here. It works well by the way. Nice software!

http://img457.imageshack.us/img457/1475/madlacoj5.th.png (http://img457.imageshack.us/my.php?image=madlacoj5.png)

Madshi, you didn't fix this.

shambles
26th November 2007, 17:15
i mean a 7.1 track made from a 6.1 one so it has identical bl and br channels

madshi
26th November 2007, 17:32
Madshi, you didn't fix this.
Yes, you're right. I was short on time and thought this was the least important thing to fix. So I delayed the fix into a future version.

madshi
26th November 2007, 17:34
i mean a 7.1 track made from a 6.1 one so it has identical bl and br channels
Nero's Audio Decoder mixes the back channel from DTS-ES 6.1 discrete with volume * 0.7 into both surround channels. That's what eac3to is doing, too, and what madFlac will do in a future version. I think it's the correct way to handle the situation. And it should work the same way with true 7.1, too.

nautilus7
26th November 2007, 17:36
Yes, you're right. I was short on time and thought this was the least important thing to fix. So I delayed the fix into a future version.
Ah, OK. I thought you forgot it. It's really not at all important.

shambles
26th November 2007, 18:24
Nero's Audio Decoder mixes the back channel from DTS-ES 6.1 discrete with volume * 0.7 into both surround channels. That's what eac3to is doing, too, and what madFlac will do in a future version. I think it's the correct way to handle the situation. And it should work the same way with true 7.1, too.

doh, i wasn't thinking straight. of course there's no problem if the downmixing coefficient for 7.1 -> 5.1 is 0.7071.. but i've actually been wondering myself if it should be that or if the bl and br should just be mixed to sl and sr at full volume..

madshi
26th November 2007, 18:33
doh, i wasn't thinking straight. of course there's no problem if the downmixing coefficient for 7.1 -> 5.1 is 0.7071.. but i've actually been wondering myself if it should be that or if the bl and br should just be mixed to sl and sr at full volume..
Wasn't sure about that myself, so I've checked what Nero does... :) Nero uses something between 0.700 und 0.707. Not sure about the exact value. But I think it's close enough. eac3to is using "*181/256=0.70703125".

clsid
26th November 2007, 18:55
When I see those numbers above I immediately think about sqrt(2)/2=0.70710678

nautilus7
26th November 2007, 19:01
-3dB or 50% of the initial signal power. :p

madshi
26th November 2007, 19:20
-3dB or 50% of the initial signal power. :p
How does this -dB calculation work? Can you give me some more details about that?

nautilus7
26th November 2007, 20:03
How does this -dB calculation work? Can you give me some more details about that?I don't know what you really mean/want. I just explained how this strange number (0,707...) came out.

Probably the nero decoder when downmixes the 7.1 to 5.1 mixes the back channels with the surround ones with half signal power. It's P=~V^2, where P=power, V=voltage. To get half power you want the output voltage to be 1/sqrt(2)=sqrt(2)/2=0,7071067811...... of the initial. If you rewrite the equation in dB and put sqrt(2)/2 you get -3dB.

That's all. You don't have to do anything else. Just put the real number which is sqrt(2)/2.

madshi
26th November 2007, 23:10
I don't know what you really mean/want. I just explained how this strange number (0,707...) came out.

Probably the nero decoder when downmixes the 7.1 to 5.1 mixes the back channels with the surround ones with half signal power. It's P=~V^2, where P=power, V=voltage. To get half power you want the output voltage to be 1/sqrt(2)=sqrt(2)/2=0,7071067811...... of the initial. If you rewrite the equation in dB and put sqrt(2)/2 you get -3dB.

That's all. You don't have to do anything else. Just put the real number which is sqrt(2)/2.
My real question is how to calculate the proper volume factor when having a dB value. E.g. let's say I want to boost the bass track by +10dB, with which factor would I have to multiply the track? How is it calculated?

factor = x dB [...]

Remember, I'm a programmer and not a scientist/mathematics prof... :D

nautilus7
26th November 2007, 23:19
I am a physician who expertises on electronics/communications (not yet, i am still on bachelor studies). :D

Let me do some calculations and tell you.

nautilus7
27th November 2007, 00:24
I suppose that the bits in an audio track represent the amplitude of the "waveform", right?

Then, to find the amplitude of the output track (Xo) if you amplify it by +/- A dB, you have to do:

Xo = Xi*10^(A/20), where Xi is the amplitude of the input track.

If the bits represent power (energy) which i don't think so, then you have to replace the 20 with a 10:

Xo = Xi*10^(A/10)

In both cases -3dB doesn't result in sqrt(2)/2, because what i said before is a rounding (it's actually 3,01.. dB).

zipi
27th November 2007, 05:51
I Wanted to thank you SO much for you madflac Filter.

I have been waiting for years for a decent Flac Directshow Filter ,
That has both the features and the Accurate Decoding performance.

So many people think that just because a Format is 'LossLess",
They can play it through any decoder & get the Source sound played back.

I was so upset with not being able to get this kind of performance from all other directshow based decoders,
yours is the only one that both works great AND sounds BEST.



Flac is finally a real option for me,
after years of wondering what the hell is wrong with the people behind this format being happy with the seek error,
& unpure sound of CoreFlac as the only directshow decoder available,Or the Lame winamp plugin,
while trying to "Sell" us it sounds the same ...
Shame on them.

The FLAC developers owe you now,
as we do.

Thank you so much
Simply Brilliant.

madshi
27th November 2007, 09:12
I suppose that the bits in an audio track represent the amplitude of the "waveform", right?
I think so.

Then, to find the amplitude of the output track (Xo) if you amplify it by +/- A dB, you have to do:

Xo = Xi*10^(A/20), where Xi is the amplitude of the input track.

If the bits represent power (energy) which i don't think so, then you have to replace the 20 with a 10:

Xo = Xi*10^(A/10)

In both cases -3dB doesn't result in sqrt(2)/2, because what i said before is a rounding (it's actually 3,01.. dB).
Thanks, that helps! :)

madshi
27th November 2007, 09:12
I Wanted to thank you SO much for you madflac Filter.

I have been waiting for years for a decent Flac Directshow Filter ,
That has both the features and the Accurate Decoding performance.

So many people think that just because a Format is 'LossLess",
They can play it through any decoder & get the Source sound played back.

I was so upset with not being able to get this kind of performance from all other directshow based decoders,
yours is the only one that both works great AND sounds BEST.



Flac is finally a real option for me,
after years of wondering what the hell is wrong with the people behind this format being happy with the seek error,
& unpure sound of CoreFlac as the only directshow decoder available,Or the Lame winamp plugin,
while trying to "Sell" us it sounds the same ...
Shame on them.

The FLAC developers owe you now,
as we do.

Thank you so much
Simply Brilliant.
Thanks for the nice feedback... :)

Thunderbolt8
30th November 2007, 18:57
is there actually a way to make madflac or its core or whatever driver it uses compatible to winamp as plugin? im just thinking about the quality difference to coreflac, maybe its quality would also be better than the quality of the in_flac.dll

nautilus7
2nd December 2007, 16:59
@ madhsi

I have matrix revolutions HD DVD and an encode of this in mkv format (x264 video + flac audio made from trueHD track). When i use madflac to decode the flac i have sync problems (after 3/4 of the movie), but when i use ffdshow there's no problem.

I also muxed the original vc-1 stream of the HD DVD and the flac track into .mkv, but i was surprised seeing that the flac is in sync now, even if madflac is used.

I believe that there is a problem with the encoded video, but i 'm not sure. Can you confirm that there is not a problem with madflac? Do you need any samples?

madshi
2nd December 2007, 17:56
is there actually a way to make madflac or its core or whatever driver it uses compatible to winamp as plugin? im just thinking about the quality difference to coreflac, maybe its quality would also be better than the quality of the in_flac.dll
I've no idea how winamp works and not really an interest in it, either, cause I'm not using it.

madshi
2nd December 2007, 17:57
I have matrix revolutions HD DVD and an encode of this in mkv format (x264 video + flac audio made from trueHD track). When i use madflac to decode the flac i have sync problems (after 3/4 of the movie), but when i use ffdshow there's no problem.

I also muxed the original vc-1 stream of the HD DVD and the flac track into .mkv, but i was surprised seeing that the flac is in sync now, even if madflac is used.

I believe that there is a problem with the encoded video, but i 'm not sure. Can you confirm that there is not a problem with madflac? Do you need any samples?
It'd be very helpful if I could reproduce the problem somehow. The big question is how!! Is there a specific point in time where the sync suddenly is lost? Or is the sync gradually going off?

nautilus7
2nd December 2007, 20:22
Yes, there is a specific point where sync is lost. I will try to cut a sample and see if i can reproduce the problem with the sample. Then i 'll upload.

madshi
2nd December 2007, 21:53
Yes, there is a specific point where sync is lost. I will try to cut a sample and see if i can reproduce the problem with the sample. Then i 'll upload.
Yeah, that'd help a lot. E.g. 30 seconds in front and after that specific point or something like that...

nautilus7
3rd December 2007, 01:50
Here it is:http://www.sendspace.com/file/6hcikz

Sorry for the big size.

madshi
3rd December 2007, 07:48
Thanks, and no problem about file size. I don't have a problem with that at all. It might take a while (maybe until next Sunday) until I can check this problem out, though. Generally the day where I'm most likely to work on my HTPC software is Sunday.

madshi
3rd December 2007, 08:28
P.S: After a quick check it seems to me that I need +150ms delay throughout the whole sample. I didn't notice a break where suddenly a different delay was needed.

nautilus7
3rd December 2007, 10:02
Then i 'll check again the movie in previous points...

Thanks.

cbemoore
6th December 2007, 15:34
You're welcome. So does metadata support work the way you were hoping for? Strangely WMP 11 doesn't show the metadata for me. But MPC does.

I've *almost* got this working with WMP11.

The files refuse to show up under WMP11 unless I install WMP Tag Support Extender (http://wmptagext.sourceforge.net).

If I install WMPTSE, then the files are recognised and included in the WMP11 library, and the Artist, Album and Track tags are displayed correctly. But for some reason, the track length isn't shown.

Is this how its supposed to work? Or is there some way to show the track length?

madshi
6th December 2007, 15:51
Is this how its supposed to work? Or is there any way to show the track length?
I haven't any idea. Maybe you can ask the WMPTSE guys about how I could forward the track length to them? I just don't know how to do this technically...

nautilus7
7th December 2007, 22:51
P.S: After a quick check it seems to me that I need +150ms delay throughout the whole sample. I didn't notice a break where suddenly a different delay was needed.
Well, here i am again. Just to keep you busy on Sunday, as you told me. :p

I had a very close look at the suspicious parts again...

If the first sample i uploaded doesn't have a break point, but its all off as you say, then the problem begins a lot back. I think is where the 2 evos (of the original HD DVD - the problem is on the encode i have) join together, if that means anything.

So, here is how i would describe the de-sync: The first 57 minutes of the movie (1st evo) are ok, then i notice the audio being slightly off at that point (what it would be the start of the 2nd evo) and progressively it gets more and more off.

I have uploaded 2 more samples:

sample1 (http://rapidshare.com/files/74941343/The.Matrix.Revolutions.sample-001.mkv.html) is 20 secs before and somes secs after the joining of the evos. Here is where i first notice the problem.
sample2 (http://www.sendspace.com/file/6hcikz) is the one i uploaded a few days ago and is between (in time) the other two. Don't download this again! :D
sample3 (http://rapidshare.com/files/75006794/The.Matrix.Revolutions.sample-003.mkv.html) is at the end of the movie, just to see that the delay needed here is a lot higher than the previous samples.

Finally, i have to say that the evos of the original HD DVD have correct timestamps and the dts track (included in the sample) made by the trueHD track (the flac is made by the trueHD also) plays fine. The flac plays fine for me with ffdshow as well.

May the force be with you madshi!

madshi
9th December 2007, 14:33
Well, here i am again. Just to keep you busy on Sunday, as you told me. :p

I had a very close look at the suspicious parts again...

If the first sample i uploaded doesn't have a break point, but its all off as you say, then the problem begins a lot back. I think is where the 2 evos (of the original HD DVD - the problem is on the encode i have) join together, if that means anything.

So, here is how i would describe the de-sync: The first 57 minutes of the movie (1st evo) are ok, then i notice the audio being slightly off at that point (what it would be the start of the 2nd evo) and progressively it gets more and more off.

I have uploaded 2 more samples:

sample1 (http://rapidshare.com/files/74941343/The.Matrix.Revolutions.sample-001.mkv.html) is 20 secs before and somes secs after the joining of the evos. Here is where i first notice the problem.
sample2 (http://www.sendspace.com/file/6hcikz) is the one i uploaded a few days ago and is between (in time) the other two. Don't download this again! :D
sample3 (http://rapidshare.com/files/75006794/The.Matrix.Revolutions.sample-003.mkv.html) is at the end of the movie, just to see that the delay needed here is a lot higher than the previous samples.

Finally, i have to say that the evos of the original HD DVD have correct timestamps and the dts track (included in the sample) made by the trueHD track (the flac is made by the trueHD also) plays fine. The flac plays fine for me with ffdshow as well.

May the force be with you madshi!
I've now spent several hours on this. It seems to me that the MKV samples 2 and 3 really have incorrect audio sync. Both need about 150-200ms delay. I've no idea why ffdshow plays them with seemingly correct sync. And I was not able to find out what ffdshow does differently exactly. Checked the ffdshow source code out, but it's so different from mine that I can't really compare them. Here are some things I noticed:

(1) When I play sample 2 with ffdshow the video is not totally fluid. With madFlac it seems to be fluid. Don't know why.

(2) When I demux the FLAC track and then remux the video into a MKV file without any audio tracks and then play the video only MKV together with the external FLAC track, again a delay of 150-200ms is necessary.

Don't really know what else I could do. Basically I think the MKV file is buggy. But for whatever reason ffdshow shows no audio sync problems while madFlac does. No idea why. I think madFlac behaves correctly. Btw, I think the audio sync is not perfect with ffdshow in sample 3, either. It's better than with madFlac, but it also seems to be a little off to me.

Does anybody else have audio sync problems with madFlac?

nautilus7
9th December 2007, 15:06
I've now spent several hours on this. It seems to me that the MKV samples 2 and 3 really have incorrect audio sync. Both need about 150-200ms delay. I've no idea why ffdshow plays them with seemingly correct sync. And I was not able to find out what ffdshow does differently exactly. Checked the ffdshow source code out, but it's so different from mine that I can't really compare them. Here are some things I noticed:

(1) When I play sample 2 with ffdshow the video is not totally fluid. With madFlac it seems to be fluid. Don't know why.

(2) When I demux the FLAC track and then remux the video into a MKV file without any audio tracks and then play the video only MKV together with the external FLAC track, again a delay of 150-200ms is necessary.

Don't really know what else I could do. Basically I think the MKV file is buggy. But for whatever reason ffdshow shows no audio sync problems while madFlac does. No idea why. I think madFlac behaves correctly. Btw, I think the audio sync is not perfect with ffdshow in sample 3, either. It's better than with madFlac, but it also seems to be a little off to me.

Does anybody else have audio sync problems with madFlac?
Thanks a lot for your time.

shambles
9th December 2007, 16:39
no sync problems apart from when seeking.

using mpc, wmr9 and coreflac seem to keep sync when seeking. madflac and ffdshow sometimes do, often don't. when using haali renderer it gets much worse.. with it even coreflac doesn't keep sync.

madshi
9th December 2007, 17:47
no sync problems apart from when seeking.

using mpc, wmr9 and coreflac seem to keep sync when seeking. madflac and ffdshow sometimes do, often don't. when using haali renderer it gets much worse.. with it even coreflac doesn't keep sync.
Hmmmm... Will see if I can improve that...

andersa
18th December 2007, 06:02
madshi,

thanks for all your work on madflac!

I have a file that is 16-bit, 192kHz, 2ch, and I can't get madflac to play it. Have you or anyone else used 192kHz files successfully?
According to the flac spec up to 655350 Hz is supported.

Jriver's mediacenter 12 plays the file OK, although shows file duration as 0:00. The flac file was created by ffmpeg from a wav file.

andersa
21st December 2007, 02:47
madshi,

thanks for all your work on madflac!

I have a file that is 16-bit, 192kHz, 2ch, and I can't get madflac to play it. Have you or anyone else used 192kHz files successfully?
According to the flac spec up to 655350 Hz is supported.

Jriver's mediacenter 12 plays the file OK, although shows file duration as 0:00. The flac file was created by ffmpeg from a wav file.

I guess not :)

Care to check a small sample?
File plays in vlc, jriver's media center (but track length is displayed as 0:00) and tests OK in FLAC tester, but does not in WMP11, MPC or graphedit with the madflac source filter. graphedit can't render the output pin from the madflac source filter. Other flacs, including a 5.1 @ 96kHz works fine in all the above mentioned players.

Let me know and I can e-mail a 1 meg (or short if you prefer) sample.


/Anders

tebasuna51
21st December 2007, 03:17
Let me know and I can e-mail a 1 meg (or short if you prefer) sample.

Use any free download site ( http://www.mytempdir.com/ or other) and everybody can test the problem.

andersa
21st December 2007, 03:39
Use any free download site ( http://www.mytempdir.com/ or other) and everybody can test the problem.

Good point.

mytempdir wouldn't co-operate, but please try this link:

http://www.sendspace.com/file/afj64o

/Anders

madshi
21st December 2007, 10:14
Hmmmmm... madFlac seems to play the file just fine. However, it outputs this:

Media Type 0:
--------------------------
Audio: WAVE_FORMAT_EXTENSIBLE 192000Hz stereo 6144Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 2
nSamplesPerSec: 192000
nAvgBytesPerSec: 768000
nBlockAlign: 4
wBitsPerSample: 16
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 16
dwChannelMask: 0x00000003
SubFormat: {00000001-0000-0010-8000-00AA00389B71}
And it seems that nobody likes this format. Don't know why. Looks alright to me. Does DirectShow/DirectSound support 192khz in the first place? Maybe it needs to be downconverted to 96khz to be playable? I don't really know...

andersa
22nd December 2007, 17:04
Thanks for taking a look at it.

I think you are correct - DirectSound may not be capable of 192kHz. When rendering a wav equivalent of the file through graphedit, the ACM wrapper filter is added which output 16/44 to the DirectSound renderer...

madshi
22nd December 2007, 17:51
Ok, so I'd need to add resampling to 96khz. That might take a while.....

Fraeon Lux
27th December 2007, 14:16
Ok, so I'd need to add resampling to 96khz. That might take a while.....


Madshi, I registered just to post a thank you post for all your efforts. Thanks very much for creating MadFlac. Keep up the great work! :thanks:

arty
1st January 2008, 17:12
finally I can listen to my .flac files properly in zoomplayer

thank you so much!!!

(after I saw how you were improving eac3to I knew this is the best that happened to FLAC related development since the authors created the specs ...)

madshi
1st January 2008, 17:14
Thanks Fraeon Lux and arty. It's always nice to get positive feedback... :)

Snowknight26
1st January 2008, 17:53
I just noticed that some flac tracks are unseekable while most are. I'm not sure if its the madFLAC Source filter's fault or not because I don't have any other source flac filters, so I've decided to include 2 samples.

Seekable: http://www.stfcc.org/misc/seekable.flac
Unseekable: http://www.stfcc.org/misc/unseekable.flac

Maybe its just a WMP problem. :\

Edit: Thats wierd, the samples don't seem to be seek properly in the first place thanks to me cutting them up.

madshi
1st January 2008, 18:15
Depending on how the FLAC file was encoded it is possible that seeking doesn't work. My recommendation for you: Try running the non-seekable sample through eac3to ("eac3to source.flac dest.flac"). That should fix the seeking.

Snowknight26
1st January 2008, 19:36
I made those two using eac3to.

madshi
1st January 2008, 19:54
Which version of eac3to? Very old eac3to versions produced non-seekable FLAC files.

Snowknight26
1st January 2008, 19:57
v2.13

Edit: I even ran the unseekable file through eac3to again just to make sure yet it still had the problem.

madshi
1st January 2008, 20:27
Ok, in order to fix the problem I'd need to be able to reproduce the problem on my own PC. Any idea how to do that? The file is probably too big to upload it, right?

Snowknight26
1st January 2008, 20:36
If you had an HD DVD drive you probably could. Its the Matrix's TrueHD track converted to FLAC. Tried reripping, same problem. I could possibly upload both tracks but you'd have to wait a day or so.

madshi
1st January 2008, 22:03
I don't need the track that works. Only the one that doesn't work is interesting for me. I have the German Matrix HD DVD discs, only, not the USA ones.

madshi
3rd January 2008, 12:40
If you had an HD DVD drive you probably could. Its the Matrix's TrueHD track converted to FLAC. Tried reripping, same problem. I could possibly upload both tracks but you'd have to wait a day or so.
Are you sure that you're really using madFlac? Got your track and seeking works just fine for me!

clsid
3rd January 2008, 14:53
This is likely a WMP problem!

WMP + files in media library = seeking doesn't work

Also happens with other file types and filters.

Snowknight26
3rd January 2008, 18:55
Could be a WMP problem, though its not in my library. Neither of the two were. And yes, it was using madFlac.

Oh well, its not really a problem as I usually mux these tracks to mkv. Curiosity just got the best of me. ;)

madshi
3rd January 2008, 20:35
Well, all I can say is that your FLAC file seeks perfectly fine on my PC with madFlac. Maybe you can retry with MPC or ZoomPlayer or any other media player? Maybe also on another PC - just to be safe?

rickardk
5th January 2008, 04:39
madflac does not decode all 8 channels from a flac created by eac3to. It just decodes 6 (drops SL and SR). But madflac does output 8 channels (ffdshow confirms 8 channel uncompressed input).

The same file is fully decoded with all 8 channels using ffdshow (libav)...

During testing on this problem I also found that ffdshow gives much stronger signals when decoding. Is that expected?

madshi
5th January 2008, 08:38
madflac does not decode all 8 channels from a flac created by eac3to. It just decodes 6 (drops SL and SR). But madflac does output 8 channels (ffdshow confirms 8 channel uncompressed input).
Are you sure about that? Sounds strange to me. Will check it.

During testing on this problem I also found that ffdshow gives much stronger signals when decoding. Is that expected?
Hmmmm... Another strange thing. Will check that, too.

rickardk
5th January 2008, 10:27
The first one I'm 100% sure of. madFlac outputs (connects) with 8 channels. But outputs just 6 of them. Not remuxed any title with 7 or 8 channels before this one. I know I have a couple of DTS-HD MA tracks that contains 8 channels. But as we can't decode them (all 8 channels) yet I can't test more titles.

Don't know if the stronger signal thing is due to ffdshow rev.
I will download latest rev and test.


Correction: I just saw I had 4 titles with 8 channel LPCM. I will test one of them ...

rickardk
5th January 2008, 19:06
Tested with more titles....madflac does just decode 6 of 8 channels.

Jedd
6th January 2008, 01:34
Are there any setting to this filter?
I have no problems playing stereo flacs in MPC

Audio: FLAC 48000Hz stereo 2304Kbps
WAVEFORMATEX:
wFormatTag: 0xf1ac
nChannels: 2
nSamplesPerSec: 48000
nAvgBytesPerSec: 288000
nBlockAlign: 6
wBitsPerSample: 24
cbSize: 86 (extra bytes

But 5.1 doesn't work - I see only 2 channels in the output (DirectSound input)
Audio: FLAC 48000Hz 6ch 6912Kbps

WAVEFORMATEX:
wFormatTag: 0xf1ac
nChannels: 6
nSamplesPerSec: 48000
nAvgBytesPerSec: 864000
nBlockAlign: 18
wBitsPerSample: 24
cbSize: 86 (extra bytes)

Filter: Default DirectSound Device

- Connected to:
Filter: madFlac Decoder
Pin: pcm

- Connection media type:

Audio: WAVE_FORMAT_EXTENSIBLE 48000Hz stereo 2304Kbps


WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 2
nSamplesPerSec: 48000
nAvgBytesPerSec: 288000
nBlockAlign: 6
wBitsPerSample: 24
cbSize: 22 (extra bytes)

Snowknight26
16th January 2008, 06:07
I can confirm that madFlac Source shows the file as 7.1 but when connected to ffdshow outputs 5.1.

madshi
19th January 2008, 22:24
Finally got around testing madFlac with an 8 channel test file. I even downloaded the very same madFlac.rar file linked in the first post of this thread - and I'm getting all 8 channels out just fine. Don't know what you guys are doing. Have you accidently activated the "limit to 5.1" option? Please make sure that this option is turned off on the madFlac properties page. If you've done that and you still don't get 7.1 output, please fire up graphedit, drop the FLAC file in there and connect it to the Dump filter. Then run the RAW file through eac3to to create a WAV file. Then check the resulting WAV file in Audacity. I'm getting full 7.1 channels this way.

rickardk
20th January 2008, 01:07
Finally got around testing madFlac with an 8 channel test file. I even downloaded the very same madFlac.rar file linked in the first post of this thread - and I'm getting all 8 channels out just fine. Don't know what you guys are doing. Have you accidently activated the "limit to 5.1" option? Please make sure that this option is turned off on the madFlac properties page. If you've done that and you still don't get 7.1 output, please fire up graphedit, drop the FLAC file in there and connect it to the Dump filter. Then run the RAW file through eac3to to create a WAV file. Then check the resulting WAV file in Audacity. I'm getting full 7.1 channels this way.


Yes 8 channels. But just 6 contains data. "limit to 5.1" turned off. When "limit to 5.1" is turned on madFlac just outputs 6 channels. With "limit to 5.1" turned of it outputs 8 channels but just 6 of them contains data. If the same file is decoded with ffdshow all 8 channels are decoded.

A easy way to test if you get signal from sideL and sideR is to use the mixer in ffdshow. Make sure that ffdshow is enabled for uncompressed audio (codec setting uncompressed). ffdshow then connects after madFlac and you can create a custom matrix in the mixer to map sideL and sideR to any channel.


When doing the graphedit method you descibed I do get all 8 channels decoded (I can see waveform in audacity). Hmm....but when using madFlac (without ffdshow in the graph) with Vista Media Center or Media Player I just get 6 channels decoded. When I place ffdshow in the graph I also just get 6 channels (but ffdshow reports that the input is 8 channels uncompressed)

madshi
20th January 2008, 10:04
Yes 8 channels. But just 6 contains data. "limit to 5.1" turned off. When "limit to 5.1" is turned on madFlac just outputs 6 channels. With "limit to 5.1" turned of it outputs 8 channels but just 6 of them contains data. If the same file is decoded with ffdshow all 8 channels are decoded.

A easy way to test if you get signal from sideL and sideR is to use the mixer in ffdshow. Make sure that ffdshow is enabled for uncompressed audio (codec setting uncompressed). ffdshow then connects after madFlac and you can create a custom matrix in the mixer to map sideL and sideR to any channel.


When doing the graphedit method you descibed I do get all 8 channels decoded (I can see waveform in audacity). Hmm....but when using madFlac (without ffdshow in the graph) with Vista Media Center or Media Player I just get 6 channels decoded. When I place ffdshow in the graph I also just get 6 channels (but ffdshow reports that the input is 8 channels uncompressed)
I've no idea what madFlac could be doing wrong. Everything looks correct to me. Can you please try extracting the FLAC track to a standalone file and then play that? Does it show the same problems? Also please compare the connection information (e.g. in MPC) between ffdshow and madFlac to check if you find any differences.

madFlac is outputting WAVE_FORMAT_EXTENSIBLE. Maybe ffdshow is outputting WAVE_FORMAT_PCM instead? That might explain the differences. However, WAVE_FORMAT_EXTENSIBLE is what Microsoft recommends to be used!

rickardk
20th January 2008, 22:32
How can I playback a raw .flac?

nautilus7
20th January 2008, 22:35
Just open it with the media player you use.

rickardk
20th January 2008, 22:36
Just open it with the media player you use.


Does not work. Maybe it does not support 8 channel flacs?

nautilus7
20th January 2008, 22:38
What? The media player? Which is that btw?

rickardk
20th January 2008, 22:40
What? The media player? Which is that btw?

WMP11. We are trying to figure out why madFlac does not output all 8 channel from 8 channel flacs in mkv.
Just converted the audio stream from 3:10 to yuma and should try to play it back without putting it in a mkv

nautilus7
20th January 2008, 22:44
By "what" i meant "it" in you sentence: Maybe it does not....
What does not support 8 ch flac?

Do you really use wmp11 for your videos? Get mpc and test it.

rickardk
20th January 2008, 22:52
By "what" i meant "it" in you sentence: Maybe it does not....
What does not support 8 ch flac?

Do you really use wmp11 for your videos? Get mpc and test it.

As I use Vista Media Center becuase it integrates with my home control (mControl, Z-Wave and X10). Also VMC handles my power amp, receiver and so on.

Just downloaded mpc (are we talking about the same app? media player classic 6.4.9.1). Will give it a try.

Thanks for all your support btw.

nautilus7
20th January 2008, 22:56
Yes, the updated one: http://sourceforge.net/project/showfiles.php?group_id=205650

You 're welcome.

rickardk
20th January 2008, 23:02
Yes, the updated one: http://sourceforge.net/project/showfiles.php?group_id=205650

You 're welcome.

Yes that's the one. But it will not play my 8ch flac...

nautilus7
20th January 2008, 23:08
Well, can't help you further, but... you can send me a sample to test my self (i don't have any 8ch tracks).

rickardk
20th January 2008, 23:11
Well, can't help you further, but... you can send me a sample to test my self (i don't have any 8ch tracks).

That would be very helpful. Remuxing a title as we speak. Taking longer then usual with new eac3to version.
Will upload a sample to my server when finished. Thanks alot!

rickardk
21st January 2008, 00:06
Ok so now I played back the 8ch flac without putting it in a container. When using WMP11 or MPC I just got 6 channels. BUT when using the mixer matrix enabled in MPC I got all 8 decoded and connected to my soundcard. That should indicate that it is the connection between madFlac and the audio renderer that's not working?

btw 8ch sample can be found here (uploading right now):
www.earselect.se/sample.flac

madshi
21st January 2008, 08:11
Can you please post the connection information between madFlac and the Audio renderer. And the same information between mixer matrix and Audio renderer? You can do so by right clicking on the (empty) video in MPC, then choose "Filters -> Audio Renderer" (or however the Audio Renderer ist called in your case). Then click on the "Pin Info" tab and post the text between:

(1) - Connection media type:

and:

(2) - Enumerated media type 0:

rickardk
21st January 2008, 08:38
This is with madFlac:
----------------------------------------------------------
CLSID: {79376820-07D0-11CF-A24D-0020AFD79767}
Filter: Default DirectSound Device

- Connected to:

CLSID: {18C16B08-6497-420E-AD14-22D21C2CEAB7}
Filter: Audio Switcher
Pin: Out

- Connection media type:

Audio: WAVE_FORMAT_EXTENSIBLE 48000Hz 8ch 6144Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 8
nSamplesPerSec: 48000
nAvgBytesPerSec: 768000
nBlockAlign: 16
wBitsPerSample: 16
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 16
dwChannelMask: 0x000000ff
SubFormat: {00000001-0000-0010-8000-00AA00389B71}

pbFormat:
0000: fe ff 08 00 80 bb 00 00 00 b8 0b 00 10 00 10 00 þÿ..€»...¸......
0010: 16 00 10 00 ff 00 00 00 01 00 00 00 00 00 10 00 ....ÿ...........
0020: 80 00 00 aa 00 38 9b 71 €..ª.8›q

- Enumerated media type 0:

Audio

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000}
formattype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 0




This is with ffdshow:
----------------------------------------------------------
CLSID: {79376820-07D0-11CF-A24D-0020AFD79767}
Filter: Default DirectSound Device

- Connected to:

CLSID: {18C16B08-6497-420E-AD14-22D21C2CEAB7}
Filter: Audio Switcher
Pin: Out

- Connection media type:

Audio: WAVE_FORMAT_EXTENSIBLE 48000Hz 8ch 6144Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 8
nSamplesPerSec: 48000
nAvgBytesPerSec: 768000
nBlockAlign: 16
wBitsPerSample: 16
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 16
dwChannelMask: 0x0000063f
SubFormat: {00000001-0000-0010-8000-00AA00389B71}

pbFormat:
0000: fe ff 08 00 80 bb 00 00 00 b8 0b 00 10 00 10 00 þÿ..€»...¸......
0010: 16 00 10 00 3f 06 00 00 01 00 00 00 00 00 10 00 ....?...........
0020: 80 00 00 aa 00 38 9b 71 €..ª.8›q

- Enumerated media type 0:

Audio

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000}
formattype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 0





Under advanced the buffers goes to 80% with madFlac and 100% with ffdshow.

With madFlac

rickardk
21st January 2008, 08:42
madflac
----------------------------------------------------------
CLSID: {18C16B08-6497-420E-AD14-22D21C2CEAB7}
Filter: Audio Switcher

- Connected to:

CLSID: {6B257121-CBB6-46B3-ABFA-B14DFA98C4A6}
Filter: madFlac Decoder
Pin: pcm

- Connection media type:

Audio: WAVE_FORMAT_EXTENSIBLE 48000Hz 8ch 6144Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 8
nSamplesPerSec: 48000
nAvgBytesPerSec: 768000
nBlockAlign: 16
wBitsPerSample: 16
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 16
dwChannelMask: 0x000000ff
SubFormat: {00000001-0000-0010-8000-00AA00389B71}

pbFormat:
0000: fe ff 08 00 80 bb 00 00 00 b8 0b 00 10 00 10 00 þÿ..€»...¸......
0010: 16 00 10 00 ff 00 00 00 01 00 00 00 00 00 10 00 ....ÿ...........
0020: 80 00 00 aa 00 38 9b 71 €..ª.8›q








ffdshow
----------------------------------------------------------
CLSID: {18C16B08-6497-420E-AD14-22D21C2CEAB7}
Filter: Audio Switcher

- Connected to:

CLSID: {0F40E1E5-4F79-4988-B1A9-CC98794E6B55}
Filter: ffdshow Audio Decoder
Pin: Out

- Connection media type:

Audio: WAVE_FORMAT_EXTENSIBLE 48000Hz 8ch 6144Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 8
nSamplesPerSec: 48000
nAvgBytesPerSec: 768000
nBlockAlign: 16
wBitsPerSample: 16
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 16
dwChannelMask: 0x0000063f
SubFormat: {00000001-0000-0010-8000-00AA00389B71}

pbFormat:
0000: fe ff 08 00 80 bb 00 00 00 b8 0b 00 10 00 10 00 þÿ..€»...¸......
0010: 16 00 10 00 3f 06 00 00 01 00 00 00 00 00 10 00 ....?...........
0020: 80 00 00 aa 00 38 9b 71 €..ª.8›q

madshi
21st January 2008, 09:05
Thank you. It seems that the channel mask value used by madFlac for 8 channels is incorrect.

madshi
21st January 2008, 09:06
madFlac v1.6 released

http://madshi.net/madFlac.rar

fixed channel assignment for 8 channels

nautilus7
21st January 2008, 11:51
I just installed v1.6. What it this 1,2,3,4,5,6 thing that pop ups when i open the properties tab?

rickardk
21st January 2008, 12:07
THANK YOU!
All 8 channels working!!!

madshi
21st January 2008, 12:08
I just installed v1.6. What it this 1,2,3,4,5,6 thing that pop ups when i open the properties tab?
That is me being stupid... :o

nautilus7
21st January 2008, 12:52
That is me being stupid... :oWe forgive you. :p

madshi
21st January 2008, 14:03
madFlac v1.7 released

http://madshi.net/madFlac.rar

debug messages "1"-"6" removed.

nautilus7
21st January 2008, 14:05
Thanks!

Mercury_22
28th January 2008, 16:45
Any chance for a x64 version ? :)

Please ! (for Vista's x64 WMC) :thanks:

madshi
28th January 2008, 19:47
Nope, that's not possible because madFlac was written in Delphi and Delphi doesn't support native 64bit compiling yet.

Mercury_22
30th January 2008, 10:10
So , We have to wait for Delphi to "support native 64bit compiling" ? Or not even then ? :script: :confused:

madshi
30th January 2008, 11:16
So , We have to wait for Delphi to "support native 64bit compiling" ? Or not even then ? :script: :confused:
When Delphi supports native 64bit compiling, there's still the problem that the DirectShow base classes I'm using would have to be updated to 64bit, too, before I can even start thinking about a 64bit madFlac. So there's no hope to get madFlac 64bit anytime soon.

clsid
30th January 2008, 11:44
The DS baseclasses from Windows SDK 6 can be compiled to a 64-bit lib.

madshi
30th January 2008, 11:52
The DS baseclasses from Windows SDK 6 can be compiled to a 64-bit lib.
But I cannot use MS "lib" files in Delphi, unfortunately.

Thunderbolt8
10th February 2008, 18:51
have a problem with the queen montreal blu-ray when I convert both tracks (dtshd and pcm) to flac and put them together in 1 mkv with the video. when I select the 2nd flac track then (the pcm track in this case) theres lots of strange noise and the video gets speed up to 30-60 fps. the track itself is fine though, plays fine in winamp, and also when I mux it alone with the video together, without the other flac track.
this problem doesnt occur when I use ffdshow audio to decode, then both audio tracks inside that .mkv play back fine.

I also had this problem back earlier when I for converted eac3 tracks to flac and then had a movie with an additional eac3 commentary track (eternal sunshine on the spotless mind hd dvd), then I had the same problem when I switched to that commentary track. afaik back then I used coreflac and not madflac, but I guess the problem just occurs with both decoders as soon as there is more than 1 flac track inside the .mkv. so to reproduce this it should actually work by taking a movie and converting 2 tracks to flac and mux both together with the video to .mkv.

heres a sample of my 2 flac mkv remux: http://www.sendspace.com/file/6ofko8

Thunderbolt8
15th February 2008, 21:35
any news on that problem?

Thunderbolt8
17th February 2008, 18:09
I remuxed the life of brian blu-ray now with 2 dubbing flac tracks, in this case it works fine with madflac for both tracks. but still, in case of the queen blu-ray it doesnt, there it works only with ffdshow audio for the 2nd track.

madshi
17th February 2008, 19:21
The problem probably occurs if the two FLAC tracks have different properties (e.g. different number of channels, different sampling rate etc).

Thunderbolt8
17th February 2008, 22:06
so its only a minor bug?

frenchglen
20th February 2008, 04:15
hey madshi - can madflac play dts-encoded flac (i.e. dts-wav which has been flac'ed)? There's no tool that I know of that can do this yet.

It would obviously need to decode the flac then detect that it's not ordinary WAV and therefore decode the DTS, rather than giving out noise.

madshi
20th February 2008, 09:10
so its only a minor bug?
How do you define "minor"? In programming time? Or by how much it bothers you?

hey madshi - can madflac play dts-encoded flac (i.e. dts-wav which has been flac'ed)? There's no tool that I know of that can do this yet.

It would obviously need to decode the flac then detect that it's not ordinary WAV and therefore decode the DTS, rather than giving out noise.
I've never even heard that you would use FLAC to encode DTS-WAV. Why would anyone do that?

frenchglen
20th February 2008, 11:27
I've never even heard that you would use FLAC to encode DTS-WAV. Why would anyone do that?
The only reason (but it's a pretty good reason) is that FLAC has the ability to add meta data (artist info), hence it is the best lossless format for your personal ripped media library. (we had this conversation before, and I now definitely like FLAC as a format in the end).

I think it also saves a little space, a small percentage.

Thunderbolt8
20th February 2008, 12:03
How do you define "minor"? In programming time? Or by how much it bothers you?
programming time. but it bothers me really much :P

madshi
20th February 2008, 12:23
The only reason (but it's a pretty good reason) is that FLAC has the ability to add meta data (artist info), hence it is the best lossless format for your personal ripped media library. (we had this conversation before, and I now definitely like FLAC as a format in the end).
Can you upload a little sample?

programming time. but it bothers me really much :P
I'll see what I can do. Not sure how much programming time it will cost.

woeds
24th February 2008, 16:17
Hi,

First of all, thank you for all the time you've spent on this great filter so far. Although it works fine for playing back the FLAC files, I still have a little problem in combination with WMP11.
When I associate .flac with WMP, and click on a FLAC file, the file plays fine and the seeking bar works. When I select FLAC file from the WMP library seeking doesn't work.

Is this a madflac or WMP problem?

Thunderbolt8
4th March 2008, 00:59
I'll see what I can do. Not sure how much programming time it will cost.
did you have already time tp look into that? I would really like to see more than 1 flac track with different specs working for HD concerts as especially with older ones the 2.0 track is still the one which offers the best sound quality.

thanks!

madshi
10th March 2008, 20:13
Sorry guys,

was planning to release a new madFlac version yesterday, but didn't manage to. Hopefully next week...

buzzqw
10th March 2008, 21:20
whould be possible to have madflac as filter for avisynth ?
like nicaudio ?

BHH

Thunderbolt8
10th March 2008, 22:44
thanks!

benfp
11th March 2008, 17:56
Hi,

First of all, thank you for all the time you've spent on this great filter so far. Although it works fine for playing back the FLAC files, I still have a little problem in combination with WMP11.
When I associate .flac with WMP, and click on a FLAC file, the file plays fine and the seeking bar works. When I select FLAC file from the WMP library seeking doesn't work.

Is this a madflac or WMP problem?

Would there be any news about that problem? I believe this problem origin comes from the wmp database which is unable to correctly register FLAC files length (it will register 0:00 instead) while it still can read it. I don't really get why it should be able to READ it while it couldn't SAVE it in a DB, still the issue must have some pretty simple explanation.
If you can't correct it, could you at least explain it?

Also, I'm using WMP for its powerful metadata searcher, which could still be enhanced. So, do you know a good starting place (beside MSDN) to start coding WMP plugins or whatever? I'd like to add the possibility of creating your own views, creating more customized researchs, exporting/importing database information, etc.

Best regards and keep up the really GREAT work.

Ben

madshi
11th March 2008, 19:29
I've no idea about the WMP problem and I also have no idea how to create WMP plugins, sorry.

About Avisynth: Don't know how to create Avisynth plugins, either...

frenchglen
1st April 2008, 23:48
Madshi, you must have added DTS-encoded FLAC support, or something weird's happening, because I can play it back using madflac in media player classic. which is GREAT. Or perhaps I'm using a combination of filters...quite honestly, I don't really know what I'm doing! But it's working...

cbemoore
2nd April 2008, 02:26
I think I've tracked down the source of the 0:00 track length problem in WMP11.

For some reason, WMP reports the FLAC bitrate as 0 kbps. I guess WMP11 calculates the track length by dividing the file size by the bitrate, leading to a 0 (or infinite!) track length.

The reason other programs display the track length correctly is probably because they use the track length reported by the filter, instead of calculating it on the fly.

Looking at the MadFlac filter properties in GraphEdit, the filter reports the track length correctly, but it doesn't report the bitrate. Could this be the problem?

Chris

Snowknight26
2nd April 2008, 04:32
In that case, how could some FLAC tracks be seekable whilst others can't?

madshi
2nd April 2008, 06:58
I think I've tracked down the source of the 0:00 track length problem in WMP11.

For some reason, WMP reports the FLAC bitrate as 0 kbps. I guess WMP11 calculates the track length by dividing the file size by the bitrate, leading to a 0 (or infinite!) track length.

The reason other programs display the track length correctly is probably because they use the track length reported by the filter, instead of calculating it on the fly.

Looking at the MadFlac filter properties in GraphEdit, the filter reports the track length correctly, but it doesn't report the bitrate. Could this be the problem?
Good catch! The problem with the bitrate is that with FLAC it's variable. But madFlac should be able to calculate an average bitrate and report that.

madshi
2nd April 2008, 06:58
Madshi, you must have added DTS-encoded FLAC support, or something weird's happening, because I can play it back using madflac in media player classic. which is GREAT. Or perhaps I'm using a combination of filters...quite honestly, I don't really know what I'm doing! But it's working...
Don't know why it works for you but I haven't done anything about DTS/FLAC.

cbemoore
2nd April 2008, 09:20
Good catch! The problem with the bitrate is that with FLAC it's variable. But madFlac should be able to calculate an average bitrate and report that.

Yes, the bitrate is variable between tracks. But each track should report an average bitrate calculated as size/duration.

frenchglen
2nd April 2008, 22:41
Don't know why it works for you but I haven't done anything about DTS/FLAC.
Well, obviously two filters are working at the same time, and media player classic somehow coordinates them automatically, so madflac decodes flac into wav, then whatever I have detecting dts does that and decodes the dts. Very happy, you don't have to do a thing! It also works in WMP which is amazing. Madflac must do something in the background to completely make the player think it's actually a wav file.


The other thing I wanted to ask, was that some tracks that I extract with DVD-Audio Explorer, decode and then re-encode into flac with a number of methods (DVD-Audio Explorer invoking flac.exe, or eac3to converting mlp to flac, or decoding mlp to wav then encoding into flac with dBpoweramp)...do not seem to work properly with madflac, but they do in the latest foobar which uses the latest libflac.

In MPC:

- 2.0ch 24-bit 192kHz track (tried Alan Parson's HDADs, Chicago V) - appears to play through track but silently!
- 4.0ch 24-bit 96kHz track (e.g. Janis Joplin - Pearl bootleg) - crashes MPC upon open.
- 4.1ch 24-bit 96kHz track (e.g. DSOTM bootleg) - crashes MPC upon open.
- 5.0ch 24-bit 96kHz track (e.g. Frank Zappa - Quaudiophiliac) - crashes MPC upon open.

Tracks of all other common resolution combinations I've tried work fine.
To make sure it's nothing at all to do with DVDAExplorer, I made my own 192kHz 24-bit stereo files, as well as 4.0-5.0, and the flac encoded from those had exactly the same results.

clsid
2nd April 2008, 23:52
If you reencode DTS to FLAC then it becomes FLAC and it has nothing to do with DTS anymore. If you decode FLAC you'll get uncompressed PCM audio.

frenchglen
2nd April 2008, 23:58
If you reencode DTS to FLAC then it becomes FLAC and it has nothing to do with DTS anymore. If you decode FLAC you'll get uncompressed PCM audio.
Actually, these are DTS-WAV files which I have then FLAC'd. they're already compressed with DTS, but I like FLAC because of tagging ability.
These files give noise in foobar, so they're definitely DTS-encoded files, encoded "again" in flac.

madshi
3rd April 2008, 09:59
The other thing I wanted to ask, was that some tracks that I extract with DVD-Audio Explorer, decode and then re-encode into flac with a number of methods (DVD-Audio Explorer invoking flac.exe, or eac3to converting mlp to flac, or decoding mlp to wav then encoding into flac with dBpoweramp)...do not seem to work properly with madflac, but they do in the latest foobar which uses the latest libflac.

In MPC:

- 2.0ch 24-bit 192kHz track (tried Alan Parson's HDADs, Chicago V) - appears to play through track but silently!
- 4.0ch 24-bit 96kHz track (e.g. Janis Joplin - Pearl bootleg) - crashes MPC upon open.
- 4.1ch 24-bit 96kHz track (e.g. DSOTM bootleg) - crashes MPC upon open.
- 5.0ch 24-bit 96kHz track (e.g. Frank Zappa - Quaudiophiliac) - crashes MPC upon open.

Tracks of all other common resolution combinations I've tried work fine.
To make sure it's nothing at all to do with DVDAExplorer, I made my own 192kHz 24-bit stereo file, and the flac encoded from that had exactly the same result. (not sure how to make a 4.0 or 5.0 file, would like to know, but I'm sure it would yield same results)
A sample or two would help.

Inventive Software
3rd April 2008, 11:29
I think DTS-WAV is a DTS file with a WAV header on it, same as DD WAV. Can't confirm though.

clsid
3rd April 2008, 12:39
From what I found with google, that seems about right. Compatible decoders will automatically recognize that its actually DTS instead of plain WAV. Incompatible decoders will decode it as regular WAV audio and that results in static.

tebasuna51
3rd April 2008, 15:23
I think DTS-WAV is a DTS file with a WAV header on it, same as DD WAV. Can't confirm though.

Yes, you can see some info in this post (http://forum.doom9.org/showthread.php?p=1107970#post1107970) and related

Thunderbolt8
3rd April 2008, 17:45
any news about that 2 flac tracks with different specs in 1 mkv file thing?

LIGHTNING UK!
9th April 2008, 16:06
madshi,

I've been playing around with your filter today figuring out why it didn't work with ImgBurn and I found that it's because I use WAVE_FORMAT_PCM for the wFormatTag and not WAVE_FORMAT_EXTENSIBLE. I guess that's just something missing from your implementation?

The second thing I noticed is that if I rip a cd track to a wav, encode with flac.exe and then decode it with flac.exe again, the files are identical. The same cannot be said if I use your filter to do the decoding. (I'm ignoring the wave header, don't worry!)

The bulk of the file matches perfectly but the 'silence' at the start/end isn't always faithfully reproduced - it falls a little short. The problem for me is that this then causes problems for 'INDEX 0' markers within a CUE file.

Is there any chance you could look into it?

I've attached a picture of showing the comparison (in hex workshop) between the source and encoded/decoded files.

The 2nd line in the comparison shows 1 byte difference in the files. It was a random 0x02 in the madFlac decoded file amongst a load of digital silence.

The real issue here is the missing 0x4001 bytes of digital silence shown in line 4.

madshi
9th April 2008, 16:18
any news about that 2 flac tracks with different specs in 1 mkv file thing?
Not yet.

I've been playing around with your filter today figuring out why it didn't work with ImgBurn and I found that it's because I use WAVE_FORMAT_PCM for the wFormatTag and not WAVE_FORMAT_EXTENSIBLE. I guess that's just something missing from your implementation?
Originally I used WAVE_FORMAT_PCM. But then I noticed that playing 8 channels didn't work that way. So I looked up Microsoft's documentation and they recommend to use WAVE_FORMAT_EXTENSIBLE. So I switched to that and suddenly 8 channel FLACs played fine. I guess I could probably export both WAVE_FORMAT_PCM and WAVE_FORMAT_EXTENSIBLE. Of course you could also allow both formats. Maybe we should both support both types? :)

The second thing I noticed is that if I rip a cd track to a wav, encode with flac.exe and then decode it with flac.exe again, the files are identical. The same cannot be said if I use your filter to do the decoding. (I'm ignoring the wave header, don't worry!)

The bulk of the file matches perfectly but the 'silence' at the start/end isn't always faithfully reproduced - it falls a little short. The problem for me is that this then causes problems for 'INDEX 0' markers within a CUE file.

Is there any chance you could look into it?
Sure. Does the problem occur with every FLAC file? If it only occurs with some specific files, could you make a sample available for me? If the problem occurs with every FLAC file, a sample is not needed.

I won't have time to check this out until Sunday, though.

LIGHTNING UK!
9th April 2008, 17:25
Maybe we should both support both types?

That's exactly what I've done :)

If connecting the source to the samplegrabber fails when I've set the media type using WAVE_FORMAT_PCM, I then try again having set it to WAVE_FORMAT_EXTENSIBLE.

I haven't yet decided if I should try WAVE_FORMAT_EXTENSIBLE first and then fall back to WAVE_FORMAT_PCM... hmm decisions decisions!

Sure. Does the problem occur with every FLAC file?

I've done some more tests and encoded / decoded all the tracks from a CD. The ones decoded using flac.exe came out exactly the same as the original wavs. Unfortunately not one of the madFlac decoded ones did :(

The all sound fine, they're just not bit for bit perfect copies of the original wav files. For most of them it's just a case of missing digital silence but some have some 0xFF and 0x00 sequences that don't match (I won't pretend to know what I'm talking about here! lol).

For research purposes, I also tried the illiminable filters. Out of the 14 tracks I decoded, only 2 matched the originals.
The DC-Bass Source v1.11 filters are currently the only ones I've found that output perfectly matching data.

If you want/need more info, please let me know.

73ChargerFan
10th April 2008, 18:03
Good catch! The problem with the bitrate is that with FLAC it's variable. But madFlac should be able to calculate an average bitrate and report that.
My family uses Media Center 2005, and this would be a great improvement.

madshi
13th April 2008, 19:48
Looking at the MadFlac filter properties in GraphEdit, the filter reports the track length correctly, but it doesn't report the bitrate. Could this be the problem?
Where did you check the bitrate in the madFlac filter properties? I tried to find the empty "bitrate" field. But I didn't find any "bitrate" field at all! I think madFlac does properly set all parameters. There is no "bitrate" field, but an "nAvgBytesPerSec" field - and that is set correctly by madFlac.

The other thing I wanted to ask, was that some tracks that I extract with DVD-Audio Explorer, decode and then re-encode into flac with a number of methods (DVD-Audio Explorer invoking flac.exe, or eac3to converting mlp to flac, or decoding mlp to wav then encoding into flac with dBpoweramp)...do not seem to work properly with madflac, but they do in the latest foobar which uses the latest libflac.

In MPC:

- 2.0ch 24-bit 192kHz track (tried Alan Parson's HDADs, Chicago V) - appears to play through track but silently!
- 4.0ch 24-bit 96kHz track (e.g. Janis Joplin - Pearl bootleg) - crashes MPC upon open.
- 4.1ch 24-bit 96kHz track (e.g. DSOTM bootleg) - crashes MPC upon open.
- 5.0ch 24-bit 96kHz track (e.g. Frank Zappa - Quaudiophiliac) - crashes MPC upon open.
They all work fine for me with the latest madFlac version (don't know if there was a problem with an older version). The 192kHz track is the only exception: It doesn't play, but it also doesn't crash. The reason why it doesn't play is that the audio renderers don't seem to like 192kHz. That's not the fault of madFlac, though, of course.

any news about that 2 flac tracks with different specs in 1 mkv file thing?
Should finally be fixed with the latest version now.

That's exactly what I've done :)
:) I'm now also exporting both WAVE_FORMAT_EXTENSIBLE and WAVE_FORMAT_PCM.

I haven't yet decided if I should try WAVE_FORMAT_EXTENSIBLE first and then fall back to WAVE_FORMAT_PCM... hmm decisions decisions!
Personally, I think WAVE_FORMAT_EXTENSIBLE is better because it allows to specify a channel mask. With WAVE_FORMAT_PCM you have to guess the channel order.

I've done some more tests and encoded / decoded all the tracks from a CD. The ones decoded using flac.exe came out exactly the same as the original wavs. Unfortunately not one of the madFlac decoded ones did :(
Could you please try the latest madFlac version? I've done some changes and in my (short) tests the output now seems to be bit for bit correct now.

The DC-Bass Source v1.11 filters are currently the only ones I've found that output perfectly matching data.
That is only true for 16bit tracks. For 24bit tracks DC-Bass cuts the lowest significant 8 bits. Which was the primary reason why I started developing madFlac in the first place... ;)

madshi
13th April 2008, 19:50
madFlac v1.8 released

http://madshi.net/madFlac.rar

* added support for WAVE_FORMAT_PCM
* changed standalone file decoding a bit to (hopefully) improve bit for bit correctness
* fixed handling of multiple FLAC tracks with different parameters in a container

Thunderbolt8
13th April 2008, 19:50
thanks very much!

LIGHTNING UK!
13th April 2008, 21:48
Ok, I've just tried v1.8... I'm afraid all the files are still different to the originals :(

For this test, I assume it wouldn't make a difference if I'm still using WAVE_FORMAT_PCM first would it? The files are plain old CD-DA anyway.

73ChargerFan
13th April 2008, 22:29
Below are the results of testing madFlac 1.8 on my XP MCE 2005 system,
using a stereo song, length 3:48, encoded by libFLAC 1.2.0 20070715,
& Vorbis tags.

My goal is to get full FLAC support in WMP11 and MCE 2005. I hope
these results can help in some way.


MPC Home Cinema 1.1.0.0:
"runtime" shown on filter properties page correctly

foobar2000 v0.9.5:
Song properties/Properties tab/Duration shows 3:47.600 (10037160 samples)
Sample Rate 44100 Hz, Bitrate 857 kbps
I guess duration is calculated as #samples/44100

dBpoweramp v12.4 by Spoon:
Explorer file properties /Audio Properties tab
shows "Length" as 3:47 & "Bit Rate" as 1,411 kpbs

Explorer detail columns:
"Duration" & "Bit Rate" are blank
"Length" is 3:47 (new column by dBpoweramp)
"Bit Rate" is 1,411 kpbs (CD) (second column named this, by dBpoweramp)

Windows Media Player 11.0.5721.5230, using WMPTagSupportExtender plugin
"Length" is blank
"Bit Rate" is shown as 0
"Release Year" is blank ("Year" & "Release Year" tags are both present)

madshi
14th April 2008, 07:27
Windows Media Player 11.0.5721.5230, using WMPTagSupportExtender plugin
"Length" is blank
"Bit Rate" is shown as 0
"Release Year" is blank ("Year" & "Release Year" tags are both present)
Well, I don't really know where WMP is getting the information from, unfortunately. So I don't know why some information is shown missing by WMP... :(

cbemoore
14th April 2008, 20:06
Well, I don't really know where WMP is getting the information from, unfortunately. So I don't know why some information is shown missing by WMP... :(

WMP gets the information from WMP Tag Support Extender (an open source project to add a number of different file types to WMP). So it looks like that's where the problem lies.

The source code for WMPTSE is available here (http://sourceforge.net/project/showfiles.php?group_id=151072) - does anyone fancy digging around in the code?

Chris

73ChargerFan
14th April 2008, 20:59
cbemoore, the author of WMPTSE has said that WMP gets the length from the codec, not from tags, but I really don't know. Thanks for posting a link to the code.

cbemoore
14th April 2008, 21:22
cbemoore, the author of WMPTSE has said that WMP gets the length from the codec, not from tags, but I really don't know. Thanks for posting a link to the code.

Well I've been looking around in the WMPTSE code for the last hour, and I can't see anything obvious. But the code does include the FLAC libraries (in object form, not source code) and the FLAC libraries are over 2 years old!

So I guess a first step could be to recompile WMPTSE with the latest FLAC libraries. Unfortunately I haven't got the development environment on my PC or I'd give it a go myself.

cbemoore
15th April 2008, 02:31
I've done some more reading, and the zero length FLAC file issue is a known problem. See this thread started by the WMTSE author:

http://sourceforge.net/forum/forum.php?thread_id=1660321&forum_id=504707

Evidently its a Vista MCE bug, so I wouldn't expect a solution soon!

monohouse
3rd May 2008, 16:49
-----

madshi
3rd May 2008, 19:06
how does it handle 6-channel audio ? does it have a matrix ? or does it just output the first 2 channels if the output is stereo ? there are no options in the decoder
The decoder outputs 6 channels. Downmixing to 2 channels it not supported. I think there are other filters you can connect after madFlac which can do downmixing to 2 channels, e.g. probably ffdShow can do that.

monohouse
4th May 2008, 19:21
-----

clsid
4th May 2008, 19:27
Enable "raw audio" in ffdshow and it automatically place itself between the madFLAC filter and the audio renderer.

madshi
4th May 2008, 21:23
I heard some rumors that ffdshow's flac decoder only supports 16-bit
It's not a rumour, it's a fact, I believe.

according to what I know about audio engineering, "surround" in all it's forms, is based upon the same principles of "pro logic", ac3 was made to change that a little, the question is to what extent that is being used ?
AC3 and DTS tracks are usually 5.1. That means they really contain 6 separate "discrete" channels. "pro logic" is the poor man's approach to surround.

monohouse
4th May 2008, 21:24
-----

madshi
4th May 2008, 21:45
yes, but to what extent do they use it as such ?
Not sure what you mean. You can check every AC3 and DTS track with one of the many tools available for such purpose. E.g. delaycut or eac3to. They will tell you whether the AC3/DTS track has 2.0 channels or 5.1 channels. Most (newer) DVDs have 5.1. Almost all Blu-Ray and HD DVDs have.

while I am at it, do you know if a ASIO/kernel streaming output for MPC exists ?
Reclock is the only one, AFAIK.

Inventive Software
5th May 2008, 13:58
I heard some rumors that ffdshow's flac decoder only supports 16-bit

This is due to libavcodec, which hasn't implemented true 24-bit support across all audio formats. When that happens, ffdshow will thus support 24-bit audio properly.

monohouse
5th May 2008, 18:01
-----

madshi
6th May 2008, 07:09
If you don't like multichannel audio then that's fine. I agree somewhat when talking about conventional music. But I and most other people do like surround VERY much for movies. It's a whole different atmosphere sitting in the middle of the action (surround) compared to sitting in front of the action (stereo). Of course the movie studios know that many people still have a stereo setup, only. So crucial dialog etc will always be available in the stereo channels. But that doesn't mean that the other channels are worthless. Quite in contrast. The movies are made primarily for the cinema and every good cinema has surround sound. So the movie audiotracks were made mainly with surround sound in mind. If you don't have surround sound you're missing half of "the picture". Of course that's not fully true for all movies. But many movies (especially not too old action movies) do have a lot of action going on in the surround channels.

monohouse
7th May 2008, 00:33
-----

monohouse
13th May 2008, 01:33
-----

cghebert
16th May 2008, 18:04
Hi,

Coming over from the eac3to thread as per Madshi's suggestion.

Below is my original post. Behavior seems the same whether I use MadFLAC or the CoreFLAC decoder. Later tonight I can post the filter details (like the post above) if that would help.


Quote:
Originally Posted by cghebert


First time poster but I have been following the thread on and off for a while. I recently got one of the new geforce 8200 motherboards that can send multichannel LPCM over HDMI and have been trying to get it setup properly. I am currently running it in XP SP3. I was able to create a 6 channel FLAC file no problem using eac3, and it plays fine in MPC with madflac. However, for some reason my receiver thinks it is getting a 7.1 channel file, instead of a 5.1 channel file, and the surround right and left channels come out of the surround back right and surround back left channels (I have a 7.1 system), while the surround left and right speakers are silent. All the other speakers (including sub), seem to work fine, except for stuttering, which is most certainly a driver issue, since it happens for all audio tracks.

What I'm trying to figure out is whether this is a another driver issue (quite possibly), or an issue related to how eac3 encodes the tracks. Maybe it is encoding the side surrounds as the back surrounds? This seems unlikely and I can't seem to find any reason why eac3 would, but hopefully someone can chime in and shed some light on the situation.


Madshi: Hmmmm... This may be a bug in madFlac or in the driver. Don't know for sure. It's definitely not a bug in eac3to. Can you please post a report in the madFlac thread?

madshi
16th May 2008, 21:43
Yeah, filter details (plus pin connection info) would help.

cghebert
17th May 2008, 06:11
Madshi,

I'm pretty sure the stuttering has been a heat issue. Somewhat annoying, ECS really should have put a better heatsink on this thing. Anyway, I still have the behavior that when I play the 6 channel FLAC, the sounds come out of the back surrounds, rather than just the surrounds. Also, every PCM that is sent to the receiver shows up as 7 channel PCM, regardless of type. I'm pretty sure this is a driver issue though. Let me know if you can glean anything from the code below, or if you have any other questions. I post over in avsforums as well (same username). Thanks for your input.

Here is the pin info:

[In] FLAC:

CLSID: {6B257121-CBB6-46B3-ABFA-B14DFA98C4A6}
Filter: madFlac Decoder

- Connected to:

CLSID: {149D2E01-C32E-4939-80F6-C07B81015A7A}
Filter: Matroska Splitter (low merit)
Pin: Undetermined (Audio 1)

- Connection media type:

Audio: FLAC 48000Hz 6ch 4608Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {1541C5C0-CDDF-477D-BC0A-86F8AE7F8354}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 256000
cbFormat: 104

WAVEFORMATEX:
wFormatTag: 0xf1ac
nChannels: 6
nSamplesPerSec: 48000
nAvgBytesPerSec: 576000
nBlockAlign: 12
wBitsPerSample: 16
cbSize: 86 (extra bytes)

pbFormat:
0000: ac f1 06 00 80 bb 00 00 00 ca 08 00 0c 00 10 00 ¬ñ..€»...Ê......
0010: 56 00|66 4c 61 43 00 00 00 22 10 00 10 00 00 00 V.fLaC..."......
0020: 1a 00 84 21 0b b8 0a f0 0d b4 73 48 78 2d 05 fc ..„!.¸.ð.´sHx-.ü
0030: 62 39 42 e1 aa bb a3 b6 d0 26 50 31 84 00 00 28 b9B᪻£¶Ð&P1„..(
0040: 20 00 00 00 72 65 66 65 72 65 6e 63 65 20 6c 69 ...reference li
0050: 62 46 4c 41 43 20 31 2e 32 2e 30 20 32 30 30 37 bFLAC 1.2.0 2007
0060: 30 37 31 35 00 00 00 00 0715....


[OUT] PCM

CLSID: {6B257121-CBB6-46B3-ABFA-B14DFA98C4A6}
Filter: madFlac Decoder

- Connected to:

CLSID: {18C16B08-6497-420E-AD14-22D21C2CEAB7}
Filter: Audio Switcher
Pin: bb1.mka

- Connection media type:

Audio: WAVE_FORMAT_EXTENSIBLE 48000Hz 6ch 4608Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 6
nSamplesPerSec: 48000
nAvgBytesPerSec: 576000
nBlockAlign: 12
wBitsPerSample: 16
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 16
dwChannelMask: 0x0000003f
SubFormat: {00000001-0000-0010-8000-00AA00389B71}

pbFormat:
0000: fe ff 06 00 80 bb 00 00 00 ca 08 00 0c 00 10 00 þÿ..€»...Ê......
0010: 16 00 10 00 3f 00 00 00 01 00 00 00 00 00 10 00 ....?...........
0020: 80 00 00 aa 00 38 9b 71 €..ª.8›q

madshi
17th May 2008, 08:38
The important thing is the channel mask:

dwChannelMask: 0x0000003f
This seems to be correct to me. So I'd guess that the problem is caused by a driver bug.

tebasuna51
17th May 2008, 11:54
Anyway, I still have the behavior that when I play the 6 channel FLAC, the sounds come out of the back surrounds, rather than just the surrounds.

I agree with madshi, the channel mask:
dwChannelMask: 0x0000003f
is the default for six channels and means: FL,FR,FC,LF,BL,BR
with BL,BR = Back Left/Right
and not dwChannelMask: 0x0000060f = FL,FR,FC,LF,SL,SR
with SL,SR = Side Left/Right (Side, not Surround).

I'm sure your 7.1 audio equipment must have a function to distribute the standard 5.1 format to 7.1 sending the surround sound (Back by default) to the Side and Back speakers.

cghebert
17th May 2008, 16:24
I agree with madshi, the channel mask:
dwChannelMask: 0x0000003f
is the default for six channels and means: FL,FR,FC,LF,BL,BR
with BL,BR = Back Left/Right
and not dwChannelMask: 0x0000060f = FL,FR,FC,LF,SL,SR
with SL,SR = Side Left/Right (Side, not Surround).

I'm sure your 7.1 audio equipment must have a function to distribute the standard 5.1 format to 7.1 sending the surround sound (Back by default) to the Side and Back speakers.

Thanks for the info guys. It does bring me to another question though. It seems like in the dolby and AV receiver literature I read, they refer to 5.1 as front, left, center, lfe, surround left, and surround right. when you then expand to 7.1, you add back surround left and back surround right, or just left back and left right. However, with the dwChannelMask, the default as you stated seems to be left, right, center, lfe, back left, back right.

So, when I am playing the 6 channel FLAC, and the surround channels are labeled back left and back right, maybe they are being sent to the correct channels? To me it just seems that there is an inconsistency between the channel order or at least labeling of the channels between dolby and dwChannelMask. Does this make any sense?

madshi
17th May 2008, 16:50
The situation definitely is confusing. See the following links, especially the 2nd one:

http://www.microsoft.com/whdc/device/audio/multichaud.mspx
http://msdn.microsoft.com/en-us/library/aa474707.aspx

Strictly spoken 0x3f is incorrect. It should be 0x60f. However, 0x3f has historically always been used for 5.1 channel mask. Microsoft sais:

The meaning of the channel mask 0x3F in the first table has changed in the second table to indicate the side-speaker 5.1 configuration (with SL and SR) instead of the back-speaker 5.1 configuration (with BL and BR). This is a special-case interpretation that overrides the usual meaning of the channel mask bits.
So I'm considering the behaviour of the GeForce 8200 to be incorrect. Microsoft wants us to special case 0x3f to the usual 5.1 *side* surround mapping.

But still I'm wondering: Maybe I should change madFlac to use 0x60f instead of 0x3f? But I fear that some audio drivers or audio renderers or DirectShow filters would be confused by that.

@tebasuna51, what do you think?

Maybe I should also discuss this with the ffdshow tryout guys?

73ChargerFan
17th May 2008, 16:59
madshi,

How about sending cghebert a test version recompiled with the 0x60f mask?

However, I agree with tebasuna51 that it may be a receiver configuration issue. I think my receiver has an option to remap the surround speakers from side to rear, but I haven't tried it because I only have 5.1 speakers.

cghebert
17th May 2008, 18:11
Yes, the second link certainly seems to indicate that in XP SP2 (which I have), the mapping has changed such that 0x3f is L,R,C,LFE, side left, side right

Somewhat of an update - when I play the movie through the Arcsoft TMT, I can get TrueHD 5.1, and the surrounds come out of the sides, but my receiver still thinks it is getting a 7 channel stream, due to the 8200 driver issue. It also comes out at 192khz, as opposed to 48khz, which it actually is.

If you send me a sample with the different mask, I can give it a try. I'm probably going to try another OS somewhat soon, since XP definitely has issues with these drivers, plus people seem to have things working in vista64.

tebasuna51
17th May 2008, 19:23
The situation definitely is confusing. See the following links, especially the 2nd one:

http://www.microsoft.com/whdc/device/audio/multichaud.mspx
http://msdn.microsoft.com/en-us/library/aa474707.aspx

Strictly spoken 0x3f is incorrect. It should be 0x60f. However, 0x3f has historically always been used for 5.1 channel mask. Microsoft sais:


So I'm considering the behaviour of the GeForce 8200 to be incorrect. Microsoft wants us to special case 0x3f to the usual 5.1 *side* surround mapping.

But still I'm wondering: Maybe I should change madFlac to use 0x60f instead of 0x3f? But I fear that some audio drivers or audio renderers or DirectShow filters would be confused by that.

@tebasuna51, what do you think?

Maybe I should also discuss this with the ffdshow tryout guys?
In the second link there are a clear typo:
KSAUDIO_SPEAKER_5POINT1 0x3F FL, FR, FC, LFE, SL, SR
KSAUDIO_SPEAKER_7POINT1 0xFF FL, FR, FC, LFE, BL, BR, FLC, FRC
KSAUDIO_SPEAKER_7POINT1_SURROUND 0x63F FL, FR, FC, LFE, BL, BR, SL, SR
must be BL, BR, remember the definitions in first link:
0x00010 Back Left - BL
0x00020 Back Right - BR
0x00040 Front Left of Center - FLC
0x00080 Front Right of Center - FRC
0x00100 Back Center - BC
0x00200 Side Left - SL
0x00400 Side Right - SR
To be coherent with 7.1 and 7.1_Surround the 5.1 must be:
KSAUDIO_SPEAKER_5POINT1 0x3F FL, FR, FC, LFE, BL, BR

The new in the last Ksmedia.h is the 7.1_Surround 0x63F, I propose this channel mask like default instead the less used 0xFF, here you can see the 0x600 (SL,SR).

Where you see 0x60F for 5.1 in precedent documents?
5.1 remains 0x3F always.

I see this comment:
The meaning of the channel mask 0x3F in the first table has changed in the second table to indicate the side-speaker 5.1 configuration (with SL and SR) instead of the back-speaker 5.1 configuration (with BL and BR). This is a special-case interpretation that overrides the usual meaning of the channel mask bits.
absolutely wrong.
The 0x30 in 0x3F means SL,SR but in 0xFF means BL,BR?
And the order in 0x63F FL,FR,FC,LF,BL,BR,SL,SR?

I know also flac, when decode a 6 channel, put 0x60F in channel mask, the problem is reported in this flac Feature Request (https://sourceforge.net/tracker/?func=detail&atid=363478&aid=1949155&group_id=13478)

tebasuna51
17th May 2008, 19:37
Yes, the second link certainly seems to indicate that in XP SP2 (which I have), the mapping has changed such that 0x3f is L,R,C,LFE, side left, side right.

I haven't problem how you want name the channels but 0x3F is the correct mask default for 5.1

If you want name side left to the 5th channel in a wav 5.1 and use the mask 0x10 for it, no problem for me, say you to MS.

tebasuna51
17th May 2008, 20:29
BTW, I think this discussion is irrelevant. Only when we have a 7.1 surround and a 7.1 audio equipment we need difference the Side and Back channels.

- If we have a 5.1 audio and 7.1 equipment we need send the Surround (not matter if Side or Back) to both Side and Back speakers.

- If we have a 7.1 audio and 5.1 equipment we need mix the Side and Back channels to send to Surround channels

We must be permissive and accept like correct 5.1 both channel mask (like flac do) because the back channels in a 5.1 audio speakers system is not the same than a 7.1 system.
In a 7.1 speakers systems we have at left of listener the Side Left speaker (0º), the Front Left at 45º (more or less), the Front Center at 90º, Front Right at 135º, Side Right at 180º, Back Right at 240º and Back Left at 300º.
In a 5.1 audio speakers system we have the front channels equal, but the Surround speakers must be at 225º and 315º.

I think Surround (5.1) is most similar to Back (7.1) but not equal.

madshi
17th May 2008, 22:15
The latest ksmedia.h contains this:

// DirectSound Speaker Config
#if (NTDDI_VERSION >= NTDDI_WINXP)
#define KSAUDIO_SPEAKER_DIRECTOUT 0
#endif
#define KSAUDIO_SPEAKER_MONO (SPEAKER_FRONT_CENTER)
#define KSAUDIO_SPEAKER_STEREO (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT)
#define KSAUDIO_SPEAKER_QUAD (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
#define KSAUDIO_SPEAKER_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER)
#define KSAUDIO_SPEAKER_5POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
#define KSAUDIO_SPEAKER_7POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | \
SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER)

#if ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)

#define KSAUDIO_SPEAKER_5POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)
#define KSAUDIO_SPEAKER_7POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | \
SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)
// The following are obsolete 5.1 and 7.1 settings (they lack side speakers). Note this means
// that the default 5.1 and 7.1 settings (KSAUDIO_SPEAKER_5POINT1 and KSAUDIO_SPEAKER_7POINT1 are
// similarly obsolete but are unchanged for compatibility reasons).
#define KSAUDIO_SPEAKER_5POINT1_BACK KSAUDIO_SPEAKER_5POINT1
#define KSAUDIO_SPEAKER_7POINT1_WIDE KSAUDIO_SPEAKER_7POINT1

#endif // XP SP2 and later (chronologically)
The header file claims that KSAUDIO_SPEAKER_5POINT1 and KSAUDIO_SPEAKER_7POINT1 are obsolete. It seems to me that KSAUDIO_SPEAKER_5POINT1_SURROUND and KSAUDIO_SPEAKER_7POINT1_SURROUND should be used instead. So actually 0x60f looks more correct than 0x3f to me.

Thoughts?

tebasuna51
18th May 2008, 01:14
The latest ksmedia.h contains this:
...
The header file claims that KSAUDIO_SPEAKER_5POINT1 and KSAUDIO_SPEAKER_7POINT1 are obsolete. It seems to me that KSAUDIO_SPEAKER_5POINT1_SURROUND and KSAUDIO_SPEAKER_7POINT1_SURROUND should be used instead. So actually 0x60f looks more correct than 0x3f to me.

Thoughts?
First time I see the 5.1_Surround definition:
#define KSAUDIO_SPEAKER_5POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)

Well, I can accept the new default of course, not problem for me.
If somebody know the reasons for this change, please, say me.

Because the difference between 7.1 and 7.1_Surround is evident 5 front channels instead 3, 2 back channels instead 4 and very different order also.

But the difference between 5.1 and 5.1_Surround is merely semantic, like I say in precedent post we need process Side or Back channels in same way (same order, same destination).
0x003F FL FR FC LF BL BR
0x060F FL FR FC LF SL SR

And we need maintain the backwards compatibility accepting old 5.1 mask 0x003F.

And the surround ac3/dts channels are Side or Back?
I think the angle is most similar to Back.
Is mandatory decode the surround ac3/dts channels to Side?
If I record a movie with 5 microphones (center and 4 corners) my channels are Side or Back?
I think the name is not important.

Now we have a problem with 6.1 because the channel order is different:
0x013F FL FR FC LF BL BR BC
0x070F FL FR FC LF BC SL SR
Somebody know what we must use?

madshi
18th May 2008, 08:37
First time I see the 5.1_Surround definition:
Same with me! I think the Microsoft "headers changed" link I posted earlier is not fully correct. I believe they wanted to talk about the new definitions, but screwed up.

Well, I can accept the new default of course, not problem for me.
If somebody know the reasons for this change, please, say me.

Because the difference between 7.1 and 7.1_Surround is evident 5 front channels instead 3, 2 back channels instead 4 and very different order also.

But the difference between 5.1 and 5.1_Surround is merely semantic, like I say in precedent post we need process Side or Back channels in same way (same order, same destination).
0x003F FL FR FC LF BL BR
0x060F FL FR FC LF SL SR

And we need maintain the backwards compatibility accepting old 5.1 mask 0x003F.

And the surround ac3/dts channels are Side or Back?
I think the angle is most similar to Back.
Is mandatory decode the surround ac3/dts channels to Side?
If I record a movie with 5 microphones (center and 4 corners) my channels are Side or Back?
Well, in the AC3 and DTS documentation the channels are named "left/right surround". They're neither called "side" nor "back". So both Microsoft constants do not fully fit. However, the additional 2 channels in 7.1 are always called "back" or "rear" in every documentation I found. So it does make sense to use the Microsoft "back" constants for the back channels and the Microsoft "side" constants for the surround channels, I think. Using the Microsoft "back" channels for the surround channels and the Microsoft "side" channels for the back channels sounds "back"wards to me... :) Cause "back" is backer than "side" when talking about the MS constants. And "back" is backer than "surround" when talking about the general language used in the home theater world. So it sounds logical to me to use MS "side" constants for the "surround" channels.

Furthermore I don't think it makes sense to change the constants depending on how many channels we have. It makes no sense to me to name the channels "surround" in 5.1 and "side" in 7.1. Well, ok, the recommended speaker placement might be like that. But in all documentation (AC3, DTS) the name of the side/surround channels is always "surround", no matter whether we have 5.1 or 7.1. The name is never changed to "side". At least I haven't seen that in any specification I've read.

Now we have a problem with 6.1 because the channel order is different:
0x013F FL FR FC LF BL BR BC
0x070F FL FR FC LF BC SL SR
Somebody know what we must use?
Yeah, that's a real trouble! The Sonic decoder outputs 6.1 DTS in this channel order (where "SL/SR" stands for "surround"):

L, R, C, LFE, SL, SR, BC

Channel mask is "-1". Which according to MS means: "The dwChannelMask value 0xFFFFFFFF (or any value in which the most significant bit of the DWORD is set) is pre-defined to indicate that an entity supports all possible channel configurations".

Now maybe eac3to's automatic conversion from 6.1 to 7.1 makes sense again? Because there's no doubt about the right channel mask and channel ordering with 7.1... ;) While with 6.1 I'm not sure about the right ordering. I'd say "FL FR FC LF BC SL SR" sounds like the right channel order to me - but I bet all the applications/drivers accepting 6.1 will have their own interpretation!

Because the difference between 7.1 and 7.1_Surround is evident 5 front channels instead 3, 2 back channels instead 4 and very different order also.

But the difference between 5.1 and 5.1_Surround is merely semantic, like I say in precedent post we need process Side or Back channels in same way (same order, same destination).
I agree if we talk about the channel order. And if we talk about drivers behaving correctly.

And we need maintain the backwards compatibility accepting old 5.1 mask 0x003F.
Yes, definitely. I'm thinking maybe madFlac should offer 3 media types:

(1) extensible with 0x60f
(2) extensible with 0x3f
(3) PCM (no channel mask)

What do you think?

I think I'll post this in the ffdshow thread, too, to get more feedback...

nautilus7
18th May 2008, 11:04
Well, in the AC3 and DTS documentation the channels are named "left/right surround". They're neither called "side" nor "back". So both Microsoft constants do not fully fit. However, the additional 2 channels in 7.1 are always called "back" or "rear" in every documentation I found. So it does make sense to use the Microsoft "back" constants for the back channels and the Microsoft "side" constants for the surround channels, I think. Using the Microsoft "back" channels for the surround channels and the Microsoft "side" channels for the back channels sounds "back"wards to me... :) Cause "back" is backer than "side" when talking about the MS constants. And "back" is backer than "surround" when talking about the general language used in the home theater world. So it sounds logical to me to use MS "side" constants for the "surround" channels.This was/is always the case with me. When you say surround/side i understand 5.1 and when you say back/rear i understand you mean the 2 extra channels in a 7.1 setup. But as tebasuna51 said earlier, naming is not that matters most.

cghebert
31st May 2008, 20:27
Same with me! I think the Microsoft "headers changed" link I posted earlier is not fully correct. I believe they wanted to talk about the new definitions, but screwed up.


Well, in the AC3 and DTS documentation the channels are named "left/right surround". They're neither called "side" nor "back". So both Microsoft constants do not fully fit. However, the additional 2 channels in 7.1 are always called "back" or "rear" in every documentation I found. So it does make sense to use the Microsoft "back" constants for the back channels and the Microsoft "side" constants for the surround channels, I think. Using the Microsoft "back" channels for the surround channels and the Microsoft "side" channels for the back channels sounds "back"wards to me... :) Cause "back" is backer than "side" when talking about the MS constants. And "back" is backer than "surround" when talking about the general language used in the home theater world. So it sounds logical to me to use MS "side" constants for the "surround" channels.

Furthermore I don't think it makes sense to change the constants depending on how many channels we have. It makes no sense to me to name the channels "surround" in 5.1 and "side" in 7.1. Well, ok, the recommended speaker placement might be like that. But in all documentation (AC3, DTS) the name of the side/surround channels is always "surround", no matter whether we have 5.1 or 7.1. The name is never changed to "side". At least I haven't seen that in any specification I've read.


Yeah, that's a real trouble! The Sonic decoder outputs 6.1 DTS in this channel order (where "SL/SR" stands for "surround"):

L, R, C, LFE, SL, SR, BC

Channel mask is "-1". Which according to MS means: "The dwChannelMask value 0xFFFFFFFF (or any value in which the most significant bit of the DWORD is set) is pre-defined to indicate that an entity supports all possible channel configurations".

Now maybe eac3to's automatic conversion from 6.1 to 7.1 makes sense again? Because there's no doubt about the right channel mask and channel ordering with 7.1... ;) While with 6.1 I'm not sure about the right ordering. I'd say "FL FR FC LF BC SL SR" sounds like the right channel order to me - but I bet all the applications/drivers accepting 6.1 will have their own interpretation!

Because the difference between 7.1 and 7.1_Surround is evident 5 front channels instead 3, 2 back channels instead 4 and very different order also.


I agree if we talk about the channel order. And if we talk about drivers behaving correctly.


Yes, definitely. I'm thinking maybe madFlac should offer 3 media types:

(1) extensible with 0x60f
(2) extensible with 0x3f
(3) PCM (no channel mask)

What do you think?

I think I'll post this in the ffdshow thread, too, to get more feedback...

Madshi and others,

Finally coming back to this after a while struggling to get everything going. I now am playing 1080p mkv files fine with the new biostar 8200 board, with the flac audio. Unfortunately, nvidia still only allows 7.1 channel output, as opposed to just 5.1.

I have noticed that whether sound comes out of the side surround or back surrounds depends quite a bit on the codec and player used. It might be a useful feature to add different channel masks to madflac, but I think it is fairly straightforward to just remap the channels using ffdshow or mplayer classic's internal audio switcher.

This does bring me to another question. Is there any way to PLIIx type matrixing of the 5.1 -> 7.1 in mplayer classic using ffdshow or some combination of filters?

If you guys aren't sure, can you suggest a good forum to ask?

Thanks again.

tebasuna51
31st May 2008, 21:23
It might be a useful feature to add different channel masks to madflac, but I think it is fairly straightforward to just remap the channels using ffdshow or mplayer classic's internal audio switcher.

This does bring me to another question. Is there any way to PLIIx type matrixing of the 5.1 -> 7.1 in mplayer classic using ffdshow or some combination of filters?

If you guys aren't sure, can you suggest a good forum to ask?.

With 5.1 don't exist problem at all. 0x3f is the correct channel mask for 5.1 until xp SP2, after the 0x60f is the new 5.1_surround, but we need maintain compatibily then the 0x3f must also be accepted like 5.1.

I'm sure about what do, in BeHappy for instance, the default channel mask for 5.1 is 0x3f, the soft/drivers pre-XP-SP2 work ok and the post-XP-SP2 must accept also 0x3f.

We don't need remap nothing because the order is the same for a 5.1 0x3f or 0x60f, and the behaviour for a 7.1 system when receive a 5.1, 0x3f or 0x60f, is the same also:
- The recommended position for RightSurround speaker is 110º from Center speaker.
- The standard position for RightSide and RightBack are 90º and 150º
- Then the Surround channel must go to Side and Back, never to only one.

With ffdshow you can define a custom matrix with the appropriate coeficients to the real position of your Side and Back speakers.

madshi
1st June 2008, 21:37
If you feed a 7.1 setup (receiver + speakers) with 5.1 AC3 bitstream what does the receiver send to the speakers? Are the side and back speakers both fed with exactly the same sound with exactly the same volume in this case? Or does the receiver do some special processing to fill the rear speakers? I'm not sure what receivers are doing in such a case.

I could add an option to madFlac to "upconvert" 5.1 FLAC tracks to 7.1. But I don't want to add something if I'm not sure that it's the right thing to do. So I'd like to know for sure that simple channel copying is what a normal receiver does, too.

Anybody knows that?

cghebert
1st June 2008, 22:24
- The recommended position for RightSurround speaker is 110º from Center speaker.
- The standard position for RightSide and RightBack are 90º and 150º
- Then the Surround channel must go to Side and Back, never to only one.

With ffdshow you can define a custom matrix with the appropriate coeficients to the real position of your Side and Back speakers.

I can measure the angle and positions of my speakers, but exactly how do I translate this into the appropriate coefficients for the matrix?

cghebert
1st June 2008, 22:48
If you feed a 7.1 setup (receiver + speakers) with 5.1 AC3 bitstream what does the receiver send to the speakers? Are the side and back speakers both fed with exactly the same sound with exactly the same volume in this case? Or does the receiver do some special processing to fill the rear speakers? I'm not sure what receivers are doing in such a case.

I could add an option to madFlac to "upconvert" 5.1 FLAC tracks to 7.1. But I don't want to add something if I'm not sure that it's the right thing to do. So I'd like to know for sure that simple channel copying is what a normal receiver does, too.

Anybody knows that?

Madshi,

I'm not an expert on the topic, but when I send my AVR 5.1 AC3, the back surrounds are completely silent: only the side surrounds are active and my input lights show up as 5.1.

If I apply processing to the stream, such as Dolby Prologic IIx, it matrixes the side surrounds into the back surrounds in order to fill out all seven channels. It doesn't touch the fronts, center, or LFE.

Whether or not this "matrixing" by PLIIx is simply splitting the channel into equal parts vs. applying some special processing, I don't know.
I do know that certain movie tracks have built in "Flags" that tell the receiver to apply a certain matrixing technology, so there might be something more going on than just splitting the stream.

There is a PL2XDLL.dll file that comes with PowerDVD (has PLIIx ability built in), but I haven't done enough digging to really figure out much about it. The only instance I have found of someone trying to implement it in another player is here (http://www.hydrogenaudio.org/forums/lofiversion/index.php/t50713.html), but it doesn't look like that has been updated for a while.

I'm not sure if one can use cyberlink's audio decoder in mplayer classic to apply PLIIx. I did get it to show up as a filter when I was playing an AC3 track, but I'm not sure if it was actually doing anything, and I don't think it can recognize FLAC files. Do you know if any of the other lossless formats eac3to can output (RAW, PCM, WAV, etc.) can be recognized by Cyberlink's decoder? I suppose I can just try them out myself, but wanted to see if you knew off the top of your head.

Here is some additional information from Dolby on PLIIx, though it isn't terribly technical unfortunately http://www.dolby.com/consumer/technology/prologic_IIx_faq_1.html

I wonder if making 5.1 into 7.1 is rather simple. I would figure the more complex processing would be needed to make 7.1 from 2 channel inputs.

tebasuna51
2nd June 2008, 19:00
If you feed a 7.1 setup (receiver + speakers) with 5.1 AC3 bitstream what does the receiver send to the speakers? Are the side and back speakers both fed with exactly the same sound with exactly the same volume in this case? Or does the receiver do some special processing to fill the rear speakers? I'm not sure what receivers are doing in such a case.

I could add an option to madFlac to "upconvert" 5.1 FLAC tracks to 7.1. But I don't want to add something if I'm not sure that it's the right thing to do. So I'd like to know for sure that simple channel copying is what a normal receiver does, too.

Anybody knows that?
http://img136.imageshack.us/img136/8310/speakerszl3.png (http://imageshack.us)
Maybe we can calculate the 5.1 -> 7.1 upmix with:
The acustic power component in Y axis is produced only for back speaker then:

Back x cos 30º = Surround x sin(110º - 90º) = Surround x sin 20º
then Back = 0.395 x Surround

The component in X axis is:

Back x sin 30º + Side = Surround x cos 20º
then Side = 0.742 x Surround

The coeficients in matrix (electric signal) must be the sqr of the acustic power:
Side = sqr(0.742) x Surround = 0.86 x Surround
Back = sqr(0.395) x Surround = 0.62 x Surround

rickardk
6th July 2008, 21:21
Trying to use madFlac with some mkvs containing Blu-ray concerts (MPEG2).

madFlac connects to subpicture input on cyberlinks decoder instead of the audio renderer (or ffdshow).

Any ideas?

madshi
6th July 2008, 21:43
http://img136.imageshack.us/img136/8310/speakerszl3.png (http://imageshack.us)
Maybe we can calculate the 5.1 -> 7.1 upmix with:
The acustic power component in Y axis is produced only for back speaker then:

Back x cos 30º = Surround x sin(110º - 90º) = Surround x sin 20º
then Back = 0.395 x Surround

The component in X axis is:

Back x sin 30º + Side = Surround x cos 20º
then Side = 0.742 x Surround

The coeficients in matrix (electric signal) must be the sqr of the acustic power:
Side = sqr(0.742) x Surround = 0.86 x Surround
Back = sqr(0.395) x Surround = 0.62 x Surround
Hmmmm... That sounds interesting. But this wouldn't handle Dolby EX and DTS ES Matrix encoded material "properly", would it?

madshi
6th July 2008, 21:44
Trying to use madFlac with some mkvs containing Blu-ray concerts (MPEG2).

madFlac connects to subpicture input on cyberlinks decoder instead of the audio renderer (or ffdshow).

Any ideas?
Can you please post the media type connection information (e.g. by using MPC HC)? I don't think that this is a madFlac problem, but of course I can't be sure. Generally madFlac just reports that it is willing to output audio. Which other filter connects to that does not really bother madFlac...

tebasuna51
6th July 2008, 22:53
Hmmmm... That sounds interesting. But this wouldn't handle Dolby EX and DTS ES Matrix encoded material "properly", would it?

But Dolby EX and DTS ES Matrix encoded are 6.1
And DTS ES decodec with ArcSoft I obtain FL,FR,FC,LF,BL,BR,BC then to convert to 7.1 is enough:
SL = BL
SR = BR
BL = 0.707xBC
BR = 0.707xBC

K1ngp1ng
7th July 2008, 07:21
when decoding 6.1 (-no7doubling in eac3to) with madflac the info in ffdshow says: fl, fr, c, lfe, bl, br, front left of center
does anyone else have this problem? i don't know which software causes this error. i use vista64.

rickardk
11th July 2008, 14:18
Sorry for taking so long. I guess there is no way around the problem with madFlac connecting to Cyberlinks MPEG2 decoder.

Filter : madFlac Decoder - CLSID : {6B257121-CBB6-46B3-ABFA-B14DFA98C4A6}

- Connected to:

CLSID: {55DA30FC-F16B-49FC-BAA5-AE59FC65F82D}
Filter: \\unraid\disk1\Filmer\A Knights Tale [Blu-ray]\A Knights Tale.mkv
Pin: Audio

- Connection media type:

Audio: FLAC 48000Hz 6ch 4608Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {1541C5C0-CDDF-477D-BC0A-86F8AE7F8354}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 0
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 104

WAVEFORMATEX:
wFormatTag: 0xf1ac
nChannels: 6
nSamplesPerSec: 48000
nAvgBytesPerSec: 576000
nBlockAlign: 12
wBitsPerSample: 16
cbSize: 86 (extra bytes)

pbFormat:
0000: ac f1 06 00 80 bb 00 00 00 ca 08 00 0c 00 10 00 ¬ñ..€»...Ê......
0010: 56 00|66 4c 61 43 00 00 00 22 10 00 10 00 00 01 V.fLaC..."......
0020: 14 00 81 f3 0b b8 0a f0 16 af 50 80 fe 45 bd 68 ..�ó.¸.ð.¯P€þE½h
0030: 80 5b 8a b8 54 e9 2f f2 b1 0b 24 19 84 00 00 28 €[ЏTé/ò±.$.„..(
0040: 20 00 00 00 72 65 66 65 72 65 6e 63 65 20 6c 69 ...reference li
0050: 62 46 4c 41 43 20 31 2e 32 2e 30 20 32 30 30 37 bFLAC 1.2.0 2007
0060: 30 37 31 35 00 00 00 00 0715....








Filter : madFlac Decoder - CLSID : {6B257121-CBB6-46B3-ABFA-B14DFA98C4A6}

- Connected to:

CLSID: {8ACD52ED-9C2D-4008-9129-DCE955D86065}
Filter: CyberLink Video/SP Decoder (PDVD7)
Pin: SubPicture In

- Connection media type:

Unknown

AM_MEDIA_TYPE:
majortype: MEDIATYPE_DVD_ENCRYPTED_PACK {ED0B916A-044D-11D1-AA78-00C04FC31D60}
subtype: MEDIASUBTYPE_DVD_SUBPICTURE {E06D802D-DB46-11CF-B4D1-00805F6CBBEA}
formattype: FORMAT_MPEG2_VIDEO {E06D80E3-DB46-11CF-B4D1-00805F6CBBEA}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 136

VIDEOINFOHEADER:
rcSource: (0,0)-(0,0)
rcTarget: (0,0)-(0,0)
dwBitRate: 0
dwBitErrorRate: 0
AvgTimePerFrame: 333667

VIDEOINFOHEADER2:
dwInterlaceFlags: 0x00000000
dwCopyProtectFlags: 0x00000000
dwPictAspectRatioX: 0
dwPictAspectRatioY: 0
dwControlFlags: 0x00000000
dwReserved2: 0x00000000

MPEG2VIDEOINFO:
dwStartTimeCode: 0
cbSequenceHeader: 0
dwProfile: 0x00000000
dwLevel: 0x00000000
dwFlags: 0x00000000

BITMAPINFOHEADER:
biSize: 0
biWidth: 720
biHeight: 480
biPlanes: 0
biBitCount: 0
biCompression: 0
biSizeImage: 0
biXPelsPerMeter: 0
biYPelsPerMeter: 0
biClrUsed: 0
biClrImportant: 0

pbFormat:
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0020: 00 00 00 00 00 00 00 00 63 17 05 00 00 00 00 00 ........c.......
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0040: 00 00 00 00 00 00 00 00 00 00 00 00 d0 02 00 00 ............Ð...
0050: e0 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 à...............
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0080: 00 00 00 00|00 00 00 00 ........

- Enumerated media type 0:

Audio: WAVE_FORMAT_EXTENSIBLE 48000Hz 6ch 4608Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 6
nSamplesPerSec: 48000
nAvgBytesPerSec: 576000
nBlockAlign: 12
wBitsPerSample: 16
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 16
dwChannelMask: 0x0000003f
SubFormat: {00000001-0000-0010-8000-00AA00389B71}

pbFormat:
0000: fe ff 06 00 80 bb 00 00 00 ca 08 00 0c 00 10 00 þÿ..€»...Ê......
0010: 16 00 10 00 3f 00 00 00 01 00 00 00 00 00 10 00 ....?...........
0020: 80 00 00 aa 00 38 9b 71 €..ª.8›q





For about 6 months ago I wrote (in the eac3to thread) about a problem I had playing back Sum Of All Fears (AVC, TrueHD->FLAC) . In short the mkv refused to start if I used ffdshow (libav) for FLAC decoding. And the lenght of the movie was not shown in WMP

If I skip forward it starts and lenght is shown.
(and if I use madFlac it starts right away)


Now as I can't use madFlac for FLAC anymore (because I started using Cyberlink MPEG2 decoder) I tested my whole collection for titles not starting.

I found a few and after analysing one of them I think I know why they are not starting.

If the FLAC track is 1 second+ shorter than video the file will not play when using ffdshow for FLAC decoding.

The strange thing is that it does not matter if I cut the end of the final mkv (to even out the lenghts of the tracks).

Does madFlac use a diffrent method to report track length than ffdshow?


You asked me about a sample back then as it might had something to do with eac3to. I was then not able to cut a sample where it could be reproduced but now I have.

www.earselect.se/test.mkv


3 movies of 509 suffers from this. And I know it has nothing to do with madFlac (or eac3to) but as you're the master of FLAC you might see something strange with this clip.

K1ngp1ng
20th July 2008, 16:10
an option to output lpcm big-endian (for powerdvd decoder) would be great.

deathlord
20th July 2008, 18:13
an option to output lpcm big-endian (for powerdvd decoder) would be great.

You think the PowerDVD decoder would do dolby pro logic IIx on multi channel pcm this way? Do you know a working graph, by any chance? Ac3 is no problem, but I can't make lpcm work.

K1ngp1ng
20th July 2008, 18:48
ac3: ac3filter->ffdshow->powerdvd
dts: ffdshow->powerdvd
flac: madflac->ac3filter->ffdshow->powerdvd (ac3filter is necessary for some reason)

i don't have lpcm. but maybe it works like that:
lpcm: ac3filter->ffdshow->powerdvd

for flac 6.1 i have to enable 5.1 downmix in madflac.
if madflac could output big-endian or at least would have an option to downmix 6.1 but not 7.1, it would be nice.

deathlord
26th July 2008, 15:22
Thanks. Now graphedit no longer crashes and I even get a signal!
Unfortunately the decoder does no upmix. The resulting signal is still 5.1. When used in PowerDVD it can upmix i.e. lpcm from 5.1 to 7.1, so there has to be a way.
Any ideas?

ac3: ac3filter->ffdshow->powerdvd
dts: ffdshow->powerdvd
flac: madflac->ac3filter->ffdshow->powerdvd (ac3filter is necessary for some reason)

i don't have lpcm. but maybe it works like that:
lpcm: ac3filter->ffdshow->powerdvd

for flac 6.1 i have to enable 5.1 downmix in madflac.
if madflac could output big-endian or at least would have an option to downmix 6.1 but not 7.1, it would be nice.

K1ngp1ng
26th July 2008, 15:57
open powerdvd audio decoder and select "8 channel", "pl2x movie" and "quiet environment".

deathlord
27th July 2008, 13:05
Yes, that's what I've done, but it will still only play 5.1 with flac as source. Id does produce 7.1 with ac3 as source.

K1ngp1ng
27th July 2008, 18:30
pin info of audio renderer says only 6ch? and what about dts?
i also use swap channels function in ffdshow - but that's it. i have no idea why it doesn't work for you.

front left -> front left
front center -> front right
front right -> front center
side left -> side left
side right -> side right
back left -> LFE
back center -> back right
back right -> back left
LFE -> back center

deathlord
27th July 2008, 19:32
No, it says 8 channels. Two of them are just always zero with flac. Dts works correctly. Enabling "swap channels" doesn't help either...

Mercury_22
22nd August 2008, 16:53
When Delphi supports native 64bit compiling, there's still the problem that the DirectShow base classes I'm using would have to be updated to 64bit, too, before I can even start thinking about a 64bit madFlac. So there's no hope to get madFlac 64bit anytime soon.

Still NO HOPE for 64-bit version ? :( Please ! :helpful:

:thanks:

flyingernst
12th October 2008, 21:35
1) can´t play 6.1 flacs with MPC-HC and MadFlac Decoder prefered (FLAC in ffdshow deactivated):

http://img385.imageshack.us/img385/6459/84013286zx2.th.jpg (http://img385.imageshack.us/my.php?image=84013286zx2.jpg)http://img385.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)

upside: 6.1 in MPC-HC with madflac prefered (not playing)
downside: 5.1 in MPC with madflac in MPC-HC (playing) same file, other audio

2) without remapping in MPC-HC
-5.1 Files get played through backsurrounds instead of surrounds
-7.1 Files get played with swapped channels
...but like you said this seems to be a problem with the Ati 48XX.


Greetings, Michael

PS: PowerDVD had that problem too, but now at least 5.1 Sources are running in PowerDVD in the right channels (with 5.1 and 7.1 setting in Realtek Driver), sadly I don´t have 7.1 m2ts files anymore. The realtek Channel test runs without problems. 5.1 HD-WMVs get played with swapped channel-mapping in MP11-HC...in MPC-HC after remapping not any more

madshi
12th October 2008, 22:02
1) can´t play 6.1 flacs with MPC-HC and MadFlac Decoder prefered (FLAC in ffdshow deactivated)
Try different audio renderers. madFlac correctly reports and outputs 7 channels (6.1). If the audio renderer doesn't accept that format, that's not my fault. Of course I could add an option to upconvert to 7.1 on the fly in madFlac. Actually that's already on my to do list.

flyingernst
12th October 2008, 22:51
ok, nice thanks

JustABDFan
18th October 2008, 00:39
Are you considering adding realtime downmixing also? like 7.1->5.1 or even 7.1->2.0 for those limited to stereo (laptops for example).

DJ_Phatic
24th November 2008, 09:56
I cant seem to get this to work in Vista64. Fresh install of vista UAC disabled, I run install.bat it says it has been registered successfully but when I load up a file containing flac it doesnt find the filter.

Checking for the filter manual in MPC-HC it is not listed either.

Any ideas how I can get this to work?

deathlord
24th November 2008, 10:18
Make sure the files are stored on a local harddisk before you execute them, rather than somwhere on the network. This has caused the exact same problem for me once.

DJ_Phatic
24th November 2008, 10:43
yes, they are on my C: in a folder called madflac.

madshi
24th November 2008, 10:47
Make sure you adjust NTFS security settings so that your user (or "Everyone") can read/execute the files.

DJ_Phatic
24th November 2008, 14:41
it seems that my problem was with mpc-hc 64bit. Tried the 32-bit version and it worked straight away.

Thanks for help.

madshi
24th November 2008, 16:02
Well, a 64bit process cannot load 32bit DirectShow filters. It's as easy as that.

yesgrey
3rd December 2008, 11:46
madshi,
Is it possible for you to add 32bit output in madFlac whatever is the source bit depth? a registry key for selecting it would be good enough for me. If it's not a very hard work...
Some sound card drivers (like mine, RME) do not support 24 bit communication modes, only support 16 bit and 32 bit, so, the only way of listening 24 bit files is feeding the drivers the 24 bit files as 32 bit with the 24 bits being the MSB.
Currently, I have to use ffdshow to change the output depth to 32 bit, but if it's not too hard for you I think it would be better sticking with just one filter...

madshi
3rd December 2008, 11:54
To be honest, I'm not sure about all the various wishes of what madFlac should do. Some want upconversion, others downconversion. But what madFlac really is all about is just decoding. Of course I could add 32bit PCM output, 6.1 -> 5.1 downconversion (with proper mixing and maybe even a phase change), 5.1 -> 7.1 upconversion etc etc. But wouldn't it make more sense to use a separate processing filter for such stuff?

My thinking is this: There should be various decoder filters. And there should be one or more processing filters. Why should every decoder reinvent the wheel and implement all those processing options, when there are already (free!) processing filters out there which already do all the necessary work? What sense does it make to have separate up/downconversion functionality in every decoder filter?

I was already thinking about writing a "madProcessing" filter or something like that and put all processing stuff in there. Such a filter could then be used not only for madFlac, but for other decoders, too. Investing the time to implement processing into madFlac just doesn't seem right to me, because whatever funky processing algorithms I add are then limited to madFlac and can't be used with any other decoder. But then I thought: Why should I do a "madProcessing" filter, if there already exists ffdshow which does most of what is needed?

clsid
3rd December 2008, 14:32
The problem with using processing filters (like ffdshow) is that you either let them load always, or never. I for example only have stereo headphones. Why would I want to process MP3 audio that is already stereo? But I would want to process FLAC 5.1 audio, to convert it to 2.0. I agree that all kind of funky processing stuff doesn't belong in your filter. But a basic speaker config selection would be very useful. And since FLAC can be 24bit, selecting the supported bitdepths (16/24/32) of the audio renderer would be nice as well.

madshi
3rd December 2008, 15:11
Why would I want to process MP3 audio that is already stereo?
Shouldn't a "good" processing filter pass the audio data through without any modification (= harm), if input and output parameters are identical? If you e.g. always add the ffdShow raw audio processor to your playback chain and set it to 2.0 output, would that do any harm to 2.0 sources? Would there be any difference between having it in the chain or not?

I'm just still not sure what is the right approach here. I mean downmixing to 2.0 is not too easy, especially if you want to do the phase change that the standard Dolby II downmixing matrix asks for.

clsid
3rd December 2008, 15:40
Sure, it probably won't have an effect on performance. But not everyone uses ffdshow or similar processing filters. So it would still be useful if madflac could do it by itself.

73ChargerFan
4th December 2008, 00:13
madshi,
Is it possible for you to add 32bit output in madFlac whatever is the source bit depth?
IANAP, but could it check the device capabilities of the next module in the audio chain, and make a decision based upon that & source info? If src bitrate isn't supported, then upscale if possible, otherwise downscale.

Also, doesn't AC3Filter also have audio processing features?

:helpful:

yesgrey
4th December 2008, 13:42
madshi,
I agree with your view about this. When we have ffdshow it seems to be a lost of resources using your time to mimic options that already are created and working good with other filters. I requested the 32bit pcm mode only because it's a drivers limitation in some sound cards. I know the right path would be the drivers allowing 24 bit connection modes, but it seems some sound card makers avoid it because the PCI bus prefers connections in multiples of Bytes (2B or 4B). Some people don't know this, and so cannot listen to 24 bit source files. I needed a year (yes, it's correct) to learn this about my sound card. I asked about it in the support foruns and no one answered me. Only recently I discovered this reading one thread in the support forum. After that, I read the user's guide and saw that it was there the driver support of 16 bit and 32 bit (as 2B and 4B), but hard to find to a casual reader.
The upconversion/downconversion/resampling and other kind of stuff I don't feel that should be in the decoder.
For example, DScaler5 audio decoder have some of that options, and I confess it's nice, but it's not essential. The 32 bit output, I believe it is, because if not available, and people don't know how to use ffdshow, they cannot listen to 24 bit sound files in kmixer free mode, because the sound card only give silence.
As I told, I currently use ffdshow to give me 32 bit PCM, and it's bit perfect, I have confirmed it. Just thinking that this could be a very simple thing to add...

Roscoe62
9th December 2008, 05:40
Hi Madshi,

I don't know why, but my Vipre virus/anti-spyware software has recently (as in - over the last few days) latched onto your MadFlac InstallFilter.exe and insists it's a Trojan-Dropper.Delphi.Gen Scanner program. I don't know why it's only just started doing this but it's more than a little annoying.

They can be contacted at sunbeltsoftware.com but, is there any way I can help you with this one? I'd love it if they just called off the dogs!

madshi
9th December 2008, 09:37
Argh, please report this as a false alarm to your anti virus company, so that they can fix it. Which company is that, btw?

Roscoe62
10th December 2008, 08:28
The company is Sunbelt Software - the makers of Counterspy - although this product is Vipre.

It did another scan today and it seemed OK, but if it shows up again I'll contact them.

Thunderbolt8
13th January 2009, 22:00
got a question regarding audio setup: I have a new soundcard and when I now play 5.1 (or higher) FLAC stuff via madflac, then mpc/ffdshow/madflac are using all 6 channels, althoug I only have a 2 speaker setup. my old soundcard onboard instead obviously directed all 6 channels then to left & right channels automatically, but my new one doesnt do it any more (I checkmarked 2 speaker setup everywhere I could, windows, soundcard, ffdshow installation).

now, when I add ac3 filter to it and specify output as 2/0 with rate "as is" and format "pcm 24bit" it works that all flac sound is directed as well to left and right channel. but now Im not sure if the final output sound is still completely lossless. how does it work, madflac sends lossless 5.1 PCM to ac3 filter and ac3 filter then just distributes that lossless PCM to left and right channel? so in that case the final output would still be lossless?

madshi
13th January 2009, 22:08
how does it work, madflac sends lossless 5.1 PCM to ac3 filter and ac3 filter then just distributes that lossless PCM to left and right channel?
I don't know what ac3filter does.

clsid
13th January 2009, 22:44
It mixes the 5.1 to 2.0. Your old soundcard did something similar. Whether this operation can be called lossless is debatable.

Thunderbolt8
14th January 2009, 01:27
in how far?

deathlord
14th January 2009, 10:01
Well, I am pretty sure it is not possible to get the original data back from the downsampled 2 channels. So it is not lossless. Apart from that, when you play that 2 channel track, you will obviously not get the same room information as with 6 channels, there is a (huge!) loss in that sense, too.
However, I would not be too worried about that. As long as you are only interested in stereo. AC3filter's downmix should be just fine.

spectrvm
16th January 2009, 15:15
... I was already thinking about writing a "madProcessing" filter or something like that and put all processing stuff in there. Such a filter could then be used not only for madFlac, but for other decoders, too. Investing the time to implement processing into madFlac just doesn't seem right to me, because whatever funky processing algorithms I add are then limited to madFlac and can't be used with any other decoder. But then I thought: Why should I do a "madProcessing" filter, if there already exists ffdshow which does most of what is needed?

I totally agree on this one ... this is the way to go, everything minimal and clearly targeted at what it should do. To reinvent the wheel in every codec is a waste of time for you and is one more thing to check at the full Windows media mess.

Whenever you have the time and resources (if that ever be) a stand-alone upconversion/downconversion filter would be greatly appreciated by many !

thanks for your time !

Thunderbolt8
20th January 2009, 18:04
Well, I am pretty sure it is not possible to get the original data back from the downsampled 2 channels. So it is not lossless. Apart from that, when you play that 2 channel track, you will obviously not get the same room information as with 6 channels, there is a (huge!) loss in that sense, too.
However, I would not be too worried about that. As long as you are only interested in stereo. AC3filter's downmix should be just fine.
what would be when I use ac3 filter additionally then to madflac with 5.1 files, just because of the additional +db output function? isnt all the 5.1 sound decoded to pcm via madflac and then sent to ac3 filter and from there outputed as 5.1 again? so would it be still completely lossless in that case, aside from the increased volume applied by ac3filter?

Rectal Prolapse
20th January 2009, 18:24
Thunderbolt8, maybe if you turn off Dynamic Range in AC3Filter it will prevent processing of the PCM data?

Thunderbolt8
23rd January 2009, 04:38
DRC is not enabled. but at mixer options, there are fields like auto gain control, auto matrix with normalize matrix, voice control and expand stereo checkmarked by default. is this adviseable?

btw. the displayed chains for 2.0 and 5.1 tracks are (copy & pasted the displayed info, whatever it means :S):

(PCM24 3/2.1 (5.1) 48000) -> Processor -> (PCM24 2/0 (stereo) 48000) -> Dejitter -> (PCM24 2/0 (stereo) 48000)


(PCM24 3/2.1 (5.1) 48000) -> PCM->Linear converter -> (Linear PCM 3/2.1 (5.1) 48000) -> Input levels -> (Linear PCM 3/2.1 (5.1) 48000) -> Mixer -> (Linear PCM 2/0 (stereo) 48000) -> Equalizer -> (Linear PCM 2/0 (stereo) 48000) -> SRC -> (Linear PCM 2/0 (stereo) 48000) -> Bass redirection -> (Linear PCM 2/0 (stereo) 48000) -> Dither -> (Linear PCM 2/0 (stereo) 48000) -> AGC -> (Linear PCM 2/0 (stereo) 48000) -> Delay -> (Linear PCM 2/0 (stereo) 48000) -> Spectrum -> (Linear PCM 2/0 (stereo) 48000) -> Output levels -> (Linear PCM 2/0 (stereo) 48000) -> Linear->PCM converter -> (PCM24 2/0 (stereo) 48000)

Rectal Prolapse
26th January 2009, 18:38
I'd definitely leave auto gain control unchecked - but I don't know about the others - guess you'll have to experiment.

deathlord
26th January 2009, 18:55
I agree. But just forget the idea of a lossless downmix, that's a contradiction in itself. Maybe there are better and worse downmixes, maybe even one of them is best. But none of them is lossless.
You should let your personal taste decide which you like most. Just my opinion...

mikelebron
27th January 2009, 20:09
Actually, (Im not in front of my home PC) you can just turn off PCM for ac3Filter but leave it on for DTS and AC3.. I find ac3filter to be a much better audio renderer then ffdshow.. BUT I can admit I have limited experience with ffdshow outside of video... soo.. I am biased at this point..

ac3filter I would say is a direct competitor of ffdshow in the ac3/dts/pcm world.. it does not support any of the HD content.. It also does not support 7 or 8 channels..

Take a look... this actually spawned some interest.. Im going to try ffdshow next time im at my PC and playing with some downmixing.. http://ac3filter.net/projects/ac3filter

Thunderbolt8, maybe if you turn off Dynamic Range in AC3Filter it will prevent processing of the PCM data?

clsid
6th February 2009, 21:03
Small bug:
When unregistering the filter, it leaves a registry key behind.
HKEY_CLASSES_ROOT\CLSID\{D26B55F2-8137-4916-9761-B5D415D25768}

Thunderbolt8
10th February 2009, 01:18
madshi, are 192kHz (5.1 channel) files not supported by madflac? tried to play the 5.1 192kHz flac track from the akira blu-ray (truehd), but got a mkx message: "a decoder for the new track could not be found. track type: flac, 192000Hz, 6ch"

do you need a sample (which size; flac or TrueHD source?)

honai
15th February 2009, 20:23
Perhaps a bug: When decoding a 5.1 24bit FLAC with madFlac, AC3Filter will not accept the stream as input (I use AC3Filter to downmix to stereo, don't have 5.1 speaker set at the moment). With 16bit tracks it works.

Thunderbolt8
15th February 2009, 21:43
hm I always use madflac & ac3filter for the same purpose, but for me it works fine so far when choosing 2/0 as output (if thats the same you are hinting at).

deathlord
16th February 2009, 08:52
I don't think this is a bug, as madflac works fine with 24bit input.I could be your soundcard not supporting 24 bit, e.g. rme cards in kernel streaming mode behave like this. In this case you can use ffdshow audio processor to upscale the audio data to 32 bit, this should work.

madshi
16th February 2009, 09:41
Small bug:
When unregistering the filter, it leaves a registry key behind.
HKEY_CLASSES_ROOT\CLSID\{D26B55F2-8137-4916-9761-B5D415D25768}
Oooops. Thanks for reporting.

madshi, are 192kHz (5.1 channel) files not supported by madflac? tried to play the 5.1 192kHz flac track from the akira blu-ray (truehd), but got a mkx message: "a decoder for the new track could not be found. track type: flac, 192000Hz, 6ch"

do you need a sample (which size; flac or TrueHD source?)
madFlac supports 192khz just fine. But the audio renderers usually don't. So you may have to downsample in order to play it. Or try to find an audio renderer which supports 192khz playback.

honai
16th February 2009, 10:53
I could be your soundcard not supporting 24 bit, e.g. rme cards in kernel streaming mode behave like this.

No, the soundcard supports 24bit just fine, and when madFlac decodes the 24bit track I do get sound. The problem is that I want AC3Filter to intercept the 24bit output, and while it works for 16bit output from madFlac it does not work for 24bit output from madFlac.

clsid
16th February 2009, 13:21
Then AC3Filter probably does not accept 24bit input.

madshi
16th February 2009, 13:24
It might have to do with the mediatype used by eac3to. E.g. WAVE_FORMAT_PCM <-> WAVE_FORMAT_EXTENSIBLE. But if AC3filter accepts madFlac input for 16bit, then I don't understand why it shouldn't accept 24bit input, since madFlac does not use different mediatype infos for different bitdepths...

honai
16th February 2009, 15:34
Then AC3Filter probably does not accept 24bit input.

That may be the case.

What other options are there to downmix 24bit 5.1 to 2.0? If I recall correctly, ffdshow Audio does only 16bit internally.

Or madshi might include it in the filter ... :rolleyes:

clsid
16th February 2009, 16:19
It can do audio processing in 16 and 32 bit afaik. I don't know what it choses for 24-bit input. You would need to ask Albain about that.

Thunderbolt8
16th February 2009, 17:29
theres that 'format' field in output in the first tab where you can enter PCM 24-bit. isnt that whats needed?

honai
16th February 2009, 18:13
theres that 'format' field in output in the first tab where you can enter PCM 24-bit. isnt that whats needed?

No, that's for the *output* of AC3Filter (hence the name). I want AC3Filter to support 24bit as *input*, i.e. the output of MadFlac is 24bit, and I want to use AC3Filter to downsample that to 24bit 2.0 channels.

Thunderbolt8
17th February 2009, 00:35
Oooops. Thanks for reporting.


madFlac supports 192khz just fine. But the audio renderers usually don't. So you may have to downsample in order to play it. Or try to find an audio renderer which supports 192khz playback.I dont know what or where the audio renderer here is in this case. I tried to play it with madflac + ac3filter and then with madflac alone, but it didnt work in both cases. I only have madflac checkmarked in mpc as my only audio filter, so actually it should then work, since it is said to support it?

No, that's for the *output* of AC3Filter (hence the name). I want AC3Filter to support 24bit as *input*, i.e. the output of MadFlac is 24bit, and I want to use AC3Filter to downsample that to 24bit 2.0 channels.
where can you see that ac3filter doesnt accept 24-bit input?

Snowknight26
17th February 2009, 01:31
Nope, that's not possible because madFlac was written in Delphi and Delphi doesn't support native 64bit compiling yet.

Has that changed in the last year? :p

73ChargerFan
17th February 2009, 02:16
The article "The Future of the Delphi Compiler" (http://dn.codegear.com/article/39174) says to expect a preview release of their 64-bit compiler mid 2009.

Free Pascal (http://en.wikipedia.org/wiki/Free_Pascal) is Delphi compatible and can target Win64.

honai
17th February 2009, 11:23
where can you see that ac3filter doesnt accept 24-bit input?

Well, the 24bit FLAC I'm playing (as an audio track inside an MKV) is correctly decoded by madFlac, but even though AC3Filter is set to connect to PCM streams in this case it's not connecting and thus doesn't show up in the filter chain of MPC-HC. For 16bit FLAC it works, i.e. madFlac decodes and AC3Filter connects and downmixes to 2.0 just as intended.

shambles
17th February 2009, 12:22
madflac -> ac3filter works fine for me with 24bit tracks :confused: the only thing it doesn't accept is tracks with more than 6 channels

honai
17th February 2009, 13:42
I have a number of 24bit 5.1 FLAC tracks from eac3to muxed into MKV with mkvmerge, none of them connect to AC3Filter after decoding with madFlac (but 16bit 5.1 FLAC tracks do connect).

Perhaps there is a bug after all.

Thunderbolt8
17th February 2009, 14:21
Well, the 24bit FLAC I'm playing (as an audio track inside an MKV) is correctly decoded by madFlac, but even though AC3Filter is set to connect to PCM streams in this case it's not connecting and thus doesn't show up in the filter chain of MPC-HC. For 16bit FLAC it works, i.e. madFlac decodes and AC3Filter connects and downmixes to 2.0 just as intended.
did you set ac3filter on prefer as well? sometimes, if not, its overwritten by other filters then, even though they are not added to the use list at all. in such a case add them then and set those to block, while setting ac3filter to prefer as well

honai
17th February 2009, 14:26
That's irrelevant. As I wrote several times, the chain [source] -> [madFlac] -> [AC3Filter] works for 16bit FLAC tracks, just not for 24bit FLAC tracks. Why would filter merit make a difference for different bit-depths?

Thunderbolt8
17th February 2009, 22:40
so what does exactly happen when it doesnt work the way you described? does the file not play at all?

honai
18th February 2009, 10:33
Perhaps you missed the initial point.

Of course it does play, but I want AC3Filter to be in the filter chain after madFlac because currently I only have a 2.0 setup and therefore need to downmix 5.1 to 2.0, and since madFlac can't do any downmixing ... :)

hubblec4
18th February 2009, 18:01
some questions...

in your dsfilter madflac.ax: i can enable 5.1 channels only. it will downmix the 2 surround-channels into 5.1? or i lose the 2channels?

when i lose the 2subchannels is it possible to create an option to downmix the 2 subchannels??

hubble

Mark_A_W
20th February 2009, 13:04
That may be the case.

What other options are there to downmix 24bit 5.1 to 2.0? If I recall correctly, ffdshow Audio does only 16bit internally.

Or madshi might include it in the filter ... :rolleyes:

I believe the 16 bit limitation of ffdshow only affects ffdshow FLAC decoding.

My filter path is Madflac->ffdshow audio, upconvert to 32bit->Reclock using Kernel Streaming (needs 32bit for soundcard drivers, 24bit doesn't work).

From my testing ffdshow does pass/process 24bit uncompressed without loss.

Wag
22nd February 2009, 03:28
Getting a false positive on the Madflac 1.8 posted here on Vista64, AVG AntiVirus- "Win32.Trojan-Dropper.Delf"

nautilus7
22nd February 2009, 03:32
Report that to AVG if you want it to get fixed.

madshi
22nd February 2009, 07:14
Yeah, please report it to AVG, thanks!

Mike5
25th March 2009, 15:10
I came across MadFlac surfing the web and finally managed to play multichannel FLAC (5.1) with a DirectShow player.

Previously, with other Flac source/decoders I couldn't (MPC-HC, ZP e WMP11 crashed) and was forced to use Foobar, loosing the DirectShow flexibility (for example I couldn't reencode in AC3 for S/PDIF passthrough).

Now I can play multichannel 96/24 FLAC with MPC-HC, ZP6 and even with the awful WMP11.

So, many thanks and congratulations for your valuable work.:thanks:

leeperry
1st April 2009, 03:07
here's a 24/96 sample that works fine in winamp and give garbage in madflac 1.8 :
http://www.megaupload.com/?d=LYMN7DI4

I extracted it from an original DVD-A w/ DVDA-Explorer, the WAV file is fine, I've also tried to encode it in "level 8" w/ the official FLAC GUI(flac 1.21)...it also gave garbled audio in madflac.

OTOH I've got some other 24/96 FLAC files that work fine in madflac...WavPack it is then :o

I could have tried ffdshow's FLAC decoder if it had been possible to use madflac's source filter w/ an external decoder..

Mike5
1st April 2009, 10:17
Tried the sample:

- ZP6 with MadFlac: it stop after 11 seconds with the timebar blinking; no error reported.

- MPC-HC with MadFlac: it stops after 11 seconds; no error reported.

- ZP6 with Illiminable Flac: ZP crashes.

- MPC-HC with Illiminable Flac: it stops after 11 seconds; no error reported.

- FooBar: it stops after 11 seconds giving this error:
Decoding failure at 0:11.861 (Unsupported format or corrupted file).

Don't have Winamp.

So i guess there must be something wrong in the sample at the 11th second.

leeperry
1st April 2009, 10:58
well it's been cut you know, I wasn't gonna upload a 300mb sample :)

when I play it in MPC using madflac I get garbled audio...you get perfect audio :confused:

some other 24/96 FLAC work perfectly fine..

EDIT: apparently it's ffdshow audio that's at fault :confused:

keep ffdshow audio forced by checking "all supported" and you get garbage, at least I do.

some big/small endian story maybe? but all my other 24/96 FLAC work fine, and WavPack 24/96 on that wav file works fine too :o

Mike5
1st April 2009, 11:28
Sorry, I didn't realize the ratio between size and duration in a FLAC 24/96.

Anyway the 11 seconds available play fine on any combination.

I tried to add ffdshow audio to the graph in MPC-HC, setting uncompressed = all supported. It plays fine. I checked ffdshow is used in Filters and, to be utterly sure I checked Resample to 48000 Hz in ffshow audio. Now, in Filters / ffdshow Audio / Pin Info, I get:
IN: nSamplesPerSec: 96000
OUT: nSamplesPerSec: 48000

that should mean ffdshow works.

tebasuna51
1st April 2009, 11:42
Using flac.exe there are also a error:
flac.exe -d 96000.flac

flac 1.2.1, Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.

96000.flac: 5% complete

96000.flac: ERROR while decoding data
state = FLAC__STREAM_DECODER_END_OF_STREAM

Or your file is corrupt or is a encoder problem (is not a decoder problem)

EDIT: Sorry, I don't read in this page 18

"well it's been cut you know, I wasn't gonna upload a 300mb sample "

Then we can't test a cut flac.

leeperry
1st April 2009, 11:53
my file is not corrupt, I didn't bother cutting a 3" from the WAV file and prefered to cut it afterwards...oh well, my other 24/96 FLAC work fine in madflac and compressing this file to WavPack works fine too, I guess I didn't even need to mention it here..

clearly ffdshow is the problem, as sound is fine if I disable it and only use madflac :confused:

@Mike5 : MPC HC has its own FLAC decoder I think, is it really using madflac? no matter what I do(16/24/32 float output) ffdshow(latest ICL10 build from xvidvideo.ru) still outputs garbage :o

Mike5
1st April 2009, 12:43
I'm sure I use madflac because:

- I use Beliyaal MPC-HC 22 and have disabled both Source Filter and Flac Transform Filter in Internal Filters

- I set Codecs / Flac to disabled in ffdshow audio

- If I go in Filters / madFlac / Pin Info I get:

Filter : madFlac Source - CLSID : {C52908F0-1C06-4C0D-A4CD-3D10EA51C757}

- Connected to:
CLSID: {0F40E1E5-4F79-4988-B1A9-CC98794E6B55}
Filter: ffdshow Audio Decoder
Pin: In

- Connection media type:
Audio: WAVE_FORMAT_EXTENSIBLE 96000Hz 6ch 13824Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 6
nSamplesPerSec: 96000
nAvgBytesPerSec: 1728000
nBlockAlign: 18
wBitsPerSample: 24
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 24
dwChannelMask: 0x0000003f
SubFormat: {00000001-0000-0010-8000-00AA00389B71}

So the stream is already decodec when outputs madFlac.

Mike5
1st April 2009, 12:58
Wait, reading again the output I posted above I realized this is a 6 channels audio and managed to get what you call garbled audio (new word form me in english).

If I tick Mixer in ffdshow audio and set Output speaker configuration to 2/0/0 - stereo, I get a confused superposition of the six channels that sounds like a static plus some scattered gongs.

If this is your problem, set Mixer to 3/0/2 - 5 channels or simply untick Mixer and it should play fine.

leeperry
1st April 2009, 13:18
whatever I pick in the mixer, I still get saturated static....even if I uncheck all the filters in ffdshow audio.

doesn't occur w/ other 24/96 FLAC files or the same exact wave file encoded to WavPack, oh well that will remain a mistery I guess :D

leoliver
3rd April 2009, 04:55
Hi Everyone,

I recently installed Madflac on my Win XP Pro Sp3 computer , and it worked flawlessly when playing flac files on WMP 11.
Now I have a friend who wants to convert his WMA files to flac and play them back on his Windows XP Media Center Edition computer , with WMP 11. He successfully encoded some files to flac , and then installed Madflac, but then he phoned and told me that his flac files won't play with Madflac on his Windows XP Media Center Edition .
I'm going to his home tomorrow to look at his computer, but first I wanted to ask if Madflac will work on a Windows XP Media Center Edition system ? And if so , what other issues could cause flac play back problems on a Windows XP Media Center Edition computer ?
Thanks.

leeperry
3rd April 2009, 21:03
If this is your problem, set Mixer to 3/0/2 - 5 channels or simply untick Mixer and it should play fine.
ok thanks for your help! but can you try my sample in WaveOut please?

I've run more tests. If I completely reset ffdshow and force it for uncompressed audio and use MPC Classic, I get garbage in WaveOut w/ some 24/96 FLAC in madflac...but not in DS :o

for the record, I've got an M-Audio Audiophile USB on XP SP3...what's weird is that it works perfectly fine w/ MPC HC's FLAC decoder in WaveOut..

too bad ffdshow's "number of channels" detection works fine w/ madflac/wavpack DS decoders but not w/ MPC HC's decoder...and my MME drivers being bit-perfect there's no chance I'm gonna go WDM :D

gotta love HTPC's, it takes a lot of trial & error :devil:

Mike5
4th April 2009, 17:20
Ok, these are my tests:

MPC-HC / madFlac / ffdshow / WaveOut
The sound is severely disturbed, like in your setting. I have the full Beatles Love in multichannel FLAC and tried
other songs for a longer period: they are all disturbed, even though "While my Guitar..." is perhaps the worst.
It doesn't happen with DirectSound
It doesn't happen if ffdshow is not in the graph.

Other 6 channels 48KHz 24 bit or two channels FLAC that I tried play fine with these settings.

MPC-HC / MPC-HC FLAC source/filter / ffdshow / WaveOut
The sound is fine, but I noticed that in the FLAC filter properties Output sample format is set to 16 bit. If I set it
to 24 bit the sound becomes much softer and a sort of echo appears.

MPC-HC / MPC-HC FLAC source/filter / WaveOut
If I remove ffdshow setting Uncompressed to disabled, on the contrary the sound is fine only if the FLAC filter is set
to 24 or 32 bit. If I set it to 16 bit there is no sound at all.

MPC-HC / madFlac / ffdshow or not ffdshow / Reclock set to WaveOut
If I choose Reclock as audio renderer and set "Audio interface to use for PCM sound to" WaveOut ... surprise surprise ...
the sound is perfect, ffdshow present or not. Reclock says: Audio stream: 96000 Hz, 6 channels, 24 bits PCM and Audio:
WaveOut (bit exact).

What conclusions ? Perhaps ffdshow doesn't cope well with WaveOut when the input is 96KHz 24bit. Even with the MPC-HC
decoder if ffdshow receives 96/24 there is a strange sound. It depends on the input of ffdshow, not the output, because
if I limit the output to 48/24 96/16 or 48/16 using resampler and output options nothing changes.

Perhaps when Reclock put itself in the middle between fffshow and WaveOut, it fixs the problem. See if Reclock solves
your problem. If it does, then we'll notify James that it is not only for video problems...:D

leeperry
4th April 2009, 18:28
ok thanks for the tests :)

well, the same exact file in WavPack 24/96 5.1 works fine w/ ffdshow, same for the plain multichannel WAV file :o

OK I'll try w/ Reclock, but then you need to add +500 ms delay in ffdshow to counterbalance Reclock's cache :rolleyes:

anyway I've never understood why FLAC got so big.....APE does higher compression for stereo, and WavPack for multichannel....FLAC is not the best in any field, and WavPack is also open source(APE is not)

leeperry
4th April 2009, 19:04
actually I forgot to say that I set MPC HC's decoder to 32float and ffdshow's output to 24 integer(using "light" noise shaping float>integer dithering conversion)

ok gonna try w/ Reclock, and I've asked James if he could make an audio-only Reclock wrapper...this would be great to get bit-perfect KS/WASAPI w/ any soundcard on any OS :devil:

Mike5
4th April 2009, 19:16
There are news.

All tests were done on XP SP3; now I tried on Windows 7 7048 and the same combination which gave distorted sound on XP gives perfect sound on Win 7:

MPC-HC /madFlac / ffdshow / WaveOut

It's definitely a mess:(

leeperry
4th April 2009, 19:26
haha :D

darn, you're right, w/ Reclock set to WaveOut it works fine w/ madflac..and says "96000 Hz, 6 channel(s), 24 bits PCM" :eek:

hopefully James will be OK to make a Reclock wrapper w/o cache, so everyone will get bit-perfect audio(KS/WASAPI) on whatever OS/app/game w/o a single glitch :cool:

maybe it's a small/big endian story :o

rica
4th April 2009, 22:12
here's a 24/96 sample that works fine in winamp and give garbage in madflac 1.8 :
http://www.megaupload.com/?d=LYMN7DI4

I extracted it from an original DVD-A w/ DVDA-Explorer, the WAV file is fine, I've also tried to encode it in "level 8" w/ the official FLAC GUI(flac 1.21)...it also gave garbled audio in madflac.

OTOH I've got some other 24/96 FLAC files that work fine in madflac...WavPack it is then :o

I could have tried ffdshow's FLAC decoder if it had been possible to use madflac's source filter w/ an external decoder..

Have a look at this and give it a go again:

http://forum.doom9.org/showthread.php?t=145251

leeperry
4th April 2009, 23:09
Have a look at this and give it a go again:

http://forum.doom9.org/showthread.php?t=145251
so you think that I got a bad case of watermarking or sumthing?! but how come it'd work w/ Reclock and not w/o...and work in DS but not WaveOut ?!

I also tried some 96/24 DTS in the PDVD9 decoder, and it gave garbled 48/16......sounds like something's fishy in ffdshow, or in the XP SP3 WaveOut routines :confused:

but it's true that I got other 24/96 FLAC that play just fine in madflac/ffdshow/waveout....OK I'll to try convert that DVD-A again tomorrow following your guide http://forum-images.hardware.fr/images/perso/sniperr.gif

PS:why do you advise to rip to MLP and then encode afterwards w/ eac3to....when you can directly use FLAC.exe in DVDAudioExplorer :confused: ..but OK, I'll try :)

rica
4th April 2009, 23:55
OK I'll to try convert that DVD-A again tomorrow following your guide http://forum-images.hardware.fr/images/perso/sniperr.gif


Up to you.

leeperry
5th April 2009, 23:52
well I didn't bother ripping that DVD-A again, considering I can actually just play it in that new freeware player(it forces ffdshow too, how cool is that :D) : https://forum.doom9.org/showthread.php?t=145660

but I've just used eac3to on a DTSHD 7.1 24/96 track from a HD-DVD, and it gives garbage in Waveout w/ madflac+ffdshow :o

anyway, I'm gonna associate .flac to a mplayerc-flac.exe(w/ its own read only .ini) that outputs to Reclock(through WaveOut) and a matching profile in ffdshow audio that adds +500ms delay...problem solved :)
thanks Mike5 for finding the solution, I owe you one! http://forum-images.hardware.fr/images/perso/menkahoure_7.gif

Mike5
6th April 2009, 13:03
You're welcome.;)

leeperry
6th April 2009, 18:08
You're welcome.;)
having second thoughts, the other advantage of Reclock is that it can force the media player to run in high priority....I seemed to be getting random glitches on 5.1 24/96 lossless because my HDD is too fragmented, talk about killing 2 bird w/ one stone :devil:

PS: oops it's also possible in MPC, need to add Priority=128 in its .ini file..

Mike5
7th April 2009, 08:32
Ther is also an option in Options / Player: Process priority above normal.

leeperry
7th April 2009, 10:30
yes, but that's not enough...128 is High Priority, seems to have fixed my random glitches on all my 5.1 24/96 lossless files :)

madshi
7th April 2009, 10:50
Hey guys,

I've lost track a bit of what's going on here. Can anybody explain to me whether this "waveout" problem is a bug in madFlac or not? And maybe a short summary of when the problem occurs exactly and when not might help.

Mike5
7th April 2009, 10:58
If you use this particular configuration:

MPC-HC / madFlac / ffdshow / WaveOut on XP SP3

audio sounds with a heavy distorsion.

It doesn' happen whenever you (any of these):

- use internal FLAC source/splitter;
- don't use ffdshow
- don't use WaveOut (but DirectSound)
- use Reclock set in WaveOut as audio renderer
- use Windows 7

Leeperry needs this particular configuration for some strange problems he has.

I hope I didn't miss anything

madshi
7th April 2009, 11:02
Thanks! Does it also occur on XPSP2?

Mike5
7th April 2009, 11:06
I missed:

If you use this configuration on a 96/24 multichannel flac like the sample given by leeperry. I tried a 48/24 multichannel and it doesn't happen.

I dont' have XP SP2 and dont' have Vista, so can't say.

VictorLS
7th April 2009, 11:30
Dear madshi.
Sorry I can't write private, so post my NEED HELP here.
We want to write universal (generating *.ax files) program which adaptate any registred DirectShow Filters (splitter with decoder). For example, Elecard Demultiplexor and Nero Video Decoder or and so on.
Help us, please. Forgive my poor English.
Best regards
Victor
PS. Is it possible to create one universal adaptor.ax which connect any splitter with any decoder? What do you think?

leeperry
7th April 2009, 11:54
Does it also occur on XPSP2?
for what it's worth, it also occurs w/ the PDVD9 Audio Decoder

I have to use WaveOut because my MME drivers are bit-perfect(also common on RME soundcards), but I only have this problem w/ "some"(not all) 5.1 24/96 FLAC files in madflac and any AC3/DTS file in PDVD9 Audio decoder...so it could be because of the WaveOut compatibility mode of XP SP3, or ffdshow acting funky? or PDVD9/madflac not initiliazing the "connection" properly ?!

using MPC HC's FLAC decoder fixes the problem altogether :o

madshi
7th April 2009, 12:21
We want to write universal (generating *.ax files) program which adaptate any registred DirectShow Filters (splitter with decoder). For example, Elecard Demultiplexor and Nero Video Decoder or and so on.
You can check out my Vc1Tweaker's source code here to get started:

http://madshi.net/Vc1Tweaker.rar

Is it possible to create one universal adaptor.ax which connect any splitter with any decoder?
Depends. You should be able to do that with all splitters/decoders which are known to you and which use the same data format. But there's no magic involved. You can't blindly connect anything to anything without knowing the filters involved.

Please no further discussion about this topic in this thread because it's out of topic here.

using MPC HC's FLAC decoder fixes the problem altogether :o
Sorry for the blunt question: But why don't you use the MPC HC FLAC decoder then and be happy? Not that I wanted to drive you away from madFlac, just wondering?

One thing that might be interesting: How does the connection media type look between madFlac <-> ffdshow compared to MPCHC <-> ffdshow? Is there a difference? If so, that might be the explanation why one behaves different compared to the other. Please post the connection information here for these two connections, please in "[ code ]" blocks. Thanks!

VictorLS
7th April 2009, 12:36
madshi thank you very much for reply.
Please no further discussion about this topic in this thread because it's out of topic here.
Of course.

leeperry
7th April 2009, 12:39
Sorry for the blunt question: But why don't you use the MPC HC FLAC decoder then and be happy? Not that I wanted to drive you away from madFlac, just wondering?

One thing that might be interesting: How does the connection media type look between madFlac <-> ffdshow compared to MPCHC <-> ffdshow? Is there a difference? If so, that might be the explanation why one behaves different compared to the other. Please post the connection information here for these two connections, please in "[ code ]" blocks. Thanks!
because I've got 2 profiles in ffdshow audio(one for stereo/one for 5.1)...and it works w/ madflac & the WavPack decoder but not w/ MPC HC's decoder & AC3Filter(I've filed a ticket on the ffdshow bug tracker).

also MPC HC's doesn't autoselect the output bit depth, it's fixed...not too handy when you have both 16/24 audio files, even if 32float is OK :o

this is madflac>waveout :

CLSID: {C52908F0-1C06-4C0D-A4CD-3D10EA51C757}
Filter: madFlac Source

- Connected to:

CLSID: {E30629D1-27E5-11CE-875D-00608CB78066}
Filter: M-Audio Audiophile
Pin: Audio Input pin (rendered)

- Connection media type:

Audio: WAVE_FORMAT_EXTENSIBLE 96000Hz 6ch 13824Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 6
nSamplesPerSec: 96000
nAvgBytesPerSec: 1728000
nBlockAlign: 18
wBitsPerSample: 24
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 24
dwChannelMask: 0x0000003f
SubFormat: {00000001-0000-0010-8000-00AA00389B71}

pbFormat:
0000: fe ff 06 00 00 77 01 00 00 5e 1a 00 12 00 18 00 þÿ...w...^......
0010: 16 00 18 00 3f 00 00 00 01 00 00 00 00 00 10 00 ....?...........
0020: 80 00 00 aa 00 38 9b 71 €..ª.8›q

- Enumerated media type 0:

Set as the current media type

- Enumerated media type 1:

Audio: PCM 96000Hz 6ch 13824Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 18

WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 6
nSamplesPerSec: 96000
nAvgBytesPerSec: 1728000
nBlockAlign: 18
wBitsPerSample: 24
cbSize: 0 (extra bytes)

pbFormat:
0000: 01 00 06 00 00 77 01 00 00 5e 1a 00 12 00 18 00 .....w...^......
0010: 00 00 ..



this is madflac>ffdshow>waveout :

CLSID: {C52908F0-1C06-4C0D-A4CD-3D10EA51C757}
Filter: madFlac Source

- Connected to:

CLSID: {0F40E1E5-4F79-4988-B1A9-CC98794E6B55}
Filter: ffdshow Audio Decoder
Pin: In

- Connection media type:

Audio: WAVE_FORMAT_EXTENSIBLE 96000Hz 6ch 13824Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 6
nSamplesPerSec: 96000
nAvgBytesPerSec: 1728000
nBlockAlign: 18
wBitsPerSample: 24
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 24
dwChannelMask: 0x0000003f
SubFormat: {00000001-0000-0010-8000-00AA00389B71}

pbFormat:
0000: fe ff 06 00 00 77 01 00 00 5e 1a 00 12 00 18 00 þÿ...w...^......
0010: 16 00 18 00 3f 00 00 00 01 00 00 00 00 00 10 00 ....?...........
0020: 80 00 00 aa 00 38 9b 71 €..ª.8›q

- Enumerated media type 0:

Set as the current media type

- Enumerated media type 1:

Audio: PCM 96000Hz 6ch 13824Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 18

WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 6
nSamplesPerSec: 96000
nAvgBytesPerSec: 1728000
nBlockAlign: 18
wBitsPerSample: 24
cbSize: 0 (extra bytes)

pbFormat:
0000: 01 00 06 00 00 77 01 00 00 5e 1a 00 12 00 18 00 .....w...^......
0010: 00 00 ..



this is MPC HC's decoder>waveout :

Filter : C:\96000.flac - CLSID : {1930D8FF-4739-4E42-9199-3B2EDEAA3BF2}

- Connected to:

CLSID: {3D446B6F-71DE-4437-BE15-8CE47174340F}
Filter: Flac Audio Decoder
Pin: In

- Connection media type:

Audio: FLAC 96000Hz 6ch 13824Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {1541C5C0-CDDF-477D-BC0A-86F8AE7F8354}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 18

WAVEFORMATEX:
wFormatTag: 0xf1ac
nChannels: 6
nSamplesPerSec: 96000
nAvgBytesPerSec: 1728000
nBlockAlign: 1
wBitsPerSample: 24
cbSize: 18 (extra bytes)

pbFormat:
0000: ac f1 06 00 00 77 01 00 00 5e 1a 00 01 00 18 00 –...w...^......
0010: 12 00 ..

- Enumerated media type 0:

Set as the current media type



this is MPC HC's FLAC decoder>ffdshow>waveout:

Filter : C:\96000.flac - CLSID : {1930D8FF-4739-4E42-9199-3B2EDEAA3BF2}

- Connected to:

CLSID: {3D446B6F-71DE-4437-BE15-8CE47174340F}
Filter: Flac Audio Decoder
Pin: In

- Connection media type:

Audio: FLAC 96000Hz 6ch 13824Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {1541C5C0-CDDF-477D-BC0A-86F8AE7F8354}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 18

WAVEFORMATEX:
wFormatTag: 0xf1ac
nChannels: 6
nSamplesPerSec: 96000
nAvgBytesPerSec: 1728000
nBlockAlign: 1
wBitsPerSample: 24
cbSize: 18 (extra bytes)

pbFormat:
0000: ac f1 06 00 00 77 01 00 00 5e 1a 00 01 00 18 00 –...w...^......
0010: 12 00 ..

- Enumerated media type 0:

Set as the current media type



:thanks:

madshi
7th April 2009, 13:41
You've posted the wrong connect infos for the MPC HC decoder. You posted the FLAC output, not the decoded PCM output. Could you please edit your post with the correct information?

leeperry
7th April 2009, 16:15
well I copied the pin infos for madflac, then for the MPC HC built-in FLAC decoder.

this is my audio renderer infos w/ MPC HC's decoder :

Filter : M-Audio Audiophile - CLSID : {E30629D1-27E5-11CE-875D-00608CB78066}

- Connected to:

CLSID: {3D446B6F-71DE-4437-BE15-8CE47174340F}
Filter: Flac Audio Decoder
Pin: Out

- Connection media type:

Audio: WAVE_FORMAT_EXTENSIBLE 96000Hz 6ch 13824Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 18
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 6
nSamplesPerSec: 96000
nAvgBytesPerSec: 1728000
nBlockAlign: 18
wBitsPerSample: 24
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 24
dwChannelMask: 0x0000003f
SubFormat: {00000001-0000-0010-8000-00AA00389B71}

pbFormat:
0000: fe ff 06 00 00 77 01 00 00 5e 1a 00 12 00 18 00 þÿ...w...^......
0010: 16 00 18 00 3f 00 00 00 01 00 00 00 00 00 10 00 ....?...........
0020: 80 00 00 aa 00 38 9b 71 €..ª.8›q

- Enumerated media type 0:

Audio

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000}
formattype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 0]

and this is my audio renderer infos w/ madflac :

CLSID: {E30629D1-27E5-11CE-875D-00608CB78066}
Filter: M-Audio Audiophile

- Connected to:

CLSID: {C52908F0-1C06-4C0D-A4CD-3D10EA51C757}
Filter: madFlac (96000.flac)
Pin: pcm

- Connection media type:

Audio: WAVE_FORMAT_EXTENSIBLE 96000Hz 6ch 13824Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 6
nSamplesPerSec: 96000
nAvgBytesPerSec: 1728000
nBlockAlign: 18
wBitsPerSample: 24
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 24
dwChannelMask: 0x0000003f
SubFormat: {00000001-0000-0010-8000-00AA00389B71}

pbFormat:
0000: fe ff 06 00 00 77 01 00 00 5e 1a 00 12 00 18 00 þÿ...w...^......
0010: 16 00 18 00 3f 00 00 00 01 00 00 00 00 00 10 00 ....?...........
0020: 80 00 00 aa 00 38 9b 71 €..ª.8›q

- Enumerated media type 0:

Audio

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000}
formattype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 0

looks like lSampleSize is the problem here :confused:

madshi
7th April 2009, 17:20
IMHO lSampleSize should be set to the size of one sample, which should be 6 channels * 3 byte (24bit = 3 byte) = 18 bytes. I don't see the reason for setting this field to 1. But then I double checked: Nero Audio Decoder sets it to 1. WavParser sets it to 18. <sigh> I guess I could set it to 1 without breaking anything.

stinman
7th April 2009, 17:47
I have PowerDVD 8 Ultra,but the updates are killing my hdmi sound almost everytime I get the latest ver.I tried to change hd master into flac before an mux it back into a mkv tp be played with MPC that is in the "tools" part of ripbot264,which I love by the way,Thankyou!Can you give me your way of doing this?What tool,like eac3to...etc. Thanks.


Mark

leeperry
7th April 2009, 20:51
IMHO lSampleSize should be set to the size of one sample, which should be 6 channels * 3 byte (24bit = 3 byte) = 18 bytes. I don't see the reason for setting this field to 1. But then I double checked: Nero Audio Decoder sets it to 1. WavParser sets it to 18. <sigh> I guess I could set it to 1 without breaking anything.
well it's nBlockAlign that's set to 1 in MPC HC and to 18 in madflac in my first logs, but in my last logs lSampleSize is set to 18 in MPC HC and 1 in madflac....if that makes any sense :o

NanoBot
12th May 2009, 22:36
Hi madshi, hi everbody,

is there any chance that future versions of madflac will include a builtin downmix option, e.g. from multichannel to 2.0 ?

The reason for this question is the following: If a create a mkv file, which has only one ( flac ) audio track, it is possible to chain madflac with the ac3filter, where the latter downmixes from 5.1 to 2.0. But if the mkv contains multiple audio tracks, e.g. one german ac3 and one english flac, ac3filter does not chain up with madflac, so I am ending up with the two front channels only when playing the surround track.

I tried to use the "Channel Downmixer" direct show filter by Trombettworks as a replacement for ac3filter, but this filter is not working with multiple instances, if a mkv contains more then one audio track.

So the optimum solution would be that macflac itself would be configurable to do a downmix to 2.0 if needed.

C.U. NanoBot

Mark_A_W
12th May 2009, 22:41
Hi madshi, hi everbody,

is there any chance that future versions of madflac will include a builtin downmix option, e.g. from multichannel to 2.0 ?

The reason for this question is the following: If a create a mkv file, which has only one ( flac ) audio track, it is possible to chain madflac with the ac3filter, where the latter downmixes from 5.1 to 2.0. But if the mkv contains multiple audio tracks, e.g. one german ac3 and one english flac, ac3filter does not chain up with madflac, so I am ending up with the two front channels only when playing the surround track.

I tried to use the "Channel Downmixer" direct show filter by Trombettworks as a replacement for ac3filter, but this filter is not working with multiple instances, if a mkv contains more then one audio track.

So the optimum solution would be that macflac itself would be configurable to do a downmix to 2.0 if needed.

C.U. NanoBot

Have you tried ffdshow instead of AC3filter?

NanoBot
13th May 2009, 02:13
Not yet, but it might be worth a try, thanks for the suggestion.

Edit:

Yeah, the ffdshow audio decoder nearly does everything I wanted. First of all, it works with all kind of matroska files, no matter if they contain ac3, dts, flac, mp3 or PCM. In addition, ffdshow is able to do a realtime encode to ac3, and I did not know that it is able to do that. So I dropped ac3filter and use the ffdshow audio decoder from now on.

The only thing I can't ffdshow get to work with are raw flac files, since it does not work correctly together with MPC HCs internal flac source filter. Nevertheless, ffdshow can be used as a postprocessor for madflac, so it will do the downmix on raw flac if neccessary.

Mark_A_W
20th May 2009, 13:57
Madshi

I think I've found a bug.

With a 5.0 FLAC source, Madflac seems to output the Back Right channel to LFE.

I've narrowed it down to Madflac, by comparing the wav file I made the Flac file from (correct channels), and also by trying CoreFLAC (channels are correct, but 16 bit only).


I have uploaded a small sample file.

(Please leave it for Madshi guys, it only downloads 10 times and deletes after 90 days).

http://rapidshare.com/files/235181175/madflac.zip.html
MD5: 1CAA332E472C630848DFC7F87330F52F

At about 40 seconds the Back Right channel should kick in, but the LFE does instead.

I can "fix" it using ffdshow mixer (swap channels no workee for me), but I think it's a bug.

But of course, this is a low low low priority compared to MadVR!!

tebasuna51
20th May 2009, 19:56
With a 5.0 FLAC source, Madflac seems to output the Back Right channel to LFE.

Not exactly, put the Back Left to LFE and the Back Right to Back Left.

Back Right begin at 26.6 sec. and Back Left at 39.4 sec.

But, yes, its a bug.
Seems ignore the MaskChannel info and apply the standard channel order.

Mark_A_W
21st May 2009, 03:36
Ahh!

The thicken plots!!

Thanks Tebasuna :)

mikelebron
8th June 2009, 03:48
Madshi, Anyway you can make this compatible with Win 7 64 bit?

clsid
8th June 2009, 11:57
It already is compatible.

If you mean a 64-bit build, then read the thread and you'll find the answer (hint: no).

mikelebron
9th June 2009, 03:03
Thanks that help!

It already is compatible.

If you mean a 64-bit build, then read the thread and you'll find the answer (hint: no).

mikelebron
10th June 2009, 03:02
wanted to update the thread... got it working using an alternative see here.. --> http://forum.doom9.org/showthread.php?t=147610

alfredska
21st June 2009, 21:04
Madshi

I think I've found a bug.

With a 5.0 FLAC source, Madflac seems to output the Back Right channel to LFE.

Sorry for the stupid question, but does this affect 5.1 (or anything other than 5.0 for that matter)? I ask because madFLAC seems to be the only directshow filter I can get to work properly with my 24 bit FLAC encodes.

and while we're at it, I have another (stupid) question, this time about the decoder rather than the filter:
In a thread at HydrogenAudio, it was found that flac 1.2.1b 24bit encoded files are troublesome to decode by flac decoders previous to 1.2.0 (see post here (http://www.hydrogenaudio.org/forums/index.php?showtopic=57624&view=findpost&p=518657)). The date stamp on libflac.dll in the madFlac 1.8 package suggests that it is 1.2.1b, but can I get any confirmation? Does the libflac.dll included with madFlac differ in any way (other than who compiled it) from those hosted on rarewares (http://www.rarewares.org/lossless.php)?

EDIT: Ok, the second part of my question is answered by looking in the 'legal stuff\libflac' directory.

Mark_A_W
21st June 2009, 22:19
Sorry for the stupid question, but does this affect 5.1 (or anything other than 5.0 for that matter)? I ask because madFLAC seems to be the only directshow filter I can get to work properly with my 24 bit FLAC encodes.


No, only 5.0.

5.1 is fine.

mikelebron
22nd June 2009, 04:01
.......

Weirdo
22nd August 2009, 21:33
finally I can listen to my .flac files properly in zoomplayer

thank you so much!!!

(after I saw how you were improving eac3to I knew this is the best that happened to FLAC related development since the authors created the specs ...)
Many thanks for the wonderful madFlac filter madshi!
Damn it, I now can't find a way to make Zoomplayer 6 to use it though, AC3filter keeps getting in the way. MadFlac is properly set in the Smart Play decoder options (FLAC, madFlac Decoder), also tried fiddling in the source filters & splitters using madFlac source, to no avail. :confused:

Mark_A_W
23rd August 2009, 00:21
If you are trying to play a .FLAC file, then you need to set the source filter FLAC setting to madFLAC.

If you are trying to play a video file (mkv/ts/avi) then you need to set the FLAC setting under Audio Decoders to FLAC.

Weirdo
23rd August 2009, 08:18
Thanks. AC3Filter still pops up (I've set it to 'prefer other decoder'), reporting PCM 2.0 on flac files.

http://img5.imageshack.us/img5/9423/sourcez.th.jpg (http://img5.imageshack.us/i/sourcez.jpg/) http://img5.imageshack.us/img5/5594/graphinfo.th.jpg (http://img5.imageshack.us/i/graphinfo.jpg/) http://img30.imageshack.us/img30/7791/decoder.th.jpg (http://img30.imageshack.us/i/decoder.jpg/)

Mark_A_W
23rd August 2009, 11:06
Hmmm...

Have you got "Enable Smart Play" ticked?

Otherwise, I'm stumped. Uninstall AC3filter!

Weirdo
23rd August 2009, 13:04
Yes, ticked. Uninstalled AC3Filter, and now I get this (ZP7). Madflac seems to load, but I'm not sure it's done properly (PCM?). It'll have to do I guess.

http://img31.imageshack.us/img31/355/rightclick.th.jpg (http://img31.imageshack.us/my.php?image=rightclick.jpg) http://img16.imageshack.us/img16/9890/infow.th.jpg (http://img16.imageshack.us/my.php?image=infow.jpg) http://img16.imageshack.us/img16/3091/graph2rth.th.jpg (http://img16.imageshack.us/my.php?image=graph2rth.jpg)

clsid
23rd August 2009, 13:19
It outputs PCM, which is perfectly normal.

73ChargerFan
23rd August 2009, 17:46
SPDIF output is limited to 2 channels PCM. If your flac file has more channels than that, you'll have to output analog or re-encode to dts or ac3 to go over spdif.

Weirdo
23rd August 2009, 17:59
It's 2.0 FLAC files on analog output. On my XP machine, ZP right-click filter report, shows the DirectSound Device and madFlac (as mpc does).
Here on Vista, it's the DS device and "Source File: Smart Play Graph" instead of madFlac (pic#1).

Gokumon
26th August 2009, 03:08
Is anyone else able to get FLAC in MKV to playback in Windows 7 with madFlac? I've tried to create a graph to connect either Haali's Splitter output to madFlac and it just freezes up the program trying to connect or if I try to play in MPC-HC the program just stalls. Extracting the mkv out of the file and playing it as a raw .FLAC works on the other hand.

CapnBob
12th September 2009, 16:25
Hi huys,
done a search but to no avail. I know this was on Madshi's "list to do" but not sure if it's been implemented yet.

With 7.1 material how is it down mixed to 5.1? Are the extra channels dropped or are they mixed back into the rears at a reduced volume? Is it better to limit output to 5.1 or pass the 7.1 output to FFDshow and use the mixer there if you require 5.1?

Thanks !

Moondust
23rd November 2009, 20:10
With 7.1 material how is it down mixed to 5.1? Are the extra channels dropped or are they mixed back into the rears at a reduced volume? Is it better to limit output to 5.1 or pass the 7.1 output to FFDshow and use the mixer there if you require 5.1?
I am wondering the same thing. Anyone?

73ChargerFan
24th November 2009, 03:00
Thanks again for all the work you've done. My HTPC thanks you also.

jasonwc
1st February 2010, 16:57
I have found a 24/96 5 channel FLAC which will not play with madFLAC. The issue appears to be that it' has 5 channels, as down-sampling to 16/48 doesn't fix the issue. I haven't had any issues with 6 or 8-channel playback.

Attempting playback in MPC-HC with the madFLAC decoder fails with a "cannot render some of the pins in the graph" message. I can playback in foobar2000 and MPC-HC's internal decoder without issue.

Please find a 24/96 and a 16/48 sample below:

http://rapidshare.com/files/344379924/01_-_Concerto__Rv_386__Allegro_Ma_Poco__24-96_.flac.html

http://rapidshare.com/files/344379923/01_-_Concerto__Rv_386__Allegro_Ma_Poco__16-48_.flac.html

Jeff Flowerday
2nd February 2010, 15:51
I have found a 24/96 5 channel FLAC which will not play with madFLAC. The issue appears to be that it' has 5 channels, as down-sampling to 16/48 doesn't fix the issue. I haven't had any issues with 6 or 8-channel playback.

Attempting playback in MPC-HC with the madFLAC decoder fails with a "cannot render some of the pins in the graph" message. I can playback in foobar2000 and MPC-HC's internal decoder without issue.

Please find a 24/96 and a 16/48 sample below:

http://rapidshare.com/files/344379924/01_-_Concerto__Rv_386__Allegro_Ma_Poco__24-96_.flac.html

http://rapidshare.com/files/344379923/01_-_Concerto__Rv_386__Allegro_Ma_Poco__16-48_.flac.html

Just to confirm, 5.0 and 6.1 have never worked for me when using madflac as the decoder.

Cogitation
28th April 2010, 04:03
I hope this question doesn't come across as too rude, but I thought the purpose of madflac was to decode various new kinds of flac files cropping up, like 5.0... also 24-bit, 96khz flac inside an mkv container and the like.

If madflac can't do that reliably, or it can't do it better than standards like libflac, why is it being worked on?

I've installed it on my last three machines, because I had read it will decode 24-bit flac inside of .mkv, and since I was having a problem doing exactly that, I tried it, it worked, and I didn't think about it again. You said early on in the thread that madflac is only designed for standalone file decoding though? Was that just an early version?

zipi
6th June 2010, 02:35
I have a question for you in return, hope you wont find it rude,
why do you post before you read more, instead of complaining that it works !?

LloydA
16th June 2010, 22:02
madshi,

I've found a bug in madFlac:

When changing the audio track in MPC-HC from a FLAC track to AC3/DTS, or from AC3/DTS to FLAC (when the default audio track was not FLAC), or between different FLAC tracks, madFlac is not reconnecting in the filter graph. I've verified this behavior with AC3Filter and MPC-HC's internal FLAC decoder, both of them have no issues being instantiated in the filter graph after changing the audio track.

clsid
17th June 2010, 10:23
I haven't tried with AC3Filter, but track switching works fine when ffdshow is used for AC3/DTS. So the problem may be related to AC3Filter.

LloydA
17th June 2010, 12:23
No, when starting playback with a FLAC track as the default track, and then switching to another FLAC track, madFlac also won't show up in the filter graph after the change. This is clearly not an issue with AC3Filter, but to the contrary, AC3Filter has no problems with switching audio tracks. madFlac has.

ACrowley
17th June 2010, 15:08
No, when starting playback with a FLAC track as the default track, and then switching to another FLAC track, madFlac also won't show up in the filter graph after the change. This is clearly not an issue with AC3Filter, but to the contrary, AC3Filter has no problems with switching audio tracks. madFlac has.

Should be a Splitter related Problem. I know this too.
So its not a Madflac Problem.

MPC Splitter filters works with all Audio Formats
while Haali somtimes Hangs when you switch betwenn different Formats like AC3 and FLAC

LloydA
17th June 2010, 17:14
Thanks for the suggestion, I'll try with MPC Splitter then.

Thunderbolt8
17th June 2010, 20:10
its the same problem Ive also reported twice already since quite some time. when using madflac and ac3filter to output everything as 2.0 and then switching between different flac and ac3 tracks of a file, I get the problem that I wont have the output to 2.0 any more. dont ask me which prog's fault it is though. also happens with the internal mpc splitter.

madshi
18th June 2010, 15:09
Can I get a short sample where audio track switching doesn't work with madFlac?

LloydA
18th June 2010, 16:12
The first 100 MB of the MKV? Will make one later.

madshi
18th June 2010, 16:49
The first 100 MB of the MKV? Will make one later.
Doesn't even have to be that large. Even 1MB is enough, if it lets me reproduce the problem. This is all I need: To be able to reliably reproduce the problem on my PC. Maybe you can remux with only audio tracks inside? That should keep the file size low. Just make sure that whatever sample you upload, really can be used to reproduce the problem.

LloydA
18th June 2010, 23:44
Here is an 1MB sample:

http://www.mediafire.com/?eymdqndz3em

Start playback, pause, switch to the other FLAC track (doesn't matter which one is the default), resume. Happens also without pause/resume.

Have you been able to reproduce the issue?

xc3ll
27th June 2010, 02:34
If anyone can help me out, I'm trying to bitstream a TrueHD flac track using madFlac with MPC-HC, but I can't find madFlac as an available external filter, and when I manually find select it by browsing, it still doesn't work.

Here's what I'm running:
Win 7 Pro 64bit
MPC HC 1.3.1249
madFlac 1.8
Haalia Media Splitter
ffdshow-tryouts rev 3487

thanks

EDIT: I found that the problem is that I was using the 64 bit version of mpc-hc.

Snowknight26
27th June 2010, 06:15
You can't bitstream FLAC, nor can you use madFlac for TrueHD.

DigitalLF
12th August 2010, 16:07
can anyone else confirm that madflac makes mpc-hc crash when loading a flac??

Jeff Flowerday
12th August 2010, 22:25
Warning about not being able to render all pins. It doesn't crash.

madshi
15th August 2010, 09:30
madFlac 1.9 released

http://madshi.net/madFlac.rar

* fixed: uninstall was incomplete
* fixed: channel mask was not properly set for weird channel configurations
* changed metadata string allocation type to solve MPC HC heap corruption complaints
* lSampleSize is set to 1 now to improve compatability with other filters

madshi
15th August 2010, 09:58
Here is an 1MB sample:

http://www.mediafire.com/?eymdqndz3em

Start playback, pause, switch to the other FLAC track (doesn't matter which one is the default), resume. Happens also without pause/resume.

Have you been able to reproduce the issue?
I tried, but I cannot reproduce the problem on my XPSP3 PC. It always works for me just fine, with AC3Filter and ffdshow, with Haali MKV splitter and MPC HC splitter.

Sebastiii
15th August 2010, 11:20
Thank you a lot :) all is working good :)
Seb.

Jeff Flowerday
17th August 2010, 14:47
madFlac 1.9 released

http://madshi.net/madFlac.rar

* fixed: uninstall was incomplete
* fixed: channel mask was not properly set for weird channel configurations
* changed metadata string allocation type to solve MPC HC heap corruption complaints
* lSampleSize is set to 1 now to improve compatability with other filters

Thanks!!!!!

BatKnight
17th August 2010, 15:40
Sorry to bring this up again. I've been reading here that some of you can use madflac to play a FLAC track inside a MKV. How?
I can use madflac to split a FLAC track and play it, but I can't get it to be used when playing a FLAC track inside a MKV. FFdshow and MPC-HC internal FLAC decoder both work, but I don't want them, I want to use madflac always for FLAC because of my 24bit tracks.

I've tried to force madflac decoder and/or source in MPC HC external filters, but it's never used. It always reverts to Internal FLAC decoder (low merit).

I am using Win 7 64bits with 32bit MPC-HC.

Bat

madshi
17th August 2010, 15:54
Have you tried disabling the internal FLAC decoder?

BatKnight
17th August 2010, 19:36
Have you tried disabling the internal FLAC decoder?
Yes, in MPC-HC, in the Internal Filters, both the FLAC Source Filter and FLAC Transform Filter are unticked.
That's why it shows up as "low merit."

If I play a .FLAC file, madflac splits it and decodes it. No MPC's and ffdshow's in the way. Everything's fine.

If I play a MKV with a FLAC track, madflac isn't the splitter because the MKV is being splitted by MPC or Haali, but the audio should be played by madflac as the decoder, and not the falled-back MPC Internal flac decoder in low merit mode.

I even have madflac forced as preferred in the MPC-HC External Filters, but no luck.

Could this be a Win 7 64bit related problem, and the way it uses the merits and registrations? I believe you develop in WinXP SP3 right? Anyone else can reproduce this?

Bat

madshi
17th August 2010, 20:06
My dev PC is XPSP3, but my HTPC is win7 x64. And I've just tested on the HTPC and madFlac is used for MKV FLAC tracks for me. I didn't even have to "prefer" it, I just needed to uncheck the internal FLAC stuff. I'm using an older MPC HC build on my HTPC, though. Not sure if that makes a difference...

yesgrey
17th August 2010, 20:18
Are you using the latest madFlac version (1.9)?
I remember that the first versions only supported flac source files. Also, have you tried uninstall/reinstall?

I have W7 x64 and it works fine.

BatKnight
17th August 2010, 22:28
Are you using the latest madFlac version (1.9)?
I remember that the first versions only supported flac source files. Also, have you tried uninstall/reinstall?

I have W7 x64 and it works fine.
Uninstalling and reinstalling worked. For some reason that slipped from my mind. So basic... I am ashamed.
Thanks for the tip guys.

Bat

yesgrey
18th August 2010, 02:26
So basic... I am ashamed.
Don't be, it happens to everyone... ;)

Ap3 n1nja
6th October 2010, 05:14
Hi, I am having some trouble playing this certain file when using madFlac (v1.9). Here is a sample to take a look at.

http://www.mediafire.com/?wo4epzau2rq876e

nowings69
9th October 2010, 03:46
@madshi
Could you add Replaygain as MONOGRAM Musepack DirectShow Decoder?
http://img235.imagevenue.com/loc547/th_90784_01_122_547lo.jpg (http://img235.imagevenue.com/img.php?image=90784_01_122_547lo.jpg)

Well,I always listen to music on Foobar2000
but the music movie(LPCM) uses FLAC with madFlac.
Because I hope no normalize it.
thank you

APorter819
13th November 2010, 19:20
I'm using the latest version of madFlac 1.9 with MPC-HC. My multichannel flac audio files inside a mkv container that's connected to my Denon receiver are only showing up as 2 channel. Any ideas why this would be happening? When I click on madFlac decoder it says audio is 5.1.

Jeff Flowerday
15th November 2010, 16:15
I'm using the latest version of madFlac 1.9 with MPC-HC. My multichannel flac audio files inside a mkv container that's connected to my Denon receiver are only showing up as 2 channel. Any ideas why this would be happening? When I click on madFlac decoder it says audio is 5.1.

Did you configure your HDMI sound device in windows to actually be 7.1. The default is stereo I believe.

nowings69
15th November 2010, 23:48
madFlac who is DirectShow Decoder.
It changes just a LPCM.
You should be able to understand the limit of the capacity(MS) if you converted it by yourself

madshi
3rd January 2011, 11:09
madFlac v1.10 releaed

http://madshi.net/madFlac.rar

* fixed: some MKV files made madFlac freeze

Thunderbolt8
3rd January 2011, 15:17
thanks.

leeperry
4th January 2011, 15:11
thanks for the update!

it'd be really sweet if at some point you could add an option to force madFlac to only connect to ffdshow audio, because atm it's impossible to open an external secondary FLAC sountrack and post-process it in ffdshow audio...it has to be muxed into the container, there's no way to post-process madFlac's output off an external file http://forum-images.hardware.fr/icones/ohwell.gif

madshi
4th January 2011, 15:57
Why is there no way? If you force the ffdshow raw audio processor to be "preferred" in the MPC HC settings dialog, it should be used, I think?

leeperry
4th January 2011, 21:29
Well, it's possible in Graphedit(minus the PotP/MPC audio switcher):

http://www.pixelz.fr/7/6/3/abb67292bd8d19967e212a40d9c76.png

But whatever in MPC or PotP it isn't :(

I've whined on the PotP forum and was told that there is no way to force ffdshow audio(decoder/raw) after madFlac, because DirectShow doesn't allow doing it apparently: http://cafe.daum.net/pot-tool/AZMV/1611

He made a video too: http://cfile270.uf.daum.net/attach/173361194C393943383F0B

He confirmed that it's possible in Graphedit, but that adding an external audio on top of an existing container doesn't allow to force a filter on top...I know you're very busy, but I'd really crave for an option like "only connect to ffdshow audio"...so I could have a 7.1 24/96 FLAC file on a standalone DVD, and it'd be post-processed in ffdshow just as it were muxed into the main MKV http://forum-images.hardware.fr/images/perso/ayuluna.gif

You always find your way to make my dreams come true when it comes to HTPC software, and only those who dare begging shall receive http://forum-images.hardware.fr/images/perso/otakonleboss.gif

madshi
4th January 2011, 22:47
I won't have time for this anytime soon, I'm sorry. Maybe in a few months.

leeperry
5th January 2011, 01:16
Having more thoughts about it, if you could allow madFlac's source filter to work independently from madFlac's decoder I could just set it to use ffdshow audio for decoding and that should work. I've run tests(here (http://forum.doom9.org/showpost.php?p=1466055&postcount=67) and there (http://forum.doom9.org/showpost.php?p=1466162&postcount=71)), ffdshow can decode 7.1 24bit FLAC untouched.

Ap3 n1nja
5th January 2011, 01:38
Thanks for the updated release! The file can now play properly! :)

madshi
5th January 2011, 09:21
Having more thoughts about it, if you could allow madFlac's source filter to work independently from madFlac's decoder
I won't do that. Too much work for no real benefit. madFlac doesn't really know the structure of FLAC files, which it would have to know for doing what you suggest. madFlac is basically just a wrapper around the official libFlac.

Thanks for the updated release! The file can now play properly! :)
Pleasure!

Thunderbolt8
18th January 2011, 12:33
would it be possible to add an option that mono audio can be put out as 2.0 via both stereo channels?

I cannot set this option at my receiver and would have to use ac3filter instead then which results in loss of quality.

Moondust
23rd March 2011, 01:15
I don't understand why AC3Filter isn't working when MadFlac is used on my Windows 7 64-bit pc. Has been working on my HTPC (Vista 32-bit) for ages without any problems. When playing AC3 or DTS AC3Filter works just fine. When playing FLAC AC3Filter just doesn't show up in the filter section and my speakers stay silent. Does anyone know what is going wrong? Help is greatly appreciated.


I discovered it's not just that MadFlac won't run with AC3Filter in MPC-HC. Here are the tested combinations.
Seperate FLAC track: MadFlac -> AC3Filter -> ReClock (works fine)
Only FLAC track in mkv: MadFlac -> AC3Filter -> ReClock (works fine)
FLAC track and other audiotrack in mkv: MadFlac -> ReClock (no AC3Filter, in some cases there's sound, in some there's not)

When loading the mkv it starts with the DTS/AC3 sound. When I switch to FLAC in Haali, sound is played in most cases, but not in some. IN all cases AC3Filter is not loaded. No pattern I can see.



I tested an mkv with 2 FLAC files, both played fine with AC3Filter. Seems the problem with AC3Filter not loading only appears when the FLAC is the secondary track. Still no clue of the cause though. Any help on this matter is very much appreciated.


...would have to use ac3filter instead then which results in loss of quality.
Why would the use of AC3Filter decrease the quality?

Thunderbolt8
25th March 2011, 23:24
because it states this:

Decoding chain: (PCM24 1/0 (mono) 48000) -> Processor -> (PCM24 2/0 (stereo) 48000) -> Dejitter -> (PCM24 2/0 (stereo) 48000)

I simply dont trust whats being done at the processor and dejitter stage. I'd like to avoid to have this.
(you could get rid of dejitter, but processor still remains)

meetajhu
26th April 2011, 15:31
x64 version please! Go x64 which is the future!

deathlord
28th April 2011, 09:50
Hi

It has been discussed, here and in other places, how to play back 5.1 and 7.1 sources in a common setup. There does not seem to be a satisfactory solution. I have opend a new thread where I would like to discuss this topic in some detail:

http://forum.doom9.org/showthread.php?t=160857

mindbomb
12th May 2011, 01:55
question:
So if you use the limit 5.1 option, it mixes down 7.1 down to 5.1?
or does it just discard 2 channels?

edit: tested it, it discards the 2 channels

leeperry
28th May 2011, 16:54
I won't have time for this anytime soon, I'm sorry. Maybe in a few months.
nevermind, I just bought a BD burner...so I can mux any video and any FLAC I like, too awesome :D

Mark_A_W
29th May 2011, 01:04
Well, it's possible in Graphedit(minus the PotP/MPC audio switcher):

http://www.pixelz.fr/7/6/3/abb67292bd8d19967e212a40d9c76.png

But whatever in MPC or PotP it isn't :(

I've whined on the PotP forum and was told that there is no way to force ffdshow audio(decoder/raw) after madFlac, because DirectShow doesn't allow doing it apparently: http://cafe.daum.net/pot-tool/AZMV/1611

He made a video too: http://cfile270.uf.daum.net/attach/173361194C393943383F0B

He confirmed that it's possible in Graphedit, but that adding an external audio on top of an existing container doesn't allow to force a filter on top...I know you're very busy, but I'd really crave for an option like "only connect to ffdshow audio"...so I could have a 7.1 24/96 FLAC file on a standalone DVD, and it'd be post-processed in ffdshow just as it were muxed into the main MKV http://forum-images.hardware.fr/images/perso/ayuluna.gif

You always find your way to make my dreams come true when it comes to HTPC software, and only those who dare begging shall receive http://forum-images.hardware.fr/images/perso/otakonleboss.gif

You can do that in Zoom Player. For FLAC files (and FLAC in MKV) I run madFLAC then ffdshow then Convolver Wrapper.

I use madFLAC source, which then outputs PCM to ffdshow/convolver (ZP PCM settings are Null Filter -> ffdshow audio -> convolver wrapper).

Thunderbolt8
4th June 2011, 00:24
for mkv files which consist of at least 2 audio tracks with at least one of them being a flac track, theres still the problem that madflac disappears from the filter list in use in mpc-hc when switching to a flac track from any other audio track (dont ask me whether this is a problem of madvr or mpc-hc etc., but this problem exists since the first time I tried that some years ago).

thus its not possible to listen to both streams of a concert which e.g. has been recorded in 2.0 and 5.1 (and then gets remuxed to flac). you have to stick to the default track, because when switching over to the 2nd one, the madvr instance disappears from the filter in use list.

yesgrey
4th June 2011, 12:34
Have you tried disabling mpc-hc's internal audio switcher?

Thunderbolt8
4th June 2011, 14:39
yes, its disabled. I can switch the tracks, thats working fine. but when I do, then the madlfac instance disappears and I dont have any sound.

robpdotcom
4th June 2011, 17:44
I have an mkv with DTS-HD and flac audio - I can switch between them just fine. LAVAudio loads when I select the DTS-HD track, madflac loads when I select the flac track.

I tried with Haali, Gabest, and LAV splitters, with MPC-HC's audio switcher on and off, bitreaming or decoding the DTS-HD, and also with ffdshow instead of LAVAudio - it worked fine in all cases.

I have MPC-HC's internal flac decoder disabled, and madlfac decoder set as preferred in the external filter list.

Thunderbolt8
4th June 2011, 20:12
checked on that again, it doesnt seem to happen with only 2 flac tracks any more, but with different track types when other filters are active at the same time e.g. the internal mpc-hc dts decoder or ac3filter. so if the first track is a dts track, then it happens with switching over to the flac track.

examples:

mpc-hc internal dts decoder & madflac: dts track default -> switching to flac track = madflac instance doesnt get loaded.
madflac + ac3filter (active at the same time for channel downmixing): starting with flac track -> switching over to an ac3 track -> switching back to flac track = only ac3filter instance loads up again this time, but not madflac

at some point, some filters get dropped for some reason, but dont ask me why.

nlnl
4th June 2011, 21:42
Thunderbolt8
Have a look:
http://forum.doom9.org/showthread.php?p=1500843#post1500843

The problem is that the DirectShow graph renderer will always try to avoid adding new filters to the graph, so if the renderer accepts it, no matter with how low merit .. it'll use it.

Mark_A_W
4th June 2011, 23:12
Create your MKV files with only the audio track you want. Then there is no problem.

Thunderbolt8
4th June 2011, 23:42
Thunderbolt8
Have a look:
http://forum.doom9.org/showthread.php?p=1500843#post1500843so what does this now exactly mean? is there any solution for this problem? who to address regarding this problem?

Create your MKV files with only the audio track you want. Then there is no problem.this is part of the problem. of course I only mux the tracks I want, just sometimes, theres also a commentary track and with regards to concerts, theres sometimes both, a good stereo and surround mix. only having one track at all cannot be the solution.

Mark_A_W
5th June 2011, 00:04
Then re-encode all audio to a format that a single decoder can decode.

Loading decoders on the fly is fraught with danger, it's just not going to work, I gave up right at the start, when I bought my first HD-DVDs (and couldn't play them with my legally purchased software....still can't...hence the remux)

deathlord
5th June 2011, 09:08
Then re-encode all audio to a format that a single decoder can decode.

I agree. I always encode everything to flac. Never had any problem switching between different flac tracks.

Mark_A_W
5th June 2011, 09:53
Or just use LAV Audio decoder, it can decode pretty much everything.

Even though it's based on ffmpeg, which is (or was) limited to 16 bit in ffdshow for flac, I think nevcariel fixed that issue.


However, for guaranteed compatibility, it would be nice if madshi and nevcariel would access madflac in LAV Audio directly, the way he has with the Arcsoft DTS decoder.

Then we would have one complete audio decoder for everything. And stream switching, even for different audio types, should just work.

zipi
17th June 2011, 22:33
Just wanted to again say thanks Madshi for MadFlac, it's great!
(btw, was looking for a change log in the archive, & have not found one, please disregard if intentional).

The work you have done on MadFlac & MadvR makes many people happy daily, All the best to you!

v_spec
7th March 2012, 08:56
I'm using MPC-HC with madFLAC 1.10. I noticed there's no option to downmix to stereo which makes the volume in videos with 5.1 tracks sound low.

deathlord
7th March 2012, 12:41
You can use e.g. ffdshow to do the downmix.

v_spec
7th March 2012, 22:04
Is there other directshow FLAC filters out there you would recommend other than madFLAC 1.10 and CoreFLAC Decoder 0.4?

Weirdo
7th March 2012, 22:59
Is there other directshow FLAC filters out there you would recommend other than madFLAC 1.10 and CoreFLAC Decoder 0.4?LAV Filters, although they don't downmix, yet.

v_spec
8th March 2012, 01:53
LAV Filters, although they don't downmix, yet.

I guess my question now should be, if the video is outputting a 5.1 track and I'm using 2.1 speakers/headphones, will I not hear the sound from the other 3 channels because the codec is not able to downmix?

Midzuki
8th March 2012, 02:24
You can downmix to stereo through ffdshow audio processor OR through AC3Filter --- which works great on my Vista laptop BTW.

v_spec
8th March 2012, 03:51
You can downmix to stereo through ffdshow audio processor OR through AC3Filter --- which works great on my Vista laptop BTW.

The audio codec is FLAC, AC3 does not support FLAC.

So far from what I understand only ffdshow's FLAC filter is able to downmix to stereo.

Midzuki
8th March 2012, 05:39
The audio codec is FLAC, AC3 does not support FLAC.

AC3Filter does support uncompressed audio (PCM or LPCM), and can be used as an audio processor --- it's just a matter of proper configuration. ;)

v_spec
8th March 2012, 08:23
AC3Filter does support uncompressed audio (PCM or LPCM), and can be used as an audio processor --- it's just a matter of proper configuration. ;)

Learning something new everyday. Will give it a try. Thank you!

Weirdo
8th March 2012, 10:47
I guess my question now should be, if the video is outputting a 5.1 track and I'm using 2.1 speakers/headphones, will I not hear the sound from the other 3 channels because the codec is not able to downmix?You will hear everything, because Windows will do the downmixing, assuming of course you've set stereo output to the Sound options.

samhfoley
26th March 2012, 01:52
Does MadFlac work on 64 bit? I installed it, but my 64 bit PotPlayer doesn't see it listed in the registered filters... Please advise

nevcairiel
26th March 2012, 08:18
Does MadFlac work on 64 bit? I installed it, but my 64 bit PotPlayer doesn't see it listed in the registered filters... Please advise

madFlac is only 32-bit.

HitomiKun
17th June 2012, 01:59
Madflac crashes sometimes, it's ultra rare though and I don't know the source of it. I had some music running and it just broke randomly. Starting it again didn't break it on the same spot though, it didn't crash at all. I had an ticket open in the mpc-hc bug tracker (because I thought this was some kind of mpc-hc issue), there you can get the dump file that got created with it.

https://sourceforge.net/apps/trac/mpc-hc/ticket/2404

Isochroma
2nd October 2012, 02:03
Can you please make the filter selectable so I don't have to use its decoder as well as the splitter?

I want to use MadFLAC as splitter only, so that I can use ffdshow as decoder.

madshi
2nd October 2012, 07:14
Why would you prefer the ffdshow decoder over madFlac? I don't see any good reason for that right now.

Isochroma
2nd October 2012, 21:10
I need the other effects and the ffdshow mixer.

Think for a moment: the vast majority of filters are either splitters or decoders, not both.

Forcing both together really cripples and limits user options.

Imagine if your arm didn't have an elbow, only one single element. It would have very limited movement potential and flexibility.

madshi
2nd October 2012, 21:37
You can configure ffdshow to accept "Uncompressed" audio, which allows you to do madFlac -> ffdshow. So again: No need to use ffdshow for FLAC decoding.

Isochroma
2nd October 2012, 21:59
You're suggesting I offload the control entropy from your unselectable decoder onto ffdshow.

I don't want that. If I do that then ffdshow puts itself everywhere.

Again, not enough control.

clsid
2nd October 2012, 22:10
LAV Splitter also supports FLAC files.

adrianmak
3rd October 2012, 02:27
LAV Splitter also supports FLAC files.

which is better to decode 5.1 flac, lav audio or madflac ?

hubblec4
15th February 2013, 15:13
work madflac on win7 64bit??

nautilus7
15th February 2013, 15:28
It works, but only within 32bit media players

Drakoliona
23rd October 2013, 17:27
How i wan update it?

Overdrive80
23rd October 2013, 18:09
Drakoliona, this pack has installer, is a *.bat file. Execute it as administrator.

Drakoliona
4th January 2014, 11:00
Exact Audio Copy use MADFLAC codec? For compress?

detmek
4th January 2014, 11:42
No, it doesn't. MadFLAC is DirectShow filter. EAC uses command line FLAC, flac.exe.

Drakoliona
4th January 2014, 15:06
And if i use it

http://www.xiph.org/dshow/

EAC use it for decode? because it's write :

DirectShow: Xiph's OpenCodec for encoding to/decoding from FLAC (as well as Ogg Vorbis/Speex/Theora)


Or i don't need Decoder for EAC?

And how to add MadFLAC to MPC-HC?

detmek
4th January 2014, 18:59
EAC does not use any DirectShow filter. It only supports PCM which does not require any decoder. If you want to encode to FLAC you will need flac.exe (http://www.rarewares.org/lossless.php#flac-bundle).

MPC-HC is shipped with LAV Filters which already have FLAC decoder so you don't need madFLAC. But, if you insist, you can install madFLAC and add it into External Filters and set it to Prefer.

Drakoliona
4th January 2014, 21:00
I have add madFLAC in MPC-HC, how i use it ? i want mean, how i know MPC use madFLAC?

If madFLAC is useless for MPC-HC why create madFLAC ?^^

So, for encode in Flac don't need another decoder / encoder? only flac.exe in package of EAC?

And For Rip ISO of Full DVD, don't need decoder too? only AnyDVD HD is good ?

detmek
4th January 2014, 22:44
1. Play some FLAC file or video with FLAC audio, right-click on MPC-HC window, Filters and you will see which filters are used.

2. madFLAC is created in 2007. when FFMPEG (core of LAV Filters) have had a problems decoding FLAC audio. These days FFMPEG (and FFMPEG based decoders) will decode FLAC files without problems. So, you don't need madFLAC if you have up-to-date player or decoder.

3. Right, you only need flac.exe, nothing more.

4. You only need decoder when you play or trancode file. AnyDVD does not trancode DVD, it just removes protection and makes a copy to HDD.

Drakoliona
10th January 2014, 16:45
@detmek And for remux Blu-Ray, I just need FFDShow + eac3to decoder pack? (FFDShow x32 + eac3to decoder pack 1.4)

i use eac3to command line

detmek
10th January 2014, 17:30
If you are going to remux Blu-Ray you only need eac3to. You don't even need FFDShow because remux means you extract elementary streams, without any decoding, and mux those into new container.
P.S. I think that eac3to doesn't use any DirectShow decoder.

the_weirdo
10th January 2014, 17:55
P.S. I think that eac3to doesn't use any DirectShow decoder.

Actually, it does. It'll use ArcSoft DTS Decoder, Sonic Audio Decoder and Nero Audio Decoder when necessary if they're available. For Blu-ray remuxing, they're not needed, of course. Also, eac3to doesn't use any other DirectShow decoder.

Drakoliona
10th January 2014, 21:24
Actually, it does. It'll use ArcSoft DTS Decoder, Sonic Audio Decoder and Nero Audio Decoder when necessary if they're available. For Blu-ray remuxing, they're not needed, of course. Also, eac3to doesn't use any other DirectShow decoder.

ArcSoft DTS Decoder & Sonic Audio Decoder it's only for DTS ? or AC3? Because i don't know how use for AC3.. And nero ? It's for AC3 ?

the_weirdo
11th January 2014, 06:30
ArcSoft DTS Decoder & Sonic Audio Decoder it's only for DTS ? or AC3? Because i don't know how use for AC3.. And nero ? It's for AC3 ?

AFAIK, eac3to uses ArcSoft DTS Decoder and Sonic Audio Decoder to decode DTS(-HD) (ArcSoft is recommended). Sonic Audio Decoder can be forced to decode (E-)AC3 and TrueHD but that isn't recommended. Nero Audio Decoder is used for decoding (E-)AC3 and AAC, also can be forced to decode TrueHD (but there're some limitations).

Anyway, this is off-topic.

tebasuna51
11th January 2014, 10:16
Now Nero Audio Decoder is only used to decode AAC, by default MP1, MP2, MP3, (E-)AC3 and TrueHD is decoded with libav/ffmpg

x7007
1st September 2014, 14:22
Using it to play FLAC files with PotPlayer, every time I it start new track from the first time I double click on the file there's silence until I click anywhere on the play bar.

Isochroma
22nd August 2015, 00:44
I'm using MadFLAC fine but I don't want it to DECODE, I just want it to SPLIT, then ffshow to decode.

I only want a DirectShow FLAC splitter, not a decoder.

I request that you include a GUI option in the next version that switches MadFLAC between SPLITTER-ONLY-MODE and SPLITTER & DECODER MODE.

madshi
22nd August 2015, 08:27
Why do you want ffdshow to decode? I'm using the official libFlac decoder, so you have the highest probability of getting bit-perfect decoding. I think ffdshow probably uses libav, which is a different decoder, not from the original FLAC developers. I suppose it will very likely provide the same results, but I just don't see the advantage of letting ffdshow decode? FWIW, you can use the ffdshow audio processor to post-process the madFlac decoder output.

For me the simple problem is that the APIs I'm using for both splitting and decoding are all from the libFlac library. madFlac is basically nothing but a simple wrapper around libFlac, and I don't even know if those APIs allow simple splitting without decoding. At least it would cost me quite a bit of time to implement that, and since I don't see any use in it (see above), I will probably not implement it, at least not any time soon. More useful might be an x64 version of madFlac, I suppose.

On a related note, I recently got some problems (delays in playback start, seeking problems etc) with FLAC playback, and after I researched them I found that madFlac got disabled for some reason and LAV Audio Decoder was used instead. Reenabling madFlac got rid of all problems immediately. So from my personal experience, madFlac still provides the most reliable FLAC playback experience. I think the difference is probably in the splitter, not the decoder. LAV Audio Decoder seems to do pretty great with decoding, but isn't always the best solution for splitting raw audio files. I also have the same experience with AC3 and DTS files etc...

Isochroma
22nd August 2015, 09:13
As many reasons as there are options in ffdshow and not in MadFLAC.
Today I have finally followed the advice of another poster on this thread and - after removing MadFLAC - installed the LAV Source Filter.
It works perfectly by splitting FLAC and providing lots of other source filters as well though I'm only using the FLAC SF right now.
ffshow loves the output of LAV and it's working perfectly with the ffshow Mixer and Crystality filters.
I am happy as a Pig in Poop and wonder why I tortured myself with MadFLAC every since first installing it on 2010/05/15.
I like & need fine-grained control over everything.
It suits my precise & careful nature.
Having the ability to micro-manage every step of the playback process is a key & critical part of my obsessive need to micro-manage all processes executing on my box.
Nonetheless, for unsophisticated users who just want the most quick & basic FLAC package to 'Just Make it Play - the Easy Way', MadFLAC indeed fills that gap like the Mercurial dental filling.

tebasuna51
22nd August 2015, 11:05
@Isochroma
Seems your problem is solved:
"...installed the LAV Source Filter. It works perfectly..."

And you have a quick answer from developer (not always easy) with their advice.

Like madshi, and everybody here, work for free, you don't need make comments like:
"wonder why I tortured myself with MadFLAC"
"unsophisticated users who just want the most quick & basic"

Please remember the rule 4 of this forum:
"4) Be nice to each other..."

Isochroma
22nd August 2015, 19:25
I will always write 100% of the truth about my personal experience with software.
Including MadFLAC.
That is my perogative.
I will never censor my comments about any software on this or any other forum so as to be 'Nice' as you say in your comment.

Your comments are a failed attempt to associate my truthful experience with MadFLAC and my truthful reportage of same onto its author:

"Like madshi, and everybody here, work for free, you don't need make comments like:
"wonder why I tortured myself with MadFLAC"
"unsophisticated users who just want the most quick & basic""

The two are entirely separate.

My comments are about my own personal experiences using MadFLAC and my conclusions about the software I have drawn from my use of this software.

I have no words to speak about the author, just the software.

amayra
28th August 2015, 20:42
thanks for your work i'm glad this is still work but do you have any plan for 64bit ?

amayra
28th August 2015, 20:48
I'm using MadFLAC fine but I don't want it to DECODE, I just want it to SPLIT, then ffshow to decode.

I only want a DirectShow FLAC splitter, not a decoder.

I request that you include a GUI option in the next version that switches MadFLAC between SPLITTER-ONLY-MODE and SPLITTER & DECODER MODE.
is quite impressive so people still use ffdshow
ffdshow is old/buggy and does not support DTS somehow

Isochroma
28th August 2015, 22:32
Strange: My ffdshow filter provides two DTS-decode options: libdts & libavcodec.

It is your version of ffdshow that is old/buggy.

InstantAli3n
19th April 2016, 21:24
I've started seeing this recently.
http://i.imgur.com/CGQtbDr.png

madshi
19th April 2016, 22:05
Always double check with VirusTotal, if in doubt.

InstantAli3n
21st April 2016, 00:47
Always double check with VirusTotal, if in doubt.
No it's absolutely a false positive, but it's just started appearing recently and it's obviously not ideal as someone could unknowingly remove it.

I don't know who's in charge of virus databases, etc. but I though in this situation you'd want to contact them and let them know it's a false positive so it stops being detected?

madshi
21st April 2016, 08:10
False positives are rather common these days, sadly. I don't have a special connection to all those hundreds of anti-something software companies out there, so getting false positives removed isn't any easier for me than it would be for any user. So I'm relying on that users contact their anti-xxx devs to ask them to fix the problem, to save me some time.

zipi
22nd July 2016, 05:54
madshi, many thanks for madflac!
I see now that the flac page, flac was updated to 1.31 & looking at the git repo development is active.

I am wondering if madflac is supporting the new changes I see since version 1.3,
like RF64 and Wave64 for example.

madshi
22nd July 2016, 08:31
madshi, many thanks for madflac!
I see now that the flac page, flac was updated to 1.31 & looking at the git repo development is active.

I am wondering if madflac is supporting the new changes I see since version 1.3,
like RF64 and Wave64 for example.
FLAC development is usually for improving encoding, while madFlac is a simple decoder. The FLAC devs are of course extremely careful not to break compatability with existing decoders, so there's not really any need to update the FLAC library used by madFlac. Well, I don't know, maybe they slightly improved decoding performance, I don't know, but that's not really crucial.

RF64 and Wave64 are useful as intermediate formats for eac3to (encoding, transcoding, decoding, processing). But madFlac itself has the very specific purpose of doing decoding to WAV during DirectShow playback, and for this purpose RF64 and Wave64 are totally useless, from what I can see.

So if madFlac perfect and needs no update ever? No, I should probably add a 64bit version.

zipi
22nd July 2016, 17:27
FLAC development is usually for improving encoding, while madFlac is a simple decoder. The FLAC devs are of course extremely careful not to break compatability with existing decoders, so there's not really any need to update the FLAC library used by madFlac. Well, I don't know, maybe they slightly improved decoding performance, I don't know, but that's not really crucial.

RF64 and Wave64 are useful as intermediate formats for eac3to (encoding, transcoding, decoding, processing). But madFlac itself has the very specific purpose of doing decoding to WAV during DirectShow playback, and for this purpose RF64 and Wave64 are totally useless, from what I can see.


Thank you very much madshi, for looking into this.

Yes of course I understand that maybe a feature of direct output by madflac to these formats is not the priority,

but what I was wondering is about are a few things I read in the flac change log.

for example:
If without the library update
as is - if madflac 1.10 will be able to decode these files,
as these formats used for 4gb+ files,

Or if the new "Read and write appropriate channel masks for 6.1 and 7.1 surround input WAV files."
(quoting the flac change log)
the new flac encodes to, can be translated the same?

(Probably there are more my quick look missed,
as this is the first update in flac development in a few years now.)

madshi
22nd July 2016, 20:13
I don't think any of that should be an issue. FLAC files created by eac3to have always had proper channel masks.

Brazil2
19th September 2016, 09:16
madFlac can't play this real 32 bits FLAC: http://files.1f0.de/samples/big/Flac32.flac

But this file is not a problem for many other softwares like VLC, foobar2000, AIMP and ffmpeg/ffplay.