Printable Version of Topic
Click here to view this topic in its original format
Unofficial VirtualDub Support Forums > Codec Discussion > New AAC ACM Codec


Posted by: fccHandler Feb 20 2011, 11:21 PM
I have released a new AAC codec which makes it possible to preview and decode AAC in VirtualDub. The framework and usage is similar to my AC-3 ACM codec, however there are two important things to note:

Encoding AAC is not possible yet! Only decoding works.

Currently only a 32-bit version is available. The 64-bit target fails to build due to lack of support in libfaad.

http://fcchandler.home.comcast.net/AACACM

I welcome all comments and bug reports.
Enjoy. cool.gif

Posted by: fccHandler Feb 20 2011, 11:47 PM
I've withdrawn the download temporarily due to a problem I've just identified with this codec. There is some kind of conflict with AC-3 ACM and I will need to resolve it. Stay tuned.

Posted by: ale5000 Feb 20 2011, 11:53 PM
If it is the codec that disappear from the list on Windows XP, it happen also with Vorbis and some others ACM codecs.

PS: A big thanks for this codec.

Posted by: fccHandler Feb 21 2011, 12:23 AM
Yeah, they keep disappearing in Control Panel, and I don't understand it. Anyway I panicked but things still seem to be working (sort of). I've put the download back up. There is also a new build of the Matroska plugin with code to wrap the AAC frames in ADTS headers.

Posted by: ale5000 Feb 21 2011, 12:27 AM
Edit: Post removed

Posted by: Jam One Feb 21 2011, 06:50 PM
QUOTE (fccHandler @ Feb 21 2011, 04:23 AM)
Yeah, they keep disappearing in Control Panel...

There is some kind of limitation, as far as I understood this case --
for some formats only one codec may be present in the system.
For AC-3 audio, for example.
A while ago I mentioned a problem with an AC-3 decoder. Initially I thought the problem was related to fccHandler's AC-3.acm (due to behavior of the list of codecs in Control Panel).
Later on it was concluded that the reason was the conflict, the fact of presence of the ffdshow registered to decode AC-3.




Many thanks for your outstanding work, fccHandler !

Posted by: ale5000 Feb 21 2011, 07:04 PM
ffdshow has VFW codecs, not ACM, so it can't be.

Posted by: fccHandler Feb 21 2011, 07:30 PM
It turns out that I only had to change one line in libfaad to get a successful x64 build. However I have no way to test it myself so I have no idea whether it will work:

http://fcchandler.home.comcast.net/AACACM

Regarding Control Panel, I am experiencing the same issue and it seems to be a very old bug in Windows XP. I haven't found any workaround for it. Searching the web brings up a lot of hits though...

http://www.google.com/url?q=http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/XP/Q_21607723.html&sa=U&ei=p7tiTbSZLsODtgfPh9zADA&ved=0CBEQFjAA&usg=AFQjCNHcRY4Mix-E2E1bfDLtTq9ZxI5gfw
http://www.tech-archive.net/Archive/WinXP/microsoft.public.windowsxp.music/2005-11/msg00083.html

Sound familiar? That second link even mentions AC3ACM.

Posted by: fccHandler Feb 21 2011, 07:40 PM
QUOTE (Jam One @ Feb 21 2011, 02:50 PM)
for some formats only one codec may be present in the system.

I believe this is true as well.

I remember a long time ago I was getting reports that AC3ACM would tend to override the AC3Filter of valex in a DirectShow filter graph. Many versions later I stopped hearing about it, so maybe I did something that changed the behavior. (But if so I don't know what it was...)

Posted by: ale5000 Feb 21 2011, 08:47 PM
There is an ACM Wrapper that expose ACM codecs to DirectShow (so there can be conflict in DirectShow) but not the opposite, so in place where it use ACM there shouldn't be any problem.

@fccHandler: Is it possible that there is a sort of unique ID/name/other thing in the ACM codec that when equal to another it cause that strange problem?

We should think why the problem doesn't happen with windows default ACM codecs.

Edit: When there are the Fraunhofer MP3 ACM codec (the one that come with Windows) and the Lame codec, that handle the same format, then the problem doesn't happen.

It is just an idea but could it be that it happen with ACM codecs that support "Extensible wave format"?


Edit2:

Fraunhofer MP3 e Lame: OK
Fraunhofer MP3 e Lame e AC-3: OK
Fraunhofer MP3 e Lame e AAC: OK

Lame e AC-3: OK
Lame e AAC: OK

Aud-X e AC-3: OK
Aud-X e AAC: OK

Aud-X e Lame: Bug
AC-3 e AAC: Bug

Posted by: fccHandler Feb 26 2011, 02:01 AM
QUOTE (ale5000 @ Feb 21 2011, 04:47 PM)
Is it possible that there is a sort of unique ID/name/other thing in the ACM codec that when equal to another it cause that strange problem?

I had thought of that too, but I've been over every part of the AAC code (and .inf) and there are no identifiers in common with AC3ACM.

QUOTE
We should think why the problem doesn't happen with windows default ACM codecs.

As I recall, if you rearrange the priorities you will have weird behavior with them too. See:
HKCU\Software\Microsoft\Multimedia\Audio Compression Manager\Priority v4.00

QUOTE
It is just an idea but could it be that it happen with ACM codecs that support "Extensible wave format"?

This sounded plausible to me when you first said it, but I just looked at the source code and my last version of AC3ACM (1.5) doesn't support WAVE_FORMAT_EXTENSIBLE. Neither does the AAC codec.

Your test results are definitely interesting. I plan to do some tests of my own this weekend.

Posted by: fccHandler Feb 26 2011, 04:22 AM
A confession... Sometimes I am guilty of saying that I've tested my stuff on Windows 98SE when really I haven't. But I just now tested AAC ACM and it works. Furthermore the Windows 98 control panel does not exhibit any of the problems we have discussed here! It works just fine. I think our good friends at Microsoft broke it. tongue.gif

Posted by: ale5000 Feb 26 2011, 10:17 AM
Edit: Post removed.

Posted by: ale5000 Feb 26 2011, 10:26 AM
QUOTE (fccHandler @ Feb 26 2011, 03:01 AM)
As I recall, if you rearrange the priorities you will have weird behavior with them too.  See:
HKCU\Software\Microsoft\Multimedia\Audio Compression Manager\Priority v4.00

The problem is that by default (with an empty HKCU\Software\Microsoft\Multimedia\Audio Compression Manager\Priority v4.00) it have an unspecified order (if someone find how to detect this please tell me) and if you change only one priority it will write the priority of all ACM codecs in HKCU\Software\Microsoft\Multimedia\Audio Compression Manager\Priority v4.00 but when you add an ACM codec it doesn't change the priority list (so some have it and some not) so the behaviour is also more unknown.

Posted by: fccHandler Feb 26 2011, 05:23 PM
Just give up on it, my friend. It's totally broken.

In other news I've added support for raw AAC streams. So far it seems to be working well, therefore I've decided to reverse the logic of the FLV and Matroska plugins so that raw AAC is the default (as it was before). I will upload new builds of those plugins soon.

http://fcchandler.home.comcast.net/AACACM

Posted by: Jam One Feb 26 2011, 07:27 PM
God bless you, fccHandler!

Posted by: ale5000 Feb 26 2011, 08:57 PM
Edit: Post removed.

Posted by: v0lt Feb 27 2011, 05:56 AM
http://www.mediafire.com/?99q2c8h0u4aixd0
AC3 track - normal
AAC track - moos sad.gif

More:
http://samples.mplayerhq.hu/A-codecs/AAC/faad2-fail.mkv
http://www.mediafire.com/?4yhddz5uypn3ey8 (listen at the end of the sample)

Posted by: fccHandler Feb 27 2011, 06:35 AM
I noticed the Manhole problem as well. I don't know yet why it happens. Thank you for posting the others; I will look into those.

Posted by: fccHandler Feb 27 2011, 06:47 PM
Well I know what's happening and it's pretty bad.

What these files all have in common is multichannel audio. AACACM (being based on AC3ACM) was not checking the channel count on acmStreamOpen. This was fine for AC3ACM because it can internally convert any number of channels to any other, but AACACM cannot!

Therefore I added a check to ensure that the output number of channels equals the input, but now all multichannel audio fails. What I see in the debugger is that VirtualDub makes exactly one query with source channels = 6 and destination channels = 2. This query fails (as expected) but VirtualDub makes no other attempts and just gives up.

I seem to remember some support for WAVE_FORMAT_EXTENSIBLE in VirtualDub's source code so it's possible he's making extensible queries as well, but currently AACACM doesn't support that.

To make a long story short, what you are hearing is 6 channel PCM incorrectly being played back as 2 channel PCM. I am going to have to think about how best to resolve this...

Note that faad2-fail.mkv hangs during loading because it is cut off in the middle. This however is an easy fix which will be in the next release of the Matroska plugin.

Posted by: phaeron Feb 27 2011, 10:59 PM
VirtualDub doesn't have logic for downmixing 5.1 or 7.1 audio to stereo and relies on the codec to do so. It does support WAVEFORMATEXTENSIBLE to some extent, but that won't let you bypass a channel count mismatch.

IIRC, there were some nasty ambiguities when passing 5.1 through WAVEFORMATEX since there were at least two common channel orderings in use; I think WAVEFORMATEXTENSIBLE has support for specifying the mapping so that might be more doable.

Posted by: Dstruct Feb 28 2011, 01:46 PM
AAC ACM 1.2


If both (AC-3 ACM and AAC ACM) are installed, you get the configuration dialog of the AC-3 ACM codec also for the AAC ACM codec. No chance to view the AAC ACM config dialog in this case!


Second bug: Uninstallation via Control Panel not working (XP SP3)! FIXED (1.3)

Posted by: ale5000 Feb 28 2011, 01:52 PM
QUOTE (Dstruct @ Feb 28 2011, 02:46 PM)
If both (AC-3 ACM and AAC ACM) are installed, you get the configuration dialog of the AC-3 ACM codec also for the AAC ACM codec. No chance to view the AAC ACM config dialog in this case!

This is a windows bug and cannot be fixed, noone has found a way to workaround it yet (maybe).

Posted by: ale5000 Feb 28 2011, 08:30 PM
The inf of acm codecs seems to set HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaResources\msacm
but windows seems to read HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaResources\acm

I have used regmon and I have discovered that windows really does a infinite number of useless registry read and it has a lot of buffer overflow.

I open the properties of Indeo Audio ACM (or another it doesn't matter), then when I click Cancel windows do this:
QUOTE

120.02949524 rundll32.exe:2752 OpenKey HKCU SUCCESS Access: 0x2000000 
120.02954102 rundll32.exe:2752 CreateKey HKCU\Software\Microsoft\Multimedia\Audio Compression Manager\ SUCCESS Access: 0x20006 
120.02956390 rundll32.exe:2752 CloseKey HKCU SUCCESS 
120.02960205 rundll32.exe:2752 CreateKey HKCU\Software\Microsoft\Multimedia\Audio Compression Manager\Priority v4.00 SUCCESS Access: 0x2001F 
120.02962494 rundll32.exe:2752 CloseKey HKCU\Software\Microsoft\Multimedia\Audio Compression Manager\ SUCCESS 
120.02965546 rundll32.exe:2752 QueryValue HKCU\Software\Microsoft\Multimedia\Audio Compression Manager\Priority v4.00\Priority1 NOT FOUND 
120.02968597 rundll32.exe:2752 CloseKey HKCU\Software\Microsoft\Multimedia\Audio Compression Manager\Priority v4.00 SUCCESS 
120.03001404 rundll32.exe:2752 QueryValue HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32\msacm.ac3acm SUCCESS "AC3ACM.acm"
120.03010559 rundll32.exe:2752 OpenKey HKCU\Software\Freeware\AC3ACM NOT FOUND 
120.03021240 rundll32.exe:2752 QueryValue HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32\msacm.aacacm SUCCESS "AACACM.acm"
120.03028107 rundll32.exe:2752 OpenKey HKCU\Software\Freeware\fccHandler\AACACM NOT FOUND 
120.03038025 rundll32.exe:2752 QueryValue HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32\msacm.ac3filter SUCCESS "ac3filter.acm"
Why it read these three acm codecs when I just closed Indeo Audio ACM?

Posted by: fccHandler Mar 5 2011, 08:48 PM
I have fixed the uninstall issue on Windows XP, but nothing else so far:

http://fcchandler.home.comcast.net/AACACM

ale5000: I can't answer all of your questions, but you were right about the "MediaResources\msacm" key being misnamed! The key exists on Windows 98 as "acm" but doesn't exist at all on Windows XP. I've corrected this in the inf file. Thank you for finding it.

As for the meaning of that key? I have no idea. rolleyes.gif

Posted by: ale5000 Mar 6 2011, 02:35 AM
Edit: Problem fixed

Posted by: fccHandler Mar 6 2011, 04:24 AM
I saw your post just in time, since I was about to upload version 1.4:

http://fcchandler.home.comcast.net/AACACM

I agree and in fact prefer "HKCU\Software\fccHandler". cool.gif

Version 1.4 will now play multichannel AAC correctly but it does so via a downmix to stereo. I don't like having to do this, but I've spent all day on it and I can't figure out how to get VirtualDub to accept multichannel PCM.

I even tried hacking VirtualDub. There is a line in the Riza project, w32audiocodec.cpp, which I thought might be responsible:

CODE
// sanitize the destination format a bit

if (mDstFormat->mChannels != 1 && mDstFormat->mChannels !=2)
   mDstFormat->mChannels = 2;


So I tried removing that line, and that did cause him to request 6 channel PCM. But when pressing play it just hangs. I can only guess that there is some other part of the audio pipeline which is not liking multichannel PCM...

Posted by: ale5000 Mar 6 2011, 04:43 AM
1) Probably it can't help you since it isn't opensource but there is a multichannel mp3 acm codec: http://www.videoaudio.pl/infusions/pro_download_panel/download.php?did=46

2) This can help (probably):
QUOTE
Aud-X Team has prepared a special edition of VirtualDubMod. This version is capable of cooperating with 6 channel ACM audio encoders (including Aud-X ACM encoder). We hope that these changes will be included in main stream VDM editions

Download Full Project  [ 64.59 MB ]
Download Modified Files Only [ 40 kB ]

The changes concern:

(files Audio.h, Audio.cpp)

- Fixed: bool AudioCompressor::Process(), so that it processes six channel signals properly.

- Fixed: audio stream source creation, so that if no change of sampling rate or no change of channels number is selected, then satisfaction of this constraint is indeed ensured (it is enforced on ACM codec when asking about format suggestion).


(file Dub.cpp)

- Fixed: audio stream source creation


(optdlg.cpp)

- Fixed: label "no change" for channels section of options dialog, so that if source has six channels, "5.1" is shown in the adjacent brackets instead of "stereo".

Posted by: v0lt Mar 6 2011, 04:45 AM
Version 1.4 works well, my files will not moo. smile.gif
Thank you!

Posted by: JaliM Mar 7 2011, 02:50 PM
@fccHandler: I've been testing AAC ACM Codec 1.4 and Matroska plugin. and I've found some anomalities.... Firstly, 32 KHz, 44,1 KHz & 32 KHz MKV-LC-AAC files are supported in stereo mode only. If LC-AAC files are MONO then VirtualDub plays it at HALF-SPEED. If LC-AAC files are 5.1 then VirtualDub does not detect them (no audio info).
Note that all tests have been achieved with Matroska files with one AVC videostream and LC-ACC content, without ADTS headers. Not tested with AVIs or FLVs or with ATDS AAC streams.

Posted by: ale5000 Mar 11 2011, 02:23 PM
Does the codec support the 0x706D=FAAD AAC tag in addition to 0x00FF=AAC?

Posted by: ale5000 Mar 11 2011, 03:18 PM
Edit: Post removed

Posted by: ale5000 Mar 13 2011, 03:57 PM
Updated .inf and .bat files: http://forums.virtualdub.org/index.php?act=ST&f=3&t=19757&st=30#entry85120

Posted by: ale5000 Mar 13 2011, 04:03 PM
Edit: Post removed.

Posted by: fccHandler Mar 19 2011, 04:08 AM
QUOTE (JaliM @ Mar 7 2011, 10:50 AM)
@fccHandler: I've been testing AAC ACM Codec 1.4 and Matroska plugin. and I've found some anomalities.... Firstly, 32 KHz, 44,1 KHz & 32 KHz MKV-LC-AAC files are supported in stereo mode only. If LC-AAC files are MONO then VirtualDub plays it at HALF-SPEED. If LC-AAC files are 5.1 then VirtualDub does not detect them (no audio info).
Note that all tests have been achieved with Matroska files with one AVC videostream and LC-ACC content, without ADTS headers. Not tested with AVIs or FLVs or with ATDS AAC streams.

I am not able to reproduce. Can you provide me a link to some examples which exhibit these issues?

I don't necessarily need the whole file; a one megabyte chunk of the beginning of the file should be sufficient.

Posted by: fccHandler Mar 19 2011, 04:09 AM
QUOTE (ale5000 @ Mar 11 2011, 10:23 AM)
Does the codec support the 0x706D=FAAD AAC tag in addition to 0x00FF=AAC?

No. It knows about it, but does not expose it to ACM. I have not yet found any examples using this tag.

Posted by: fccHandler Mar 19 2011, 04:53 PM
Version 1.5 of AACACM is available:
http://fcchandler.home.comcast.net/AACACM

You'll notice I added the new .inf and .bat files from ale5000. Thank you very much for these!

The only other change is to ignore the id bit in ADTS headers. This will be essential when I next update the FLV and Matroska plugins, because they will present the bit reversed from what it was before (see http://forums.virtualdub.org/index.php?act=ST&f=7&t=19821&hl=&#entry84550).

Posted by: fccHandler Mar 20 2011, 01:23 AM
I have added the new .inf and .bat files from ale5000 to the AC3ACM codec as well:
http://fcchandler.home.comcast.net/AC3ACM

Note: There was a broken version 1.6 on the website for about 5 hours today (while I was still working on it). If you happened to download AC3ACM version 1.6 prior to this official announcement, please download it again.

Posted by: ale5000 Mar 20 2011, 02:49 AM
Edit: Problem fixed

Posted by: ale5000 Mar 20 2011, 03:21 AM
This file (207469.avi) is played at low speed in VirtualDub.

VLC and MediaInfo don't detect SBR in it.
I had a discussion some time ago with the developer of MediaInfo and come to conclusion that probably libfaad2 detect SBR in all files with low sampling rate.
Have you found any file with sampling rate of 22.05 KHz where libfaad doesn't detect the SBR?

Edit: If you play the file with libavcodec through ffdshow-tryout it is played as 22050 Hz withOUT SBR
instead if you play the file with libfaad2 through ffdshow-tryout it is played as 44100 Hz with SBR.
But the file is played fine in both cases.

Posted by: fccHandler Mar 20 2011, 04:17 AM
Sheesh, I can't believe I missed that in the .inf files. I do consider it urgent, but I refuse to bump the version number over this! So sue me. tongue.gif

http://fcchandler.home.comcast.net/AC3ACM

Regarding 207469.avi, I have no control over the sample rate in an AVI file. If the AVI audio header declares that the sample rate is 22050 Hz (as this one does), then that is indeed what you will hear.

Interestingly, MPlayer gets stuck in an endless loop when playing this file.

To date I have never found any AAC audio which truly plays at 22050 Hz. I think if SBR is not stated explicitly, we must assume that anything <= 24000 Hz is meant to be played back at double rate. I see this logic also in the faad2 source code.

Posted by: ale5000 Mar 20 2011, 04:57 AM
Edit: Post removed

Posted by: JaliM Mar 20 2011, 07:52 AM
QUOTE (fccHandler @ Mar 19 2011, 04:08 AM)
QUOTE (JaliM @ Mar 7 2011, 10:50 AM)
@fccHandler: I've been testing AAC ACM Codec 1.4 and Matroska plugin. and I've found some anomalities.... Firstly, 32 KHz, 44,1 KHz & 32 KHz MKV-LC-AAC files are supported in stereo mode only. If LC-AAC files are MONO then VirtualDub plays it at HALF-SPEED. If LC-AAC files are 5.1 then VirtualDub does not detect them (no audio info).
Note that all tests have been achieved with Matroska files with one AVC videostream and LC-ACC content, without ADTS headers. Not tested with AVIs or FLVs or with ATDS AAC streams.

I am not able to reproduce. Can you provide me a link to some examples which exhibit these issues?

I don't necessarily need the whole file; a one megabyte chunk of the beginning of the file should be sufficient.

Please, test this file. It's 44100 Hz mono and is played at half speed in VDub. VLC, Mplayer & MPHC play right.

http://www.mediafire.com/?ae105dbai0appb0

Posted by: ale5000 Mar 20 2011, 09:30 AM
Edit: Post removed

Posted by: fccHandler Mar 20 2011, 05:55 PM
I don't think it is actually misdetecting it, rather libfaad2 seems to always return stereo data due to an assumption of implicit PS in the decoder. I have added some code to downsample this when the client indicates that the AAC is actually mono.

http://fcchandler.home.comcast.net/AACACM

Posted by: ale5000 Mar 20 2011, 07:20 PM
Edit: Post removed

Posted by: malky Mar 29 2011, 11:21 PM
Cannot get it to install on Windows 7 64.

http://www.postimage.org/


Posted by: ale5000 Mar 30 2011, 12:10 AM
Edit: Post removed

Posted by: ale5000 Mar 30 2011, 06:59 PM
Edit: Post removed

Posted by: ale5000 Apr 1 2011, 01:05 PM
QUOTE (fccHandler @ Mar 19 2011, 05:09 AM)
QUOTE (ale5000 @ Mar 11 2011, 10:23 AM)
Does the codec support the 0x706D=FAAD AAC tag in addition to 0x00FF=AAC?

No. It knows about it, but does not expose it to ACM. I have not yet found any examples using this tag.

Test file with 706D audio: (link no longer working)

Posted by: ale5000 Apr 11 2011, 06:50 PM
Test file (avi with AAC audio): (link no longer working)

VirtualDub say:
CODE
The audio codec reported an error while decompressing audio data.

Error code: 1 (MMSYSERR_ERROR)

Posted by: ale5000 Apr 21 2011, 12:14 PM
Note: You must use the x86 folder for using with 32-bit VirtualDub instead the x64 folder for using with 64-bit VirtualDub (the bit of Windows doesn't matter).

Changes:
- Added a workaround to the "lost current dir", so now right click and "Run as administrator" on the .bat files works fine
- Added clear messages in .bat files when a problem happens
- Corrected the ReadMe.txt
- Removed the codec from ActiveMovie cache on uninstall
- Exposed the codec to some Microsoft applications

Edit: The updated .inf/.bat files of AACACM and AC3ACM are now included in the official version.

Posted by: fccHandler Jul 2 2011, 05:50 AM
I finally updated the codecs with the fixes of ale5000:

http://fcchandler.home.comcast.net/AC3ACM
http://fcchandler.home.comcast.net/AACACM

BTW, I did look into supporting tag 0x706D, but the file you posted is missing an AudioSpecificConfig structure after the WAVEFORMATEX header. Without that information I have to play yet another guessing game, and I am really tired of playing that game. For now I have decided not to support tag 0x706D.

Posted by: ale5000 Jul 2 2011, 01:58 PM
Are you sure it must be guessed?
I don't really know but the change in mkvtoolnix to support this file look so simple.

Look at this change (Fixed handling AVIs with AAC audio format tag 0x706d and bogus private data size): https://github.com/mbunkus/mkvtoolnix/commit/ab6f77f218c0c28e2335c7888045ad13890084dd

Posted by: fccHandler Jul 2 2011, 06:55 PM
The difference is that mkvtoolnix has full access to the AAC stream in the file. The AACACM codec does not. At the time of audio format negotiation, all he knows about the stream is what is contained in the WAVEFORMATEX structure; that's it.

If the base values there (channels, sample rate) are correct then it's all good. But that's not a safe assumption, since I have seen lots of examples (mostly from you) in which the WAVEFORMAT fields do not match the real AAC properties in AudioSpecificConfig.

So yes, it is a guessing game and I refuse to play. It is too easy to be fooled and guess wrong in this case.

Posted by: ale5000 Jul 3 2011, 03:47 PM
I don't know about others but in the case of "divxFaac51.avi" the channels, sample rate detected by VirtualDub seems correct.

Posted by: fccHandler Jul 3 2011, 07:37 PM
QUOTE (ale5000 @ Apr 11 2011, 02:50 PM)
Test file (avi with AAC audio): http://www.megaupload.com/?d=IQNGXWOW

VirtualDub say:
CODE
The audio codec reported an error while decompressing audio data.

Error code: 1 (MMSYSERR_ERROR)

Well, you've stumped me with this one. sad.gif

No matter what I do, faad2 absolutely refuses to decode this stream. I've been following it in the debugger all morning and it's just one error after another. I give up.

I confess that I really don't know enough about the structure of AAC to understand what the problem is. I've always depended on faad2 to "just work"...

Posted by: ale5000 Jul 3 2011, 08:39 PM
It is really a strange problem because VLC fail while ffdshow (with microsoft avi splitter) play the audio correctly; both use faad2.

Posted by: ale5000 Dec 6 2011, 03:56 PM
QUOTE (fccHandler @ Jul 2 2011, 06:50 AM)
BTW, I did look into supporting tag 0x706D, but the file you posted is missing an AudioSpecificConfig structure after the WAVEFORMATEX header.  Without that information I have to play yet another guessing game, and I am really tired of playing that game.  For now I have decided not to support tag 0x706D.

Sample file (706D - Hatsune Miku.avi - 4.73 MB)

This is another sample of 706D audio but this is more compliant to AVI specs.
On my pc it play in DirectShow players using CoreAVC for video and ffdshow-tryout for audio.

Could you give a look and see if it is easier to support, please?

Posted by: Spider-Mann Dec 17 2011, 09:03 AM
I have modded the install-scripts for these Codecs:

http://fcchandler.home.comcast.net/AC3ACM

Install-AC3.bat
CODE
If %PROCESSOR_ARCHITECTURE%==x86 (
rem -- For 32bit Windows versions
rundll32 setupapi.dll,InstallHinfSection DefaultInstall 132 %~dp0x86\AC3ACM.inf
) Else (
rem -- For 64bit Windows versions
%SystemRoot%\Syswow64\rundll32 setupapi.dll,InstallHinfSection DefaultInstall 132 %~dp0x86\AC3ACM.inf
rundll32 setupapi.dll,InstallHinfSection DefaultInstall 132 %~dp0x64\AC3ACM_x64.inf
)
start notepad %~dp0gpl.txt

Uninstall-AC3.bat
CODE
If %PROCESSOR_ARCHITECTURE%==x86 (
rem -- For 32bit Windows versions
rundll32 setupapi.dll,InstallHinfSection DefaultUninstall 132 %SystemRoot%\Inf\AC3ACM.inf
) Else (
rem -- For 64bit Windows versions
%SystemRoot%\Syswow64\rundll32 setupapi.dll,InstallHinfSection DefaultUninstall 132 %SystemRoot%\Inf\AC3ACM.inf
rundll32 setupapi.dll,InstallHinfSection DefaultUninstall 132 %SystemRoot%\Inf\AC3ACM_x64.inf
)


http://fcchandler.home.comcast.net/AACACM

Install-AAC.bat
CODE
If %PROCESSOR_ARCHITECTURE%==x86 (
rem -- For 32bit Windows versions
rundll32 setupapi.dll,InstallHinfSection DefaultInstall 132 %~dp0x86\AACACM.inf
) Else (
rem -- For 64bit Windows versions
%SystemRoot%\Syswow64\rundll32 setupapi.dll,InstallHinfSection DefaultInstall 132 %~dp0x86\AACACM.inf
rundll32 setupapi.dll,InstallHinfSection DefaultInstall 132 %~dp0x64\AACACM_x64.inf
)
start notepad %~dp0gpl.txt

Uninstall-AAC.bat
CODE
If %PROCESSOR_ARCHITECTURE%==x86 (
rem -- For 32bit Windows versions
rundll32 setupapi.dll,InstallHinfSection DefaultUninstall 132 %SystemRoot%\Inf\AACACM.inf
) Else (
rem -- For 64bit Windows versions
%SystemRoot%\Syswow64\rundll32 setupapi.dll,InstallHinfSection DefaultUninstall 132 %SystemRoot%\Inf\AACACM.inf
rundll32 setupapi.dll,InstallHinfSection DefaultUninstall 132 %SystemRoot%\Inf\AACACM_x64.inf
)


Save the Scripts in the same folder with the gpl.txt and run.

Posted by: fccHandler Dec 17 2011, 09:23 PM
The only question I have is, when you double-click a .bat file does it launch in a 32-bit process or a 64-bit process? Because if it is a 32-bit process, I think it will perceive the PROCESSOR_ARCHITECTURE environment variable to be X86.

Posted by: dloneranger Dec 17 2011, 09:50 PM
.bat's launch in the native cmd environment, running as a 64 or 32 bit process
(you can check your own, by opening a cmd prompt, and just typing 'set' without quotes)
So, on my amd cpu, it shows as AMD64

Personally, I'd use InnoSetup instead of .bat files though and have a proper installer
That's what I used for the LameACM installer in my sig

Posted by: ale5000 Dec 17 2011, 10:01 PM
Personally I like to be able to choose if install the 32-bit version, the 64-bit version of both versions of the codec.
Also uninstall batches aren't necessary, since it can be done from "Add or Remove Programs".

Posted by: dloneranger Dec 17 2011, 10:18 PM
There's no reason an installer can't offer both if it's installed in an x64 environment, mine does, with 2 checkboxes

Saves the average user headaches with running .bat's as admin etc

Posted by: ale5000 Dec 17 2011, 10:55 PM
@dloneranger: I was talking only about the bat files of Spider-Mann.

Posted by: dloneranger Dec 17 2011, 11:32 PM
QUOTE
@dloneranger: I was talking only about the bat files of Spider-Mann.

Ah, gotcha

Posted by: ale5000 Dec 18 2011, 01:41 AM
Edit 2: Updated files => http://www.multiupload.com/NV6QRNZEMJ

Changes:
- Reduced the number of .bat files from 3 to 2
- Added the note of "Run as administrator" in .bat files for users that don't read the readme
- Minor changes

Tested on Windows XP, Windows XP x64 and Windows 7 64-bit.

Posted by: ale5000 Dec 18 2011, 04:07 AM
In the case you consider adding encoding support, maybe this library can help: http://tipok.org.ua/node/17

Posted by: fccHandler Dec 18 2011, 04:32 AM
QUOTE (ale5000 @ Dec 6 2011, 11:56 AM)

Sample file (706D - Hatsune Miku.avi - 4.73 MB): http://www.multiupload.com/VQC224UJ3H

This is another sample of 706D audio but this is more compliant to AVI specs.
On my pc it play in DirectShow players using CoreAVC for video and ffdshow-tryout for audio.

Could you give a look and see if it is easier to support, please?

I have been playing with this one, but it doesn't seem to be as compliant as you think. I've implemented support for tag 0x706D but your file will not play in VirtualDub due to errors from faad2. I think it is muxed in a strange way; for one thing the audio stream starts with a whole bunch of zeroes. I'm no expert on AAC bitstreams but I know at least that much ain't right.

The video won't play either in VirtualDub; ffdshow-tryouts just gives me a black screen. Unless I am running it in a debugger, in which case it gives me pink/purple garbage. Weird...

MPlayer plays it just fine.

Anyway 0x706D support will be in the next version, but I want it to be optional. Therefore I need to make the registry keys more user-friendly since the Windows XP Control Panel is pretty much useless for configuration.

I will go ahead and update the .bat files too.

As for AAC encoding, that is a major upgrade. I would like to do it, but methinks it won't be any time soon. For a long time AC3ACM did not have the ability to encode, and I remember it was something of a nightmare getting that to work.

Posted by: ale5000 Dec 18 2011, 12:33 PM
QUOTE (fccHandler @ Dec 18 2011, 05:32 AM)
Anyway 0x706D support will be in the next version, but I want it to be optional.  Therefore I need to make the registry keys more user-friendly since the Windows XP Control Panel is pretty much useless for configuration.

VirtualDub 1.10.1 test versions allow to access ACM codec configuration directly from inside VirtualDub (Audio => Compression => Configure).
Also you can export the "Configure" function in the dll so it can be run like x264vfw: rundll32.exe x264vfw.dll,Configure

Posted by: ale5000 Dec 19 2011, 05:07 PM
QUOTE (fccHandler @ Dec 18 2011, 05:32 AM)
The video won't play either in VirtualDub; ffdshow-tryouts just gives me a black screen. Unless I am running it in a debugger, in which case it gives me pink/purple garbage. Weird...

From my tests the video play in VirtualDub using x264vfw (not with ffdshow-tryouts VFW), and it play in DirectShow players with CoreAVC for video and ffdshow-tryouts for audio but it doesn't play when using ffdshow-tryouts for both video and audio.

Posted by: fccHandler Dec 22 2011, 04:08 AM
I found out today that the installers (.inf and .bat) for AC3ACM were completely broken on Windows 98. I had to make several changes to the 32-bit installer to get it to work properly on both 98 and XP. I don't know how these changes might impact Windows Vista and later...

I need to check AACACM as well before releasing a new version, because it will probably need the same changes. Stay tuned.

Posted by: fccHandler Jul 21 2012, 05:24 PM
I've uploaded new builds of AACACM 1.9 and AC3ACM 2.2 to satisfy a request for Windows 95 and Windows NT support:

http://fcchandler.home.comcast.net/AACACM

http://fcchandler.home.comcast.net/AC3ACM

(For the record, applications compiled with Visual Studio 2005 will not run on these old operating systems.)

I didn't do anything with the codecs (except recompile), but AACACM contains some old test code from when I was trying to add support for tag 0x706D. I don't know whether that part actually works, but it doesn't seem to have broken anything so I left it in.

Posted by: wsm-9t6 Aug 1 2012, 02:54 PM
First of all, apologies if this question has been already posted and answered, but...

well, it's not a problem really, but I'd like to know why the AAC ACM appears in the WMA "flavor list" of both WmNicEnc.exe and wav2wma.exe ohmy.gif

Powered by Invision Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)