简体   繁体   中英

How do you safely identify whether an mp4 is an audio only or video file

Given a set of mp4 files I want to identify only the Audio files not the Video files. Previously I did this by ensuring there was only one trak atom, and that track atom contained a trak.mdia.minf.smhd atom but since found this was excluding some valid audio files.

So now I check each trak atom found in the file and only reject if we find a trak.mdia.minf.vmhd atom in any of the atoms OR we don't find at least one trak.mdia.minf.smhd atom. But I'm sure this isn't watertight as there must be video formats that don't use a vmhd atom.

What would be the best way to go about this?

你可以看一下在履带式trak->mdia->hdlr->handlerType其中handlerTypesoun音频或vide视频。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM