View Full Version : madFlac - new DirectShow FLAC source filter + decoder
Pages :
1
[
2]
3
4
5
6
7
8
9
10
11
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
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.