View Full Version : ffdshow tryouts project: Discussion & Development
Thunderbolt8
1st November 2009, 11:43
My dual-core system is in repair for a week; I'll check it, but might not be able to until then.would be great, thanks!
jruggle
3rd November 2009, 03:39
it looks like this is ffmpeg problem.
I can normally decode audio using ffmpeg SVN 19894, but with svn 20421 I have a bunch of errors like:
[ac3 @ 0x2268070]error decoding the audio block
[ac3 @ 0x2268070]exponent out-of-range
and audio distorted in the same way...
EDIT:
ffmpeg-r20024 -> fine
ffmpeg-r20060 -> distorted
Thank you for reporting this and giving a sample. I did a lot of changes between 20036 and 20055. I will track down the problem and fix it as soon as possible.
edit: now fixed in r20437. sorry for the regression...
clsid
3rd November 2009, 15:05
Thanks!
leeperry
3rd November 2009, 21:42
Thank you for reporting this and giving a sample. I did a lot of changes between 20036 and 20055. I will track down the problem and fix it as soon as possible.
edit: now fixed in r20437. sorry for the regression...
oh, a ffmpeg developer :)
any chance you could make ffmpeg decode AC3 and DTS in 32float instead of 16 integer please? all the other AC3/DTS decoders in ffdshow output 32 float, this allows less rounding errors...especially when post-processing audio.
:thanks:
mark0077
4th November 2009, 13:50
oh, a ffmpeg developer :)
any chance you could make ffmpeg decode AC3 and DTS in 32float instead of 16 integer please? all the other AC3/DTS decoders in ffdshow output 32 float, this allows less rounding errors...especially when post-processing audio.
:thanks:
Gets my vote also :D
jruggle
4th November 2009, 18:45
oh, a ffmpeg developer :)
any chance you could make ffmpeg decode AC3 and DTS in 32float instead of 16 integer please? all the other AC3/DTS decoders in ffdshow output 32 float, this allows less rounding errors...especially when post-processing audio.
:thanks:
I'm not DTS maintainer, but for AC3 I have a patch mostly ready. It is a bit slower than the 16-bit decoding, so I will need to make it configurable to decode to either float32 or int16.
leeperry
4th November 2009, 20:29
oh cool, you're the man! actually liba52 sounds fine already(and is 32float), but it's still very nice to have an alternative http://forum.slysoft.com/images/smilies/agreed.gif
OTOH, libdts sounds pretty bad(32 float too)...so 32float DTS in ffmpeg would be really fantastic. thanks for your prompt reply btw, much appreciated http://forum-images.hardware.fr/images/perso/otakonleboss.gif
albain
5th November 2009, 11:25
Hi all,
here I am again with a new beta build for HD bitstream
Here is the link (http://www.mediafire.com/file/mfngmmtqjqh/ffdshow_rev3115_20091104_dbt_bitstream_beta26.zip)
In this build I have fixed TrueHD and DTS HD bistream from the logs you posted.
@tetsuo55
However DTS HD does not work because the HD blocks are stripped off by MPC splitter. I don't understand why, do you know something about it ?
@testers
I have posted an updated build of the hook tool on the same link I have PM. Please use this new build for the new tests, I have added traces on the media types used between the player and the audio card (the official MS media types are not accepted for all formats), and also on the wasapi implementation.
I need you redo the tests with the new hook tool
Mercury_22
5th November 2009, 11:43
Hi all,
...
@tetsuo55
However DTS HD does not work because the HD blocks are stripped off by MPC splitter. I don't understand why, do you know something about it ?
...
This apply to both MPC-HC's MPEG PS/TS/PVA and Matroska splitters ?
albain
5th November 2009, 11:45
It works for MKV (I receive the full DTS HD blocks), but not with M2TS files
THX-UltraII
5th November 2009, 12:20
Albain,
is this a version where DTS-master and TrueHD should work also for 4xxx users?
tetsuo55
5th November 2009, 12:23
I have browsed through the source, but i do not see any stripping code.
Source is here: http://sourceforge.net/apps/trac/mpc-hc/browser/trunk/src/filters/parser/mpegsplitter
albain
5th November 2009, 12:53
Albain,
is this a version where DTS-master and TrueHD should work also for 4xxx users?
Not for now : technically nothing prevents HD bitstream to work on those series. Only the PAP is missing.
The work to do on those is to trick the audio driver by providing LPCM format whereas it is compressed. This needs to be done after DTSHD/TrueHD/EAC3 bitstream completely work (from ffdshow to MPC wasapi audio renderer).
Otherwise, there is a problem with DTS HD : the HD blocks are not stripped off correctly by ffdshow, this needs to be fixed.
liquidskin76
5th November 2009, 13:01
@Albain
I'll try and give the beta build a test on my geforce 9300 at lunch time today. I'll be running the audio from an MKV container.
Will report back this afternoon if i can.
Cheers for all your hard work!
SamuriHL
5th November 2009, 14:27
Let me finish breakfast and I'll give it a try. I have been ridiculously busy with work the last week and that will continue til the end of the week unfortunately. However, I'll give it a shot and see what I can do.
liquidskin76
5th November 2009, 14:55
@Albain,
Here's my logs from beta26, using GeForce 9300 HDMI Audio, MKV container, and MatroskaSplitter (not Haali).
TrueHD passthrough enabled, get LPCM audio... (http://pastebin.com/pastebin.php?dl=m464914fc)
DTSHD passthrough enabled, get no audio... (http://pastebin.com/pastebin.php?dl=m3be23c4b)
AC3 and DTS appear to bitstream ok. With DTSHD disabled i get the DTS core bitstreamed ok.
Cheers
SamuriHL
5th November 2009, 15:12
@albain
http://pastebin.com/pastebin.php?dl=d2f084a8e
No joy on TrueHD. Light doesn't come on for it and I get no sound at all. I'll try to do the hook tests later if I can get to it.
THX-UltraII
5th November 2009, 15:30
CyberlinkUSA (Tom) just announced that PDVD9 will be updated later this month by a patch that give bitstream support for the 5xxx-cards.
So I was thinking: ''If Cyberlink can do it, why would others can't?''. Or is it a matter of a 'secret' that ATI only provided to Cyberlink?
Skinleech
5th November 2009, 16:02
Thanks albain.
I'll try the new hook tool when I have time - hopefully later on today and see how I get on. Though I expect I will still encounter issues unprotecting audiodg. Worth a try however.
@ SamuriHL, are you using your Xonar for these tests at all, or is it just your ATI card?
SamuriHL
5th November 2009, 16:09
This won't work on the Xonar. The hook tool is made for that, but, the tryouts are made for the ATI card. I'll get to the hook tool later. I just have a lot of work to get through today. (and have been for the past 2 weeks, unfortunately)
albain
5th November 2009, 16:19
@liquidskin76 : you don't have an ATI 5xxx right ?
The TrueHD/DTSHD media types are refused by the audio driver
This will be the next step (with the new hook tool)
Also the new hook tool will tell the buffers size to set.
I am surprised that TrueHD does not work at all, maybe this is due to the buffer size.
There are still differences between TMT implementation and FFDShow parsing : there is some extradata in TMT buffers at the beginning and at the end. Don't know what it is used for.
SamuriHL
5th November 2009, 16:21
It didn't work for me, so, I don't know. I grabbed the new hook tool a bit ago and will give it a shot in a bit.
madshi
5th November 2009, 16:26
There are still differences between TMT implementation and FFDShow parsing : there is some extradata in TMT buffers at the beginning and at the end. Don't know what it is used for.
Is the extra data static or dynamic? Can you post an example here?
Skinleech
5th November 2009, 16:26
This won't work on the Xonar. The hook tool is made for that, but, the tryouts are made for the ATI card. I'll get to the hook tool later. I just have a lot of work to get through today. (and have been for the past 2 weeks, unfortunately)
Sorry, I should rephrase what I meant: Will you be able to try the hook tool with the xonar, or just your ATI card?
I should have been more specific that I meant the hook tool.
I think I just realised my issue with dpinpurr - both of my systems are 64-bit. I might try and switch the xonar from my HTPC to another PC with 32-bit Windows on it.
Good luck on the work front...
SamuriHL
5th November 2009, 16:39
I can't get it to work. I get nothing in the bitstream.txt file. If I try to unlock audiodg manually I get an internal error. No idea what to tell you but I simply can't get anything to log.
SamuriHL
5th November 2009, 16:41
Sorry, I should rephrase what I meant: Will you be able to try the hook tool with the xonar, or just your ATI card?
I should have been more specific that I meant the hook tool.
I think I just realised my issue with dpinpurr - both of my systems are 64-bit. I might try and switch the xonar from my HTPC to another PC with 32-bit Windows on it.
Good luck on the work front...
It doesn't work for me, either. I'm also on 64 bit, so, if that's the issue then I'm screwed with regard to that tool. The tool doesn't work with the ATI....what exactly are you going to use to bitstream with it? :) It'll work with an auzentech and PDVD9 or a Xonar with TMT3. That's pretty much it.
liquidskin76
5th November 2009, 16:43
@liquidskin76 : you don't have an ATI 5xxx right ?
The TrueHD/DTSHD media types are refused by the audio driver
This will be the next step (with the new hook tool)
Also the new hook tool will tell the buffers size to set.
I am surprised that TrueHD does not work at all, maybe this is due to the buffer size.
There are still differences between TMT implementation and FFDShow parsing : there is some extradata in TMT buffers at the beginning and at the end. Don't know what it is used for.
@Albain,
No, i'm on a Zotac GeForce 9300 motherboard that has NVidia HDMI audio. Before hand i was testing on Asus ION motherboard however that was also GeForce 9300 with NVidia HDMI audio.
So far my result have pretty much matched SamuriHL's ATi 5xxx tests.
Do you want me to run the new hook tool on the NVidia HDMI audio?
Thanks
albain
5th November 2009, 16:47
Is the extra data static or dynamic? Can you post an example here?
Sure :
In red this is the IEC header, in blue the TrueHD frame, and in the middle the extra data
72F81F4E1600F0EF9E070300018401010080A556F43B83818049E077A0B0CFFE72F8BA6F17000FA052B7...
A part of it is fixed, some other changes (extract from the next frames) :
9E070300018401010080A556F43B83818049E077A640B0FF
9E070300018401010080A556F43B83818049E07790B0D8FF
Then the last bytes of the buffer are always like this : C2C3C4C00000000000000000000011970000000000000000
The TrueHD frame size is always set to 61424 bytes and the total frame (IEC header+extra bytes 1+TrueHD frame+extra bytes2) are always 61440 long which corresponds to the IEC recommandations.
Something painful with WASAPI renderer is that the buffers are set in duration instead of bytes.
For now I didn't put extra bytes 1, and extra bytes 2 are filled in with zeros, and I fill the buffers frame by frame :
<IEC header>Major frame
<IEC header>Non major frame
...
<IEC header>Major frame
...
Lastly, as you said, the AC3 bytes are stripped off.
EDIT : one other thing, the TrueHD frames are not always stick to the IEC header, sometimes there are a bunch of zeros between, probably due to the time spacing between frames. There are also IEC recommandations about that. This will need to be done too
The full logs are accessible from here : http://forum.doom9.org/showthread.php?p=1339265#post1339265
@liquidskin
I don't know for before, but it can't work here because the format is refused as told in the logs :
[3656] TaudioParser::checkOutputFormat : the output sample format (compressed stream to bitstream) Bitstream Dolby True HD is not accepted by the renderer for codec bitstream Dolby True HD
Skinleech
5th November 2009, 16:51
I can't get it to work. I get nothing in the bitstream.txt file. If I try to unlock audiodg manually I get an internal error. No idea what to tell you but I simply can't get anything to log.
From what I read earlier, without audiodg unprotected you won't get anything in bitstream.txt and it definitely looks like dpinpurr doesn't work on 64bit.
I'll try my 32 bit vista install with the same commands and see if that works. If so, I'll transfer the xonar over to a machine with 32 bit to see if I can get a dump into the bitstream folder.
SamuriHL
5th November 2009, 16:55
From what I read earlier, without audiodg unprotected you won't get anything in bitstream.txt and it definitely looks like dpinpurr doesn't work on 64bit.
I'll try my 32 bit vista install with the same commands and see if that works. If so, I'll transfer the xonar over to a machine with 32 bit to see if I can get a dump into the bitstream folder.
Yea, I think 64 bit is hosing me, too. Sorry, albain, looks like I won't be much help with the hook tool. Hopefully others will be able to provide you with the info you need.
albain
5th November 2009, 17:00
In that case I need Sebastii who has a 32 bits version and supplied the logs from the previous hook version
SamuriHL
5th November 2009, 17:07
Who knew going 64 bit on all my machines except my netbook would be a bad thing. :D
madshi
5th November 2009, 17:39
Sure :
In red this is the IEC header, in blue the TrueHD frame, and in the middle the extra data
72F81F4E1600F0EF9E070300018401010080A556F43B83818049E077A0B0CFFE72F8BA6F17000FA052B7...
A part of it is fixed, some other changes (extract from the next frames) :
9E070300018401010080A556F43B83818049E077A640B0FF
9E070300018401010080A556F43B83818049E07790B0D8FF
Then the last bytes of the buffer are always like this : C2C3C4C00000000000000000000011970000000000000000
Not sure about all of those bytes. But I found some interesting information in google. Search for the following key words:
- "audio infoframe"
- "High Bitrate (HBR) Audio Stream Packet"
- hdmi_audio_infoframe
That should lead you to some interesting new information. It seems that the open source Intel HDMI drivers might help getting access to some of those structures... ;) I'm not sure yet whether the "audio infoframe" is identical to the "HBR Audio Stream Packet", or whether it's a subset, or something else...
albain
5th November 2009, 17:45
Okay thanks I will
But isn't the HDMI encapsulation handled by the audio/GPU driver ?
madshi
5th November 2009, 17:51
Okay thanks I will
But isn't the HDMI encapsulation handled by the audio/GPU driver ?
I've no idea. If I had written Windows, you could bitstream without even knowing what IEC headers are. Since you do have to manually add IEC headers, I think it's not an unrealistic thought that you may also have to add HDMI headers. Don't really know, though...
Edit: I think the "audio infoframe" is actually an entry in the EDID. So probably not what we're looking for... :( Not sure about this "High Bitrate (HBR) Audio Stream Packet" yet, though.
madshi
5th November 2009, 18:30
Maybe the HDMI 1.3a specification helps?
http://www.hdmi.org/download/HDMISpecification13a.pdf
Skinleech
5th November 2009, 18:33
Yea, I think 64 bit is hosing me, too. Sorry, albain, looks like I won't be much help with the hook tool. Hopefully others will be able to provide you with the info you need.
64bit is definitely the cause. I just tried it on my Vista 32 install on my main PC - no HD audio card in this, but I couldn't unprotect audiodg under Win7 x64. It worked fine on Vista x86.
I will try the Xonar for you Albain, but it won't be until at least Sunday as I will be away all weekend and doubt I can do it tonight.
SamuriHL
5th November 2009, 18:34
64bit is definitely the cause. I just tried it on my Vista 32 install on my main PC - no HD audio card in this, but I couldn't unprotect audiodg under Win7 x64. It worked fine on Vista x86.
I will try the Xonar for you Albain, but it won't be until at least Sunday as I will be away all weekend and doubt I can do it tonight.
That sucks. I wish there was a version for 64 bit.
Sebastiii
5th November 2009, 18:53
Hi, i'll make log tonight :) (in not very longtime lol)
Seb.
Sebastiii
5th November 2009, 20:58
In that case I need Sebastii who has a 32 bits version and supplied the logs from the previous hook version
With last Hook Tool, i can't get bitstream.txt.
I have try to put only Old version of DumpPCM.dll in new hook tool and it works (bitstream.txt grow up).
With the new DumpPCM.dll it doesn't work.
I'm in starting block to try to log :)
Sebastiii.
rica
5th November 2009, 23:49
It works for MKV (I receive the full DTS HD blocks), but not with M2TS files
I need an mkv file and audio renderer you used in your trials.
Btw finally i have an ati 5770 and an HDMI receiver.
albain
6th November 2009, 16:08
Great, I have made one DTS HD mkv sample.
But there is a bug in the current FFDShow beta for DTS HD, here is also the new build
Here is the MKV DTS HD sample (http://www.mediafire.com/file/mznbyzzyzmw/DTS-HD.MA.LOGO.71.24.96 - 1 - h264, 1080i60.mkv)
Here is the new FFDShow HD bitsteam beta 28 build (http://www.mediafire.com/file/jzzmmn3yejm/ffdshow_rev3115_20091106_dbt_bitstream_beta28.zip)
And here is the MPC wasapi audio renderer (http://www.mediafire.com/file/y2ngljjgiad/MpcAudioRendererFilter.zip) (compiled in debug mode, may be slow)
SamuriHL
6th November 2009, 16:31
Has anything changed that may help me with TrueHD bitstreaming?
rica
6th November 2009, 23:01
Thanks albain but i can't get any audio.
Mercury_22
6th November 2009, 23:33
It works for MKV (I receive the full DTS HD blocks), but not with M2TS files
@ albain can you please confirm that with MPC-HC rev 983 HD blocks are NOT stripped off from DTS-HD ?
Revision 984 - Directory Listing
Modified Sun Jan 25 20:01:24 2009 UTC (9 months, 1 week ago) by beliyaal
Added: Support for Blu-ray clip info (language for audio and subtitles in m2ts files)
Changed: Sort MPEC audio streams according to quality. The best quality stream will be played by default.
Fixed: Strip the non-core info from DTS-HD tracks until a decoder is available. Fixes problems with SPDIFer.
Fixed: If Blu-ray clip info is available all subtitle streams will be available from the start of the clip.
Keiyakusha
7th November 2009, 02:41
Thank you for reporting this and giving a sample. I did a lot of changes between 20036 and 20055. I will track down the problem and fix it as soon as possible.
edit: now fixed in r20437. sorry for the regression...
Hi. Thanks for your work! But it seems there is still a bit of distortion. I noticed it with my previous sample but it was hard to tell. Now I found another one (http://www.mediafire.com/file/mtmhtyzmmm2/sample2.AC3). I can hear some distortion at 5-6 second, which shouldn't be there.
Latest ffmpeg revision tested 20467 - distortion
As before, works fine with 20024 revision (closest revision to 20036-20055 that I have...).
No errors reported this time.
albain
7th November 2009, 11:33
Thanks albain but i can't get any audio.
Oh, I forgot, the official DTS HD media type is not accepted by radeon 5xxx.
I think this is a driver issue : AMD's driver is not ready for DTS HD bitstream or use a non official media type.
The alternative is to get the xonar's one from the new hook tool (which does'nt work for now :mad:, I am working on it with sebastii's help) which dumps the media types values
About TrueHD, nothing has changed, but I will try to analyze the current streams provided and somehow reproduce the extradata.
But the problem may come here from the wasapi audio renderer which is not correctly set.
@Mercury22
Right, this is due to this modification : in MpegSplitter.cpp, line 1449
if I replace #if 1 by #if 0 I can see DTS HD blocks again
else if (m_mt.subtype == MEDIASUBTYPE_DTS || m_mt.subtype == MEDIASUBTYPE_WAVE_DTS) // DTS HD MA data is causing trouble, lets just remove it
{
#if 0
Mercury_22
7th November 2009, 12:39
Oh, I forgot, the official DTS HD media type is not accepted by radeon 5xxx.
I think this is a driver issue : AMD's driver is not ready for DTS HD bitstream or use a non official media type.
The alternative is to get the xonar's one from the new hook tool (which does'nt work for now :mad:, I am working on it with sebastii's help) which dumps the media types values
About TrueHD, nothing has changed, but I will try to analyze the current streams provided and somehow reproduce the extradata.
But the problem may come here from the wasapi audio renderer which is not correctly set.
@Mercury22
Right, this is due to this modification : in MpegSplitter.cpp, line 1449
if I replace #if 1 by #if 0 I can see DTS HD blocks again
Can you please do that in the SVN ! so we can have DTS-HD with internal mpeg splitter too
:thanks:
albain
7th November 2009, 15:24
Can you please do that in the SVN ! so we can have DTS-HD with internal mpeg splitter too
:thanks:
Sure, give me a commit access to subversion !
My user is also albain on sourceforge
Mercury_22
7th November 2009, 16:45
Sure, give me a commit access to subversion !
My user is also albain on sourceforge
I thought you have commit access !:confused: I wish I could give it to you but I can't maybe Casimir or Tetsuo can do that
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.