搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

No Video (mimetype error) but audio

  • 1 回覆
  • 2 有這個問題
  • 16 次檢視
  • 最近回覆由 cor-el

more options

I'm trying to post a video. I have it as an mp4, ogv, webm, and flv. And I have the following tags in my page

    <video src="MYVIDEO.mp4" width="683" height="480" controls="controls" autoplay="autoplay">
    <video src="MYVIDEO.ogv" width="683" height="480" controls="controls" autoplay="autoplay">
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="683" height="480" 
     . . . A WHOLE BUNCH OF FLASH CRUD.

When I have the videos in this order, Firefox (18.0.2, Mac) will display the following message:

   Video format or MIME type is not supported

but it will play the audio.

If I reverse the two video tags Firefox, will play fine. But, then Safari shows no video (but, plays sound). Since I want the mp4 as the primary, what could be causing Firefox NOT to skip the first (mp4) video tag and move on to the ogg one?

I'm confident my MIME types are correct. This is my .htaccess file:

AddType text/xml .xml
AddType video/mp4 .mp4 .m4v
AddType video/mpeg .mpeg .mpg
AddType video/quicktime .mov
AddType video/ogg .ogv
AddType video/webm .webm
AddType audio/mp4 .m4a .m4b .m4r
AddType audio/mpeg .mp3
AddType audio/playlist .m3u
AddType audio/x-scpls .pls
AddType audio/ogg .ogg
AddType audio/wav .wav

Thanks!!

I'm trying to post a video. I have it as an mp4, ogv, webm, and flv. And I have the following tags in my page <pre><nowiki> <video src="MYVIDEO.mp4" width="683" height="480" controls="controls" autoplay="autoplay"> <video src="MYVIDEO.ogv" width="683" height="480" controls="controls" autoplay="autoplay"> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="683" height="480" </nowiki></pre> . . . A WHOLE BUNCH OF FLASH CRUD. When I have the videos in this order, Firefox (18.0.2, Mac) will display the following message: Video format or MIME type is not supported but it will play the audio. If I reverse the two video tags Firefox, will play fine. But, then Safari shows no video (but, plays sound). Since I want the mp4 as the primary, what could be causing Firefox NOT to skip the first (mp4) video tag and move on to the ogg one? I'm confident my MIME types are correct. This is my .htaccess file: <pre><nowiki>AddType text/xml .xml AddType video/mp4 .mp4 .m4v AddType video/mpeg .mpeg .mpg AddType video/quicktime .mov AddType video/ogg .ogv AddType video/webm .webm AddType audio/mp4 .m4a .m4b .m4r AddType audio/mpeg .mp3 AddType audio/playlist .m3u AddType audio/x-scpls .pls AddType audio/ogg .ogg AddType audio/wav .wav</nowiki></pre> Thanks!!

由 cor-el 於 修改

所有回覆 (1)

more options

You can place the two files in one video tag and use the source tag to specify the various formats.

If it is encoded as WebM, why don't you give it a .webm file extension or specify the type as video/ogg if you use an ogg container?

Also make sure that the ogv video is encoded with a supported codec, try to open the file directly in a tab to see if that works.

<video width="683" height="480" controls autoplay >
 <source src="MYVIDEO.mp4" type="video/mp4" >
 <source src="MYVIDEO.webm" type="video/webm" >
 <source src="MYVIDEO.ogv" type="video/ogg" >
</video>