6 Replies - 4999 Views - Last Post: 21 November 2012 - 06:52 AM

#1 Nublet  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 53
  • Joined: 12-October 12

HTML5 <video> tag doesn't work in Chrome?

Posted 19 November 2012 - 12:39 PM

Alright, so I'm trying to add a video to a website, it works fine in IE but in chrome there's no video only the audio. It also doesn't work in Firefox and Opera freezes when I try to open the project :P/> But I don't really get why, because I'm using the correct instructions I think. Anyway, here's the code:
<video width="640" height="480" autoplay = "autoplay" controls = "controls">
		<source src="movie.mp4" type="video/mp4" />
		<source src="movie.ogv" type="video/ogg" />
		<source src="movie.webm" type="video/webm" /> Your browser does not support the video tag.
	</video>
	</div>



Note: the ogv tag is because my video converter converted it to ogv, but it works the same right? What can I do to fix this?

Is This A Good Question/Topic? 0
  • +

Replies To: HTML5 <video> tag doesn't work in Chrome?

#2 IJET  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 93
  • View blog
  • Posts: 121
  • Joined: 14-October 12

Re: HTML5 <video> tag doesn't work in Chrome?

Posted 19 November 2012 - 05:31 PM

Hello, Nublet. It's possible you could be having MIME issues since it works in some browsers and not in others/barely works. Try and modify your .htcaccess file that's on the server and add the following:

AddType video/ogg   .ogv
AddType video/mp4   .mp4
AddType video/webm  .webm



There's also a way you can check by using something like --> this <-- check and see if they're coming back as the right MIME types
Was This Post Helpful? 0
  • +
  • -

#3 Nublet  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 53
  • Joined: 12-October 12

Re: HTML5 <video> tag doesn't work in Chrome?

Posted 21 November 2012 - 02:37 AM

View PostIJET, on 19 November 2012 - 05:31 PM, said:

Hello, Nublet. It's possible you could be having MIME issues since it works in some browsers and not in others/barely works. Try and modify your .htcaccess file that's on the server and add the following:

AddType video/ogg   .ogv
AddType video/mp4   .mp4
AddType video/webm  .webm



There's also a way you can check by using something like --> this <-- check and see if they're coming back as the right MIME types

I'm not using apache or anything to host the site, just a localhost.

I also tried this:
<video width="640" height="480" autoplay = "autoplay" controls = "controls">
		<source src="Myndband_H264.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'/>
		<source src="Myndband_Ogg.ogv" type='video/ogg; codecs="theora, vorbis"' />
		<source src="Myndband_WebM.webm" type='video/webm; codecs="vp8, vorbis"' /> Your browser does not support the video tag.
	</video>



But it didn't change anything. Firefox says "No video with supported format and MIME type found" when I open the page. I have all three types(mp4, ogv and webm) saved on my computer, in the same folder as the html, but nothing works?

It still works in IE though, but nothing else.
Was This Post Helpful? 0
  • +
  • -

#4 Cocker081288  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 108
  • Joined: 11-April 09

Re: HTML5 <video> tag doesn't work in Chrome?

Posted 21 November 2012 - 03:08 AM

Don't hold me to this, but over a year ago i experimented with HTML5 Video for my university project, about web browser incompatibilities.

If I remember correctly it will try and use the first video format it finds, in your case MP4.
Try commenting out all the incorrect formats for Firefox leaving only the one you'd expect to work.

If this works then you will need to do an if statement to detect which browser is being used and display appropriately.


Hope this helps.

This post has been edited by Cocker081288: 21 November 2012 - 03:09 AM

Was This Post Helpful? 0
  • +
  • -

#5 Nublet  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 53
  • Joined: 12-October 12

Re: HTML5 <video> tag doesn't work in Chrome?

Posted 21 November 2012 - 03:58 AM

View PostCocker081288, on 21 November 2012 - 03:08 AM, said:

Don't hold me to this, but over a year ago i experimented with HTML5 Video for my university project, about web browser incompatibilities.

If I remember correctly it will try and use the first video format it finds, in your case MP4.
Try commenting out all the incorrect formats for Firefox leaving only the one you'd expect to work.

If this works then you will need to do an if statement to detect which browser is being used and display appropriately.


Hope this helps.

Tried commenting out just the mp4 and opening in Firefox, didn't work. Also tried commenting out mp4 and webm, didn't work. Then I tried commenting out mp4 and ogv, didn't work either. This really bugs me because I really can't see any obvious error, unless my video file is corrupted. But it shouldn't be since it works on my computer and on IE, right?
Was This Post Helpful? 0
  • +
  • -

#6 Cocker081288  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 108
  • Joined: 11-April 09

Re: HTML5 <video> tag doesn't work in Chrome?

Posted 21 November 2012 - 04:44 AM

View PostNublet, on 21 November 2012 - 10:58 AM, said:

View PostCocker081288, on 21 November 2012 - 03:08 AM, said:

Don't hold me to this, but over a year ago i experimented with HTML5 Video for my university project, about web browser incompatibilities.

If I remember correctly it will try and use the first video format it finds, in your case MP4.
Try commenting out all the incorrect formats for Firefox leaving only the one you'd expect to work.

If this works then you will need to do an if statement to detect which browser is being used and display appropriately.


Hope this helps.

Tried commenting out just the mp4 and opening in Firefox, didn't work. Also tried commenting out mp4 and webm, didn't work. Then I tried commenting out mp4 and ogv, didn't work either. This really bugs me because I really can't see any obvious error, unless my video file is corrupted. But it shouldn't be since it works on my computer and on IE, right?



You would assume it would be OK then, how did you convert them to the different formats?


Also try taking the codec bits off as W3schools doesn't say you need them, HTML 5 Video

This post has been edited by Cocker081288: 21 November 2012 - 05:09 AM

Was This Post Helpful? 0
  • +
  • -

#7 Nublet  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 53
  • Joined: 12-October 12

Re: HTML5 <video> tag doesn't work in Chrome?

Posted 21 November 2012 - 06:52 AM

View PostCocker081288, on 21 November 2012 - 04:44 AM, said:

View PostNublet, on 21 November 2012 - 10:58 AM, said:

View PostCocker081288, on 21 November 2012 - 03:08 AM, said:

Don't hold me to this, but over a year ago i experimented with HTML5 Video for my university project, about web browser incompatibilities.

If I remember correctly it will try and use the first video format it finds, in your case MP4.
Try commenting out all the incorrect formats for Firefox leaving only the one you'd expect to work.

If this works then you will need to do an if statement to detect which browser is being used and display appropriately.


Hope this helps.

Tried commenting out just the mp4 and opening in Firefox, didn't work. Also tried commenting out mp4 and webm, didn't work. Then I tried commenting out mp4 and ogv, didn't work either. This really bugs me because I really can't see any obvious error, unless my video file is corrupted. But it shouldn't be since it works on my computer and on IE, right?



You would assume it would be OK then, how did you convert them to the different formats?


Also try taking the codec bits off as W3schools doesn't say you need them, HTML 5 Video

I didn't have the codec bits at first, I was trying to see if it changed anything :P/> But I used Any Video Converter which allows you to convert to special HTML5 types (WebM, Ogv, MP4) and as far as I know it worked, at least I have 3 different videos in WebM, MP4 and Ogv.

Edit: By special HTML5 types I mean it has it's own category in the converter.

This post has been edited by Nublet: 21 November 2012 - 06:53 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1