11

Html 5 video tag and codecs problem

 2 years ago
source link: https://www.codesd.com/item/html-5-video-tag-and-codecs-problem.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Html 5 video tag and codecs problem

advertisements

I have a mkv file. It's video codec is avc and audio codec is ac3.

How can i put it into a html5 video tag?

I use the

<source src="01.mkv" type="video/x-matroska" codecs="a_ac3, avc">

but in safari 5 or chorome4 it doesn't works.


Your <source> tag is malformed. You need to put the codec information inside the value of the type attribute instead, eg:

<source src="01.mkv" type='video/x-matroska; codecs="a_ac3, avc"'>

The type attribute contains a full MIME specification, and codecs is an optional parameter for some MIME types. There is no separate codecs attribute on the <video> tag.

Related Articles

Can an HTML 5 video tag have multiple MP4 sources with different codecs?

I'm thinking about the fact that the higher the MP4 profile we go, the better the video quality gets... This brings me to a question I thought I'd ask the experts! Can a HTML 5 video tag have multiple MP4 sources with different codecs? Something like

Dynamic Video Tag and Knockout JS

I'm trying to dynamically change the video source of a video tag using Knockout. This is the code: <div data-bind="if: resource().encodingformats() != ''"> <video style="max-width: 100%;" controls> <!-- ko with: resource

The HTML 5 video tag does not work from Tomcat (edited)

Video not playing from the Tomcat 7 server using absolute path & relative path of the file: Edit Summary: Altered the example for the relative path, and i am placing the videos inside application Root-Folder (Still not able to resolve the video bug).

The HTML 5 video tag does not work for any browser

So I used AnyConverter do convert a .mov to .mpf, .ogv and .webm formats. I then put them in a video directory and used the following code <video width="500" height="281"> <source src="/video/video.mp4" type="vi

The HTML 5 video tag does not work in Firefox

I am working in asp.net mvc and using <video src="Video_File.mp4" controls><video> tag to show a video. This works well in Chrome but not in Firefox. What is problem? Please help me.The reason it is not working is that Firefox does n

Using native javascript to select HTML & amp; SCRIPT tags and their data attributes?

This question already has an answer here: html "data-" attribute as javascript parameter 2 answers How can I select the element of HTML and get its data attribute without using jquery? For instance, I have this html tag with some data attribute,

html & amp; css efficiency and performance problem

So I have an issue on how I should implement a few webpages. Since having more < link > would slow things down because more HTTP request = slower, I decided to put the desktop's, tablet's, and mobile's stylesheet into one single css file using @medi

OpenCV video capture and fps problem

I'm capturing video from my webcam using OpenCV on MacOSX. It works fine but when I try to play on QuickTime my captured video it plays too fast. i.e. I capture from camera for 10 seconds but when I play on QuickTime the video is 2 seconds. I've trie

HTML element in memory and display problem after inserting it in DOM

When we run following script under Firefox ... var d = $("<div class='test'></div>"); d.hide(); $("body").prepend(d); d.show(); ... and look to HTML, this inserted element will have style attribute: style="display: blo

Why does an HTML video tag show the video upside down only in Mozilla Firefox?

I have a page that displays multiple videos using html video tags. The code looks like the below snippet: <video controls="controls" class="vw" name="Video" src="videos/ACS_Video_2b.mp4"></video> The cla

Cycling through HTMl5 video tags using the timeupdate and loadedmetadata events

I have a web page where I am playing a series of background videos. Initially I had it so I swap the source of the video file but I found that to be slower than having several video tags and manipulating them with display none/block. It was working f

ASP.net with HTML5 and iPad video tag

I looked in all the question and answers and I could not resolve my problem. I am including a video player in my asp.net website using HTML5 video tag and all my files (mp4) that I retrieve from a folder work fine in IE10, FF, Chrome and Safari on my

Custom file format and codec?

I'm messed up with codec issue for days, and still couldn't see the big picture yet. It is my first time do deal with audio/video formats and codecs. So I really need some help about that. Here is the work. I'm writing several components that is resp

Many video tags on page in single page application (angular) make the page frozen

If I create a single page application (angular) where I try to switch pages with several videos on one page (for example 4), after several switches I have a problem with endless pending requests. According to this question Dynamic img (or video) tags

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK