Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to embed an m4v video file to my html webpage?

I am currently trying to embed the m4v videos in my html webpage. using the following code

<video controls="" height="360" width="480">
<source src="path/to/my/m4v/video" type="video/mp4"> 
<source     src="path/to/my/m4v/video" type="video/ogg"> 
</source></source></video>

its working perfectly in google chrome.and it demands for an ogv video for mozilla browser.as we cant get an ogv video from our client.Also I am using it in hero framework. I also tried to use the iframe tag used by youtube embed code.that works with webkit browser(google chrome). but not able to play in mozilla firefox browser.I need to play m4v video in cross browsers.Is there any way or any html tag I am missing here?I explored alot but couldn't find an efficient solution.

like image 827
Nagama Inamdar Avatar asked Jun 11 '13 13:06

Nagama Inamdar


2 Answers

m4v format files are not supporting by browsers, these format need player support. these files directly cannot run in browser. like chrome, firefox, ie...etc.

Because these file format belongs to iOS operating system, developed by apple. Read the instructions given by below link Wikipedia. http://en.wikipedia.org/wiki/M4V

M4V - Video Supporting Features these are the possibilities to

  1. upload m4v files in the you tube that link we can use.
  2. need to convert in to mp4 format all files and use in server.
  3. need to write any script that converts the m4v files to mp4 fomat from server side.
  4. need any builder that directly converts that m4v to mp4 formats files but it may be payable it.
like image 143
veeru Avatar answered Oct 24 '22 17:10

veeru


You will probably need some external plugin or servcice support for your codec (m4v) since is not supported by all the browsers out there.

For a list of supported cross-browser video and audio formats I suggest you to check this documentation by MDN

Media formats supported by the HTML audio and video elements

In just a few Words, the formats you need to be 99% bross-browser are:

  • H.264 and AAC in MP4
  • Theora and Vorbis in Ogg
  • VP8 and Vorbis in WebM
like image 27
Xaviju Avatar answered Oct 24 '22 17:10

Xaviju