View Full Version : No compatible ACM codec to decode 0x00FF audio stream to PCM
belonesox
2nd August 2013, 11:05
Hello.
Have video:
Stream #0:0: Video: h264 (High 4:2:2) (H264 / 0x34363248), yuv422p, 720x480
Stream #0:1: Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp, 256 kb/s
AAC ACM codec installed (http://www.free-codecs.com/download/AAC_ACM_Codec.htm)
When I try to open video with AVISource
results to fail:
"Avisynth open failure:No compatible ACM codec to decode 0x00FF audio stream to PCM."
What is wrong?
creaothceann
2nd August 2013, 17:20
Have you tried DirectShowSource?
f = "input.avi"
v = DSS2(f)
a = DirectShowSource(f, video=false)
AudioDub(v, a)
You can also convert the audio with mplayer:
mplayer input.avi -o output.wav -benchmark -vc null -vo null -ao pcm:waveheader
Or you can demux the audio with FLVextract (http://moitah.net/) and open it with the NicAudio (http://nicaudio.codeplex.com/) plugin.
tebasuna51
2nd August 2013, 18:44
...
Or you can demux the audio with FLVextract (http://moitah.net/) and open it with the NicAudio (http://nicaudio.codeplex.com/) plugin.
NicAudio can't open/decode AAC audio, try BassAudio instead.
belonesox
3rd August 2013, 18:23
Thank all for your answers.
Actually, I want to know, that exactly audio formats suppported by AVISource.
I think that the sentence «From v2.04 up there is built-in support for ACM (Audio Compression Manager) audio» from documentation means MP3/AAC support if
ACM AAC codec installed.
If this is not true, OK, I will made another workflow, with ffmpeg preprocessing and conversions.
/*
Actually, I develop framework for efficient publish of educational video, that must be absolutely omnivorous (users must know nothing about AVISynth).
*/
BTW, DirectShow is not an options because I have a lot of issues with it, AVISource much more reliable.
So, is anybody, how opens AVI with AAC by AVISource?
What audio codecs supported by AVISource?
creaothceann
4th August 2013, 00:32
BTW, DirectShow is not an options because I have a lot of issues with it, AVISource much more reliable.
Try DSS2. It's a function in avss.dll which is in the Haali splitter package (included e.g. in the k-Lite (http://www.codecguide.com/) codec pack).
StainlessS
4th August 2013, 11:56
Belonesox,
Codecs supported by AVIsource are those ACM codecs registered on your system.
see here http://www.nirsoft.net/utils/installed_codec.html
small utility by NirSoft, ~50Kb download.
Reino
4th August 2013, 16:44
Is this file its container also AVI? If you created this file yourself, you're much better off putting the streams in a MP4 container. The AVI container only has limited support for the H.264 video codec.
In Avisynth I would rather open the file, whether it's MKV, MP4, or AVI in this case, with FFmpegsource (https://code.google.com/p/ffmpegsource/downloads/list):
FFMpegSource2("input.xxx", atrack=-1)
belonesox
4th August 2013, 17:39
Thanks all for the answers.
Codecs supported by AVIsource are those ACM codecs registered on your system. … small utility by NirSoft,
Yes, ACM AAC codec is installed, but AVISource ignores it.
Proofshot with NirSoft utility (http://imgur.com/wXYcvJ2)
So, I just want to understand — this is a bug or a feature?
Is any ACM audio supported in AVISource? Or nobody tested this?
Try DSS2.
Unlike the original DSS, it does not support loading audio. (http://forum.doom9.org/showthread.php?t=134275)
So DSS2 useless for my goal - find a universal and reliable way of opening AVI-video with audio in AVISynth.
The problem is not with concrete video, I try build efficient and reliable framework for video publishing, where users must know nothing about AVS/plugins/formats etc.
I use AVI as standard media container because I use VirtualDub for previewing.
… FFMpegSource2…
FFVideoSource/FFAudioSource is very unefficient — them reindex input files even if container is AVI.
My "Plan B" if I decide that AVISource is unreliable for audio — export WAV64 audio by ffmpeg, and such exporting takes less time, that reindexing file by FFMS.
Wilbert
4th August 2013, 18:51
find a universal and reliable way of opening AVI-video with audio in AVISynth.
Can you open the file in Virtualdub? If not, the problem is perhaps not AviSource. Could you upload a sample somewhere?
belonesox
4th August 2013, 20:51
Can you open the file in Virtualdub?
Yes, I can open in VirtualDub.
Just made small sample (6MB (magnet:?xt=urn:btih:2135B1DE8F20D1B95EA8AB3138F3965CC62AB945&dn=bug-avisynth-aac&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce)).
StainlessS
5th August 2013, 01:05
Suggest that you find a method other than bit torrent for your sample, perhaps MediaFire.com
EDIT: and for images directly visible in your posts, try Photobucket.com, you dont have to wait for moderator approval,
just paste link into your post.
creaothceann
5th August 2013, 01:19
1. install BassAudio (http://forum.doom9.org/showthread.php?t=135855) plugins in Avisynth
2. open AVI file in VirtualDub, demux audio stream to temporary AAC file
3. start AVS script with DSS2("input.avi").AudioDub(BassAudioSource("tmp.aac"))
belonesox
5th August 2013, 10:24
Thanks all for your answers.
1. install BassAudio (http://forum.doom9.org/showthread.php?t=135855) plugins in Avisynth
2. open AVI file in VirtualDub, demux audio stream to temporary AAC file
3. start AVS script with DSS2("input.avi").AudioDub(BassAudioSource("tmp.aac"))
I make automated process (for processing 10000 videos per year) videos without manual GUI work (VirtualDub, menus, etc).
So already have even more reliable "Plan B":
* just export any audio from input file to WAV64 by ffmpeg
* open this WAV64 by NicAudio.
But this process introduces some time expenses (export of audio), so I am interested, is it possible to avoid this.
If no — OK, I will make a fully automated process, because now I will know, that AVISource badly opens audio.
Suggest that you find a method other than bit torrent for your sample, perhaps MediaFire.com
OK, "bug sample" as link to shared Dropbox folder (https://www.dropbox.com/sh/0zt2n09swx9pdeu/hfVwwxcnkI).
Reino
5th August 2013, 12:35
But this process introduces some time expenses (export of audio), so I am interested, is it possible to avoid this.So decoding these 9h soundtracks to WAV64, and these files will be enormous(!), is no problem for you, while it troubles you that FFMS indexes your files. That's confusing.
But let's be honoust, you wouldn't have these problems if you weren't trying to put H.264 and AAC in an AVI-container; a container in which these 2 formats don't belong in the first place.
belonesox
5th August 2013, 19:11
So decoding these 9h soundtracks to WAV64, and these files will be enormous(!), is no problem for you, while it troubles you that FFMS indexes your files.
Yes. WAV-files a big, but negligibly smaller than video content (I works with 120GB DV videos, and even bigger x264lossless videos).
And yes, exporting audio by FFMPEG is more fast and bulletproof reliable.
But if AVIFile works as expected with ACM AVI codecs, that will be even better. It is pity, that is does not possible, accorning to my experience (nobody in the thread not found solution for the issue).
May be I could build and debug AVISynth to fix it, but … now I must build reliable workaround.
But let's be honoust, you wouldn't have these problems if you weren't trying to put H.264 and AAC in an AVI-container; a container in which these 2 formats don't belong in the first place.
I am not "trying to put". I try to make framework that can input MOST of possible input format, even such vanilla AVI with "x264+AAC". And I try to understand the limits of AVISynth input.
Thanks all for your answers!
(the first step to solving a problem is admitting that you have one)
Wilbert
5th August 2013, 22:24
I think the problem is that the AAC formats were missing in mmreg.h (unless you have Windows 7 or newer) when AviSynth was compiled.
#define WAVE_FORMAT_RAW_AAC1 0x00FF
#define WAVE_FORMAT_MPEG_HEAAC 0x1610
#define WAVE_FORMAT_MPEG_ADTS_AAC 0x1600
causing acmFormatSuggest to fail. I hope Ianb can add some wise words ;) Is it sufficient to add them somewhere?
StainlessS
5th August 2013, 22:41
I downloaded your sample, tried in
VDub , Fails in VD v1.9.11, unknown tag 0x00FF.
VDMod, Tag 0x00FF Not Decodable, AAC, unknown tag 0x00FF. {so it knew it was AAC without being able to decode}
Played OK in about 6 players except GOM which shows this:
Following information shows media type info of the pin which is unable to find the filter available.
AVI Splitter::Stream 01
Stream 2
AVI Splitter
--------------------
MEDIA TYPE 0:
--------------------
[AM_MEDIA_TYPE]
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {000000FF-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 0
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 18
[WAVEFORMATEX]
wFormatTag: 0x00ff
nChannels: 2
nSamplesPerSec: 48000
nAvgBytesPerSec: 32000
nBlockAlign: 1536
wBitsPerSample: 16
and prompts to download coreaac codec, downloaded/installed codec, still does not play in GOM.
http://player.gomlab.com/eng/codec/success.gom?intCodec=219
MediaInfo From PotPlayer,
[Used Filter List]
(1) File Source (Async.)
(2) AVI Splitter
(3) Video Codec/Transform
(4) Video Mixing Renderer 9(Renderless)
(5) Audio Codec/Transform
(6) DirectSound Audio Renderer
[Video Information]
Video Codec:H264 - FFmpeg Decoder(h264)
Input type:H264(24 bits)
Input size:720 x 480(1.50:1)
Output type:IMC4(12 bits)
Output Size:720 x 480(1.50:1)
Frame Rate:29.97
BitRate: Unknown
[Audio Information]
Audio Codec:AAC(0xaac0) - FFmpeg Decoder(aac)
Sample rate:48000 ->48000 samples / sec
Bit rate:16 ->16 bits / sample
Channels:2 ->2 channels
Bitrate: 256 kbps
Installed your linked AAC codec, still does not play in either VD or VDMod, however I re-installed OS a few months
back, perhaps all is not ok on my system, although I used to be able to play AAC in AVI/AVS.
EDIT:, looks like Wilbert nailed it.
Wilbert
5th August 2013, 23:03
EDIT:, looks like Wilbert nailed it.
I was about to post it was nonsense. Although the constants are missing in my mmreg.h. I'm not sure how it can cause acmFormatSuggest to fail.
belonesox
5th August 2013, 23:18
Yes, I can open in VirtualDub.
Sorry. I opened in VD (no warnings) but in "File->Info" I also have "unknown tag 0xFF".
BTW, VLC play the video without problem (http://wiki.4intra.net/images/thumb/3/38/VLC_play_the_video_with_AAC_without_problem.png/749px-VLC_play_the_video_with_AAC_without_problem.png).
creaothceann
5th August 2013, 23:37
I try to make framework that can input MOST of possible input format, even such vanilla AVI with "x264+AAC".
The DirectShow interface can handle more formats than the VfW interface, simply because more modern codecs are written for the former.
AAC is usually handled correctly, it's just that this particular sub-format isn't widely supported (maybe because it's not generated very often). In fact this is the first time I've seen it.
StainlessS
5th August 2013, 23:39
Yes, you only get error when you try to play in VD. VDMod just outputs silence, no error.
VLC plays Ok, as does SMPlayer, UMPLayer, KMPlayer, Pot Player Media Player Classic HC, WMP v9.0, MS WMP v6.4(xp old version player).
Only failing player found was GOM.
IanB
6th August 2013, 02:54
It seems Fcchandler's AAC ACM codec does some validation on the stream format structure contents.
On your included sample wfex->cbSize is 0, Fcchandler is expecting a minimum of 2 bytes of codec specific data, apparently that being the two-byte AAC AudioSpecificConfig. But I cannot see that he accesses that information anywhere so it might be possible to hack the code to just ignore it.
I hex edited your sample wfex->cbSize from 0 to 2 and now VDub accepts your sample with a header needs repair warning.
When played it appears mostly silent with some shuffling noise in the background, is this correct.
Do you have another sample with some distinctive sound, i.e. count 1 2 3 to check.
static bool IsValidAAC(const WAVEFORMATEX *wfex, const MyData *md)
{
// Does "wfex" describe an AAC format we can decode?
if (wfex != NULL)
{
int i;
if (wfex->wFormatTag != WAVE_FORMAT_RAW_AAC1)
{
if (!(md->dwFlags & AACACM_706D)) goto Abort;
if (wfex->wFormatTag != WAVE_FORMAT_FAAC51) goto Abort;
}
for (i = 0; i < AACACM_NCHANS; ++i)
{
if (wfex->nChannels == chan_map[i]) break;
}
if (i == AACACM_NCHANS) goto Abort;
for (i = 0; i < AACACM_NFREQS; ++i)
{
if (wfex->nSamplesPerSec == freq_map[i]) break;
}
if (i == AACACM_NFREQS) goto Abort;
if (wfex->nAvgBytesPerSec == 0) goto Abort;
if (wfex->nBlockAlign == 0) goto Abort;
if (wfex->cbSize < 2) goto Abort;
return true;
}
Abort:
return false;
}
static inline unsigned short make_aac_config(DWORD srate, WORD chans)
{
// Create two-byte AAC AudioSpecificConfig
unsigned short asc = 0;
// AudioSpecificConfig, 2 bytes
// LSB MSB
// xxxxx... ........ object type (00010 = AAC LC)
// .....xxx x....... sampling frequency index (0 to 11)
// ........ .xxxx... channels configuration (1 to 7)
// ........ .....x.. frame length flag (0 = 1024, 1 = 960)
// ........ ......x. depends on core coder (0)
// ........ .......x extensions flag (0)
// LSB MSB
// .....000 0....... = 96000
// .....000 1....... = 88200
// .....001 0....... = 64000
// .....001 1....... = 48000
// .....010 0....... = 44100
// .....010 1....... = 32000
// .....011 0....... = 24000
// .....011 1....... = 22050
// .....100 0....... = 16000
// .....100 1....... = 12000
// .....101 0....... = 11025
// .....101 1....... = 8000
switch (srate) {
case 96000: break;
case 88200: asc |= 0x8000; break;
case 64000: asc |= 0x0001; break;
case 48000: asc |= 0x8001; break;
case 44100: asc |= 0x0002; break;
case 32000: asc |= 0x8002; break;
case 24000: asc |= 0x0003; break;
case 22050: asc |= 0x8003; break;
case 16000: asc |= 0x0004; break;
case 12000: asc |= 0x8004; break;
case 11025: asc |= 0x0005; break;
case 8000: asc |= 0x8005; break;
default:
return 0;
}
// LSB MSB
// ........ .0001... = 1 channel
// ........ .0010... = 2 channels
// ........ .0011... = 3 channels
// ........ .0100... = 4 channels
// ........ .0101... = 5 channels
// ........ .0110... = 6 channels
// ........ .0111... = 8 channels
switch (chans) {
case 1: asc |= 0x0800; break;
case 2: asc |= 0x1000; break;
case 3: asc |= 0x1800; break;
case 4: asc |= 0x2000; break;
case 5: asc |= 0x2800; break;
case 6: asc |= 0x3000; break;
case 8: asc |= 0x3800; break;
default:
return 0;
}
return (asc | 0x0010);
}
belonesox
6th August 2013, 10:27
Do you have another sample with some distinctive sound, i.e. count 1 2 3 to check.
This file generated by ffmpeg with "-acodec libvo_aacenc"
There another sample (https://www.dropbox.com/s/rh0bqi2eqsxo3h6/2013-07-20-10-16-41.avi%24ss%3D5565%2Clen%3D30.avi) with some distinctive sound.
StainlessS
6th August 2013, 17:31
Thread link and problem reported to GOM Labs.
Wilbert
6th August 2013, 19:42
On your included sample wfex->cbSize is 0, Fcchandler is expecting a minimum of 2 bytes of codec specific data, apparently that being the two-byte AAC AudioSpecificConfig. But I cannot see that he accesses that information anywhere so it might be possible to hack the code to just ignore it.
Is AudioSpecificConfig mandatory (and the sample not spec compliant)?
Another sample: http://www.wilbertdijkhof.com/avi-aac.zip (contains AAC LC 48 khz 5.1 channels). bytes of AudioSpecificConfig = 11B0. Yes, i think the channels are wrongly coded, but it opens and plays fine (Virtualdub and AviSynth).
Btw, AudioSpecificConfig is larger than 2 bytes in case of HE-AAC with explicit signaling of SBR/PS: http://msdn.microsoft.com/en-us/library/windows/desktop/dd742784%28v=vs.85%29.aspx
IanB
6th August 2013, 22:51
Hacking the wfex->cbSize works on the new sample, I hear a guy speaking in Russian.
I will have a proper look at the AAC ACM source code over the weekend see what the downside of removing the wfex->cbSize<2 check is.
You should probably also raise a bug report with the ffmpeg crew about the lack of AudioSpecificConfig data in the avi header.
Also when putting files on dropbox, etc, for explicit download by others, rename them to have a .BIN file extension or wrap them in an archive format like .zip, .7z, .rar, etc. It will stop the smart arse dropbox site from wanting to play the files at you instead of offering a simple download.
creaothceann
6th August 2013, 23:18
Or just use mega (https://mega.co.nz/).
Wilbert
19th August 2013, 17:52
You should probably also raise a bug report with the ffmpeg crew about the lack of AudioSpecificConfig data in the avi header.
Done: https://trac.ffmpeg.org/ticket/2883
@belonesox, you can also use AVIMux for muxing your avi and aac streams (it doesn't seem to write the bit depth though). It doesn't have this problem.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.