7

i wonder what i'm doing wrong?

<video id="movie" width="320" height="240" preload controls>
  <source src="pr6.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
  <source src="pr6.webm" type='video/webm; codecs="vp8, vorbis"' />
  <source src="pr6.ogv" type='video/ogg; codecs="theora, vorbis"' />
</video>

this peace of code lies in my index.html. in the same directory i got all 3 videofiles (mp4, webm, ogv)

Somehow the video component shows up, however no video gets played. A big X shows up inside of the video component.

matt
  • 42,713
  • 103
  • 264
  • 397

3 Answers3

7

My guess is that this is a duplicate of an earlier question. If so, the answer is: Make sure your server config has the following associations:

  • .ogv: video/ogg
  • .oga: audio/ogg
  • .ogg: application/ogg
  • .webm: video/webm
  • .mp4: video/mp4
Community
  • 1
  • 1
hsivonen
  • 7,908
  • 1
  • 30
  • 35
  • Ah this is probably it. I had this issue too and couldn't get Apache to recognise .ogv files. Change the extension to .ogg (as this is usually set up by default) and see if that works? – Ian Devlin Jun 03 '10 at 08:59
  • where do i make these changes for tomcat? – frewper Jun 06 '12 at 05:47
1

On which browser? IE for example doesn't support the video element at all. Also, the course element is a void element and as such shouldn't have an end tag. I've also noticed a bug in Firefox where the Ogg file has to be the first resource otherwise it doesn't work. This may have been fixed in 3.6.3 though.

Ian Devlin
  • 18,534
  • 6
  • 55
  • 73
  • i'm using firefox 3.6 and it's working here http://diveintohtml5.org/video.html (scroll to the bottom), i'm using the exact same code and i can't seem to get it working in firefox! however it's working in chrome and safari. only firefox wont support it. MOREOVER i've absolutely no idea how i can position this video with css. #movie wont work! – matt Jun 03 '10 at 08:23
  • Are you using the html5 doctype too? – Ian Devlin Jun 03 '10 at 08:34
  • Ian, the doctype has nothing to do with this. – hsivonen Jun 03 '10 at 08:52
  • no! i didn't use it! thank you, now I'm able to position the video via css. however firefox still doesn't support the video! – matt Jun 03 '10 at 08:53
1

Firefox 3.6 doesn't support WebM video format. To view HTML5 WebM videos you need to download a nightly build of Firefox 4

For Ogv take care of frame rates and don't expect to show HD video. With a higher rate Firefox couldn't show my video, but when I reduce the frame rate and the quality, it works fine.

Cbe317
  • 1,229
  • 1
  • 8
  • 9