The invention discloses a method and a system for playing a media file, as well as a media player, which aims to solve the problems that the prior media file format and the corresponding matching playing mode are incompatible with a third-party code, as well as the soundtrack support is limited. The method comprises: reading format information of the media file, wherein the format of the media file is predefined in a tree structure, and comprises a file header and the node attribute of the tree structure, each node is corresponding to different media streams respectively, and each node defines own attribute information; analyzing the file header and acquiring the each node attribute of the media file; searching decoders of the corresponding node data according to each node attribute; and reading each node data, and decoding and playing by use of the corresponding decoders. The media file format can be added arbitrarily; nodes with frequency, video, caption, interaction and other attributes can be defined; and the number of the node is not limited, so that the invention can support all node attributes such as the frequency, the video, the caption, the interaction and custom.