Skip to content

Inaccurate Meta Data for m4a media format #337

Open
@xianglongcheng

Description

@xianglongcheng

It seems it will parse the metadata of m4a(audio format) as mp4 video format. I'm using below code to work around this, but if this could be fixed it would be pefect. Thanks very much!

            IEnumerable<MetadataExtractor.Directory> directories = ImageMetadataReader.ReadMetadata(filefullname);

            foreach (MetadataExtractor.Directory d in directories)
            {
                if (d is FileTypeDirectory)
                {
                    var ft = d as FileTypeDirectory;
                    if (ft != null)
                        foreach (var tag in ft.Tags)
                        {
                            if (tag.Name == "Expected File Name Extension")
                            {
                                if (tag.Description == "mp4")
                                    ext = "m4a";//there are only audio files, so use m4a instead of mp4
                                else if (tag.Description == "mp3")
                                    ext = "mp3";
                                suc = true;
                                return ext;
                            }
                        }
                }
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions