Audible Audio(.aa)文件规范?

时间:2009-02-21 18:58:15

标签: audio

有没有人知道有关Audible Audio(.aa)文件规范的好资源?

我正在尝试编写一个可以使用它们的程序,如果没有人知道某个资源,那么有关逆向工程的技巧是什么?我在Hex编辑器中打开它并且四处张开,看起来像一个MP3,但有更多的标题信息。

3 个答案:

答案 0 :(得分:4)

此网站提供了有关.aa文件中某些数据块所在位置的更多信息。

http://wiki.multimedia.cx/index.php?title=Audible_Audio

答案 1 :(得分:3)

我已经对Audible标题进行了一些研究,以便为我的汽车收音机/电脑创建一个播放器。基本上在文件的开头有一个3700个字符的块,包含许多感兴趣的字段,例如标题,作者,讲述者等。我在C#中有一些有限的解析代码来显示来自的一些基本信息。 .aa文件。如下:

   private void ParseFields(string fileName)
    {
        string aaHeader;
        string tryDate;
        if (fileName == "") return;

        using (StreamReader sr = new StreamReader(fileName))
        {
            char[] buff = new char[3700];
            sr.Read(buff, 0, buff.Length);
            aaHeader = new string(buff);
        }
        try
        {
            _author = GetParsedItem(aaHeader, "author");
        }
        catch
        {
            _author = "?";
        }
        try
        {
            _title = GetParsedItem(aaHeader, "short_title");
        }
        catch
        {
            _title = "???";
        }
        try
        {
            _narrator = GetParsedItem(aaHeader, "narrator");
        }
        catch
        {
            _narrator = "?";
        }
        try
        {
            _description = GetParsedItem(aaHeader, "description");
        }
        catch
        {
            _description = "???";
        }
        try
        {
            _longDescription = GetParsedItem(aaHeader, "long_description");
        }
        catch
        {
            _longDescription = "";
        }
        try
        {
            tryDate = GetParsedItem(aaHeader, "pubdate");
            if (tryDate != "")
                _pubDate = Convert.ToDateTime(GetParsedItem(aaHeader, "pubdate"));
            else
                _pubDate = DateTime.Today;
        }
        catch
        {
            _pubDate = DateTime.Today; 
        }
    }
    private string GetParsedItem(string buffer, string fieldName)
    {
        if (buffer.Contains(fieldName))
        {
            int pos = buffer.IndexOf(fieldName);
            pos += fieldName.Length;
            int posEnd = buffer.IndexOf('\0',pos);
            //if the value for the field is empty, skip it and look for another
            if (pos == posEnd)
            {
                pos = buffer.IndexOf(fieldName, posEnd);
                pos += fieldName.Length;
                posEnd = buffer.IndexOf('\0', pos);
            }
            return buffer.Substring(pos, posEnd - pos);
        }
        else
            return "(not found - " + fieldName + ")";
    }

答案 2 :(得分:1)

我认为,没有规范。看看Wikipedia/Audible.com

报价:

[...]
Audible introduced one of the first digital audio players in 1997.
The following year it published a Web site from which audio files in its
proprietary .aa format could be downloaded. Audible holds a number of patents
in this area.
[...]

摘要:专有/专利