How to embed an m4v video file to my html webpage?
Asked Answered
D

5

6

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.

Darwin answered 11/6, 2013 at 13:56 Comment(4)
the solution is pretty simple , each browser support different video formats.So unless you have the proper codecs installed in your machine , firefox will not run m4v and there is nothing you can do about it.Million
Will you please elaborate Codecs installtion for ubuntu.since client has only m4v videos.should they be converted to other formats those browsers are supporting!Darwin
use MP4 = MPEG 4 files with H264 video codec and AAC audio codec , supported by all browers(even FireFox). dont use m4v. that's the solution.Million
The webm video is able to be played on chrome and mozilla.but when converted the original m4v video to webm.The image quality of the video degrades.Darwin
D
1
  • If you're not forced to use Quicktime, the Flash based JW Player NOT free
  • can do Quicktime encoded MV4 if the client has Flash 10 installed.

  • Hence tried using the JWPlayer from the official site of jwplayer.

  • Will have to purchase it to get a licence key.
  • Enables to play .m4v video on cross browsers.
  • Works perfectly.
Darwin answered 14/6, 2013 at 14:22 Comment(1)
Could you rewrite the answer in a way that is understandable to others that may have the same problem?Arcadia
C
1

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.
Carpentaria answered 22/10, 2013 at 5:27 Comment(0)
B
1

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
Bedfast answered 25/4, 2014 at 11:14 Comment(0)
R
1

HTML5 Video is just a convention to play a certain video formats with a new element for which browsers will implement an own player. HTML5 won’t provide players or something like that.

You have to look for the codecs and contained supported by most browsers, which, if I remember well, are mostly Theora for Video and Vorbis for audio, in an OGG container.

Then I remember that Webkit browsers will support Matroska (MKV) containers using V8 as video codec and Vorbis for audio.

My recommendation: provide an OGG file with Theora and Vorbis as video and audio codecs respectively. Inside provide a fallback using an MKV file with V8 and Vorbis and then, if you can, inside an MPG video file using Mpeg2 and MP2 (couldn’t think on something better) as video and audio codecs, fallback. Then as the last fallback, a Flash player playing a FLV video file.

<video src="thevideo.ogg">
    <video src="firstFallback.mkv">
        <object type="video/mpeg" src="secondFallback.mpeg">
            <object
                type="application/x-shockwave-flash"
                src="player.swf?etc...">
                <p>Download <a href="videourl">the video etc...</a><br />
                or use a more modern browser to watch online, etc...</p>
            </object>
        </object>
    </video>
</video>

Etc... ;-)

With this configuration, most (if not all) browsers should be able to play your video, preferring the most supported (and most modern) format. “Fallbacking” until they find a Flash Player.

For hints on what formats to support: take a look at the HTML5 Video part in Wikipedia.

Important: In your code you are refering to an absolute filesystem path, which is totally not-accesible for a web visitor. Maybe in the src you meant /video/file2.m4v.

Reformism answered 26/4, 2014 at 5:7 Comment(0)
H
1

You can use HTML5 video tag. or jplayer.org

or https://github.com/html5-ninja/Bootstrap-video-player-jQuery-plugin/blob/master/index.html view about url you got complete reference .

Homey answered 26/4, 2014 at 6:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.