How to embed m4v video file in my html page?

I'm currently trying to embed m4v video in my html page. 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> 

it works fine in google chrome . and it requires ogv video for mozilla for the browser. We cannot get ogv video from our customer. I also use it as part of a hero. I also tried using iframe tag used by youtube embed code. which works with webkit browser (google chrome). but unable to play in Mozilla Firefox browser. I need to play m4v video in cross browsers. Is there any way or some html tag that I am missing here? I understood a lot, but did not find an effective solution.

+4
source share
5 answers
  • If you are not forced to use Quicktime, Flash Long Tail Video Player is free.
  • can execute Quicktime encoded MV4 if the client has Flash 10 installed.

  • Therefore, I tried to use JWPlayer from the official jwplayer site.

  • You will have to purchase it to get a license key.
  • Allows you to play .m4v video in cross-browsers.
  • It works great.
+1
source
Format files

m4v are not supported by browsers, this format requires player support. these files cannot directly work in the browser. like chrome, firefox, that is ... etc.

Because this file format applies to the iOS operating system developed by Apple. Read the instructions below on the Wikipedia link. http://en.wikipedia.org/wiki/M4V

M4V - Video support is an opportunity for

  • upload m4v files to the handset we can use.
  • you need to convert all files to mp4 format and use them on the server.
  • you must write any script that converts m4v files to mp4 fomat from the server side.
  • need some builder that directly converts m4v files to mp4, but can be paid.
+1
source

You will probably need external support for plugins or servcice for your codec (m4v), as it is not supported by all browsers there.

For a list of supported video and audio formats with multiple browsers, I suggest you check out this MDN documentation

Media Formats Supported by HTML Audio and Video Elements

In a few words, the formats that should be 99% bromine are :

  • H.264 and AAC in MP4
  • Theora and Vorbis at Ogg
  • VP8 and Vorbis in WebM
+1
source

HTML5 Video is simply an agreement to play certain video formats with a new element for which browsers will implement their own player. HTML5 does not provide players or anything like that.

You should look for codecs and be 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 a video codec and Vorbis for audio.

My recommendation: provide an OGG file with Theora and Vorbis as video and audio codecs, respectively. Inside there is a backup using the MKV file with V8 and Vorbis, and then, if possible, inside the MPG video file using Mpeg2 and MP2 (could not think of something better) as video and audio codecs. Then, as a last resort, the Flash player plays the 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 ...; -)

In 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 Flash Player.

For tips on which formats to support: see part of the HTML5 video on Wikipedia.

Important. In your code, you refer to an absolute file system path that is completely unavailable to the visitor. Perhaps in src you meant / video / file2.m4v.

+1
source

You can use the HTML5 tag. or jplayer.org

or https://github.com/html5-ninja/Bootstrap-video-player-jQuery-plugin/blob/master/index.html see that you have a full link.

+1
source

Source: https://habr.com/ru/post/1485624/


All Articles