View Full Version : AC3 Audio in ASF File
videophool
14th March 2009, 01:51
When inspecting an ASF file with AC3 audio, the Audio Media Type information in the Stream Properties Object has 22 bytes of 'Extra Data'. I can not find any spec on what should be in this field. Any ideas?
Thanks.
squid_80
14th March 2009, 14:05
If it's similar to the cbSize field of a WAVEFORMATEX structure, it's probably just an error and should really be set to 0. I've seen this a lot with AC3 in AVI files.
videophool
14th March 2009, 16:08
There is a WAVEFORMATEX structure, and it has 22 bytes of extea "codec" data at the end, that appears to be meaningful. The bytes in my test file as as follows:
08 00 07 06 00 00 25 3B 52 36 E5 8E D1 11 8C A3 00 60 B0 57 66 4A
squid_80
14th March 2009, 22:17
Is the total size of the WAVEFORMATEX data given anywhere? If so does it include these extra 22 bytes?
videophool
16th March 2009, 07:08
The last field in the WAVEFORMATEX structure is 'cbSize, which is the size of the extra data appended to the end of the structure. The ASF AC3 WAVEFORMATEX has cbSize == 22, and the extra data content is as shown in my previous post.
squid_80
16th March 2009, 07:40
Is the TOTAL size of the WAVEFORMATEX struct stored anywhere, for example in an .avi file WAVEFORMATEX is stored in a strf chunk. So if the size of the chunk is smaller than sizeof(WAVEFORMATEX)+wfex.cbSize, cbSize must have an incorrect value. Virtualdub actually shows a warning if this happens.
Are you sure it's not a WAVEFORMATEXTENSIBLE structure? What is the value of wFormatTag?
tebasuna51
16th March 2009, 12:38
Please put all 'fmt ' subchunk to try to identify the data.
'fmt ' (4 bytes)
fmt_size (4 bytes)
fmt_content (40 bytes if WAVEFORMATEXTENSIBLE)
videophool
16th March 2009, 16:03
From Asf Viewer:
========================
Stream Properties Object [2] (126 bytes)
Property Value
File Position 5443 ( 0x1543 )
Object ID B7DC0791-A9B7-11CF-8EE6-00C00C205365
Object Size 126 ( 0x7E )
Stream Number 2
Version 1
Offset 0
Encrypted False
Security ID 0
Stream Type Specific
Stream Type Audio Media
Format Tag 8192
Channels 5
Samples / Seconds 48000
Average Bytes / Second 16000
Average Bitrate (bits/sec) 128000
Block Align 512 ( 0x200 )
Bits / Sample 8
Extra Data Size 22
Extra Data 0000: 08 00 07 06 00 00 25 3B-52 36 E5 8E D1 11 8C A3 %;R6
0010: 00 60 B0 57 66 4A ` WfJ
Error Concealment
Strategy Audio Spread
Span 1
Virtual Packet Length 3072 ( 0xC00 )
Virtual Chunk Length 3072 ( 0xC00 )
Silence Data 0000: 00
Raw data dump
Size 126 ( 0x7E )
Data 0000: 91 07 DC B7 B7 A9 CF 11-8E E6 00 C0 0C 20 53 65 Se
0010: 7E 00 00 00 00 00 00 00-40 9E 69 F8 4D 5B CF 11 ~ @ i M[
0020: A8 FD 00 80 5F 5C 44 2B-50 CD C3 BF 8F 61 CF 11 _\D+P a
0030: 8B B2 00 AA 00 B4 E2 20-00 00 00 00 00 00 00 00
0040: 28 00 00 00 08 00 00 00-02 00 00 00 00 00 00 20 (
0050: 05 00 80 BB 00 00 80 3E-00 00 00 02 08 00 16 00 >
0060: 08 00 07 06 00 00 25 3B-52 36 E5 8E D1 11 8C A3 %;R6
0070: 00 60 B0 57 66 4A 01 00-0C 00 0C 01 00 00 ` WfJ
tebasuna51
16th March 2009, 16:58
0040: 28 00 00 00 08 00 00 00-02 00 00 00 00 00 00 20
0050: 05 00 80 BB 00 00 80 3E-00 00 00 02 08 00 16 00
wFormatTag is 0x2000 and means AC3.
I don't know what is the extra bytes, sorry.
videophool
16th March 2009, 23:30
The 22 bytes of data is a WAVEFORMATEXTENSIBLE structure as suggested by squid_80.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.