Problem
I’m debating which mime type to use when returning mp3 data (served up by php)
This is a list of mime types, according to this list: http://www.webmaster-toolkit.com/mime-types.shtml
.mp3 audio/mpeg3
.mp3 audio/x-mpeg-3
.mp3 video/mpeg
.mp3 video/x-mpeg
What’s the difference between these two, and which should I choose?
Asked by Kristian
Solution #1
The RFC-defined mime-type audio/mpeg would be your best bet.
Answered by saluce
Solution #2
I was having trouble with mime types and was running tests on a couple different file types. It appears that each browser transmits its own version of a mime type for each file. I was attempting to upload mp3 and zip files using an open source php class and came across the following:
So, if you need to upload a variety of file formats, you need run some tests to ensure that any browser can upload a file and pass the mime type check.
Answered by Eugene Petakhin
Solution #3
Use.mp3 audio/mpeg, which is what I’ve always done. Others are probably merely aliases.
Answered by zessx
Solution #4
Because Firefox cannot play audio/mpeg3 files, you should always use audio/mpeg.
Answered by Johnny Zhao
Solution #5
The conventional method is to utilize audio/mpeg in your PHP header function, which looks like this…
header(‘Content-Type: audio/mpeg’);
Answered by Madan Sapkota
Post is based on https://stackoverflow.com/questions/10688588/which-mime-type-should-i-use-for-mp3