views:

274

answers:

4
<video id="myVideo" src="2.mp4" controls="" tabindex="0">decoder not found</video>

this code show ' decoder not found' on safari (my os is windows xp)

why ?

thanks

and this html5 vedio can be show on firefox and chrome ,but not safari. http://shapeshed.com/examples/HTML5-video-element/

why ?

+1  A: 

'Decoder not found' means the decoder for the video has not been implemented yet in the browser (its a fallback message).

H.264 has patent issues, so some browsers are reluctant to support it, whereas the Ogg format is open-source and it is supported by almost all browsers at the moment.

Further reading
HTML5 Wikipedia Entry
Dive into HTML5

N 1.1
A: 

try this, that really should work;

<video id="myVideo" controls="" tabindex="0">
<source src="2.mp4" type="video/mp4">
</video>

add adding ogg is as easy as inserting

<source src="2.ogg" type="video/ogg">

hope this helps!

futtta
clarification: the main reason this might work as opposed to the original code would be "type='video/mp4'", you could just try adding that to the code.
futtta
A: 

nvl, the "decoder not found" message is just the fallback text provided by the author in the example markup given. It doesn't appear to be useful diagnostic information in this regard.

The example markup given should work in Safari 4. Check that the video actually exists, and that you have QuickTime installed and that you're running the latest version of Safari.

But doing as futta suggested by providing an Ogg Theora/Vorbis alternative is a good idea, as it will then work in Opera and Firefox too.

Lachlan Hunt
Quicktime has nothing to do with html5 video. 'decoder not found' is indeed a fallback message, but it will fallback only when the decoder is not supported by the browser :). And as i said, H.264 still has some patent issues, whereas ogg is open source and is available in most browsers.
N 1.1
A: 

As others have noted, 'decoder not found' is the fallback message displayed by a browser that does not implement at all. Safari uses QuickTime as its media engine, so when QuickTime is not installed it has no support and displays the fallback.

Eric Carlson