Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What codec it is

I have a compressed file its size is 728 and somehow I know this is an audio file and it lasts 1040 ms

The compressed file structure is straight forward:

It is formed with 14 bytes blocks, each block starts with 0x0C:

0c xx xx xx xx xx xx xx xx xx xx xx xx xx 0c xx xx xx xx xx xx xx xx xx xx xx xx xx 0c xx xx xx xx xx xx xx xx xx xx xx xx xx 0c xx xx xx xx xx xx xx xx xx xx xx xx xx 0c xx xx xx xx xx xx xx xx xx xx xx xx xx 0c xx xx xx xx xx xx xx xx xx xx xx xx xx 0c xx xx xx xx xx xx xx xx xx xx xx xx xx 0c xx xx xx xx xx xx xx xx xx xx xx xx xx

(xx) could be any hex number

You can download compressed binary file here:

http://dusijun.files.wordpress.com/2013/02/29-aud-bin.doc (please rename to *.aud )

Or text view in doc format

http://dusijun.files.wordpress.com/2013/02/29-aud.doc

There is no header nor meta information. The number of blocks depends on how long the actual audio is. Audio duration to file size is around 1.42

eg

If file size = 9506 then audio could last for 9506*1.42 = 13580 ms around 13 S

Anyone know what codec it could be?

PS:

The binary file is WeChat (ios) audio file.

REF

1)How can I extract/play .aud files?

http://www.boards.ie/vbulletin/showthread.php?t=2055891600

2) WeChat ios

https://itunes.apple.com/us/app/wechat/id414478124?mt=8

like image 416
Steven Du Avatar asked Feb 21 '13 07:02

Steven Du


People also ask

What is a codec in it?

A codec is a hardware- or software-based process that compresses and decompresses large amounts of data. Codecs are used in applications to play and create media files for users, as well as to send media files over a network. The term is a blend of the words coder and decoder, as well as compression and decompression.

What is codec example?

Codecs are compression technologies and have two components, an encoder to compress the files, and a decoder to decompress. There are codecs for data (PKZIP), still images (JPEG, GIF, PNG), audio (MP3, AAC) and video (Cinepak, MPEG-2, H. 264, VP8).

How do I know what codec I need?

To determine what codec was used with a specific file, play the file in the Player, if possible. While the file is playing, right-click the file in the library, and then click Properties. On the File tab, look at the Audio codec and Video codec sections. Use a non-Microsoft codec identification tool.

What video codec means?

The term codec is a portmanteau of the words encoding (or coding) and decoding (CO-DEC). Video codec is often correctly used to describe any network video device that both encodes and decodes video, typically in real time – such as a video conferencing endpoint.


2 Answers

I would suspect it is a speech codec. For example RFC6716 and OPUS. The bit rate for this codec is 8-12 kbit/s for NB speech. The 0x0c fits the SILK configuration for 20ms frame size.

| 0...3 | SILK-only | NB | 10, 20, 40, 60 ms |

The 20ms frame size gives around 14bytes. I tried to save the sample as 29-aud-bin.opus and open it in Firefox, but it lacks that header that other opus files have. A version of the SILK codec is also used by Skype.

like image 171
artless noise Avatar answered Oct 15 '22 18:10

artless noise


What codec it is? Somehow I know this is an audio file. The binary file is WeChat (ios) audio file.

Giving the downloadable sample file an AUD extension doesn't make sense.

You are most likely to find an AUD file in a program folder for a Westwood video game. A file with an AUD file extension is a Video Game Compressed Audio File.


How do I find a codec?

If you know the name of the codec or its ID (known as a FourCC identifier for video codecs or a WaveFormat identifier for audio codecs), try searching the Internet. You can often go to a codec manufacturer's website to download the most recent version of a codec.

Since your file doesn't have header nor meta information (file magic) you can only rely on the file extension, eg:

http://www-mmsp.ece.mcgill.ca/documents/AudioFormats/AU/AU.html

enter image description here

If I get a file with a .EXE extension and *somehow I know this is really an audio file` I can check the file magic using Winista.

public MimeType GetMimeTypeFromFile(string filePath)
{
    sbyte[] fileData = null;
    using (FileStream srcFile = new FileStream(filePath, FileMode.Open, FileAccess.Read))
    {
        byte[] data = new byte[srcFile.Length];
        srcFile.Read(data, 0, (Int32)srcFile.Length);
        fileData = Winista.Mime.SupportUtil.ToSByteArray(data);
    }

    MimeType oMimeType = GetMimeType(fileData);
    if (oMimeType != null) return oMimeType;

    //We haven't found the file using Magic (eg a text/plain file)
    //so instead use URLMon to try and get the files format
    Winista.MimeDetect.URLMONMimeDetect.urlmonMimeDetect urlmonMimeDetect = new Winista.MimeDetect.URLMONMimeDetect.urlmonMimeDetect();
    string urlmonMimeType = urlmonMimeDetect.GetMimeFromFile(filePath);
    if (!string.IsNullOrEmpty(urlmonMimeType))
    {
        foreach (MimeType mimeType in types)
        {
            if (mimeType.Name == urlmonMimeType)
            {
                return mimeType;
            }
        }
    }

    return oMimeType;
}

Note the code to resort to URLMon to find the MIME type can be found here on msdn - Detect file type

The above method will open the file and detect its real MIME type to know which program to open it with. It does the matching using an Video/Audio MIME Type mapping file in XML format:

<!--
 !   Audio primary type
 ! -->

<mime-type name="audio/basic"
           description="uLaw/AU Audio File">
    <ext>au</ext><ext>snd</ext>
    <magic offset="0" type="byte" value="2e736e64000000"/>
</mime-type>

<mime-type name="audio/midi"
           description="Musical Instrument Digital Interface MIDI-sequention Sound">
    <ext>mid</ext><ext>midi</ext><ext>kar</ext>
    <magic offset="0" value="MThd"/>
</mime-type>

<mime-type name="audio/mpeg"
           description="MPEG Audio Stream, Layer III">
    <ext>mp3</ext><ext>mp2</ext><ext>mpga</ext>
    <magic offset="0" value="ID3"/>
</mime-type>

I tried winamp and Windows Media Classic and both failed to open the file.

Since you dont know the file MIME type and the file extension AUD is clearly wrong, I dont think its possible to detect the codec/program needed to play this file.

like image 28
Jeremy Thompson Avatar answered Oct 15 '22 17:10

Jeremy Thompson