3 Replies - 973 Views - Last Post: 21 February 2012 - 09:03 AM

#1 black_yurizan  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 86
  • Joined: 18-June 11

Uploading videos in HTML 5

Posted 20 February 2012 - 08:42 AM

I've got a question about uploading videos on HTML 5. They say that you can only upload 3 video formats Mp4, WebM, and Ogg. Is Mpeg4 the same as Mp4? I thought it was, so I tried to upload a file and it didn't show up. How do you convert regular video files into Mp4's, WebM's, and Ogg's?
Is This A Good Question/Topic? 0
  • +

Replies To: Uploading videos in HTML 5

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3719
  • View blog
  • Posts: 5,990
  • Joined: 08-June 10

Re: Uploading videos in HTML 5

Posted 20 February 2012 - 09:30 AM

It's a little more complicated than that. We basically have three formats:

  • OGG, with Theora video and Vorbis audio.

  • WebM, with VP8 video and Vorbis audio.

  • MP4, with H.264 video and AAC audio.


The Theora codec is essentially deprecated now, having been superseded by the VP8 codec. The VP8 codec was based on a later version of what became Theora, and is far superior in quality. So the OGG option is pretty much out of the picture.

Originally OGG was meant to be a part of the HTML5 spec, but the group responsible for the H.264 codec (which includes Microsoft and Apple) objected to this so it was eventually removed. Now there are no specific audio or video containers or codecs specified. It's up to the browsers themselves to pick which codecs to use, and it seems they can't agree on which one to use.

Microsoft and Apple, predictably, only support the H.264 codec. Although Apple has apparently agreed to support WebM as well, they have so far not made good on that.

Google bought and open-sourced the VP8 video codec, creating the WebM container, which they intended as a free-for-all codec that could rival the quality of H.264 (it's not quite there yet, but it's damn close.) So Chrome naturally supports that. It also had support for H.264 originally but they pulled that when WebM was released. - Keep in mind that H.264 is patented, so they had to pay license fees when using it. (Which means they would essentially be paying Microsoft and Apple...)

Mozilla of course has problems with H.264 as well. They originally supported the OGG plan, and still do, but now they also support WebM. It never supported H.264.


Which leaves us having to use two formats to cover the field: MP4 and WebM.

Quote

How do you convert regular video files into Mp4's, WebM's, and Ogg's?

Depends on how you are planing to do this.

Are you just looking to convert single files from your own PC? If so, then there are no doubt a lot of programs that will offer that. I've never had use for it myself so I can't recommend any. I'm sure a Google search will turn up a bunch of them though.

If you want to do this from a program (perhaps on the back-end of a website) then you could use something like FFmpeg. It's a command line tool that allows you to convert between all the codecs we're talking about here. It requires you to study up on the various codecs though.

Quote

Is Mpeg4 the same as Mp4?

MP4 is short for MPEG-4 Part 14, so yes.

This post has been edited by Atli: 20 February 2012 - 09:33 AM

Was This Post Helpful? 2
  • +
  • -

#3 black_yurizan  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 86
  • Joined: 18-June 11

Re: Uploading videos in HTML 5

Posted 21 February 2012 - 08:16 AM

@Atli

Well I do have a mp4 video, but its not playing on my web page. Is the problem based on the fact that I actually have it up on a server because I did all the code the right way, yet there isn't anything showing on the web page.
Was This Post Helpful? 0
  • +
  • -

#4 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3719
  • View blog
  • Posts: 5,990
  • Joined: 08-June 10

Re: Uploading videos in HTML 5

Posted 21 February 2012 - 09:03 AM

How does your HTML look like? Your video will of course have to be on the server already. All that the HTML5 <video> tag does is download (or stream) a file to the browser and play it. - This doesn't actually have anything to do with uploading videos. That is done separately, in the same way it has always been done.

Also, keep in mind that Firefox and Chrome will not play H.264 video.

Are you sure the MP4 file is using the correct codecs? Remember that MP4 is just a container. It may well contain streams that are not H.264 and/or AAC.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1