bksi
bksi

Reputation: 1625

HTML video tag suggestions

I have strange problem, that i can't resolve. I have stream that i have to put in a site. I don't have access to the stream link which is http://94.26.60.47:8880/865tv.mpg

The codec used is mp4. I know that this is strange, but i can't change this link, and i need to put it in a site using HTML5 video tag. I used this code:

<!DOCTYPE HTML>
<html>
 <head>
  <title>Test Stream</title>
  <meta name="author" content="" />
  <meta name="keywords" content="" />
  <meta name="description" content="" />
 </head>
 <body>
  <video width="320" height="240" controls>
        <source src="http://94.26.60.47:8880/865tv.mpg" type="video/mp4">
        Your browser does not support the video tag.
  </video>
 </body>
</html>

As a result in Chrome i just see empty player. In Mozilla i get more debug info: HTTP "Content-Type" of "video/mpeg" is not supported. Load of media resource http://94.26.60.47:8880/865tv.mpg failed. Invalid URI. Load of media resource failed.

What i did, is changing mime.types in my apache conf (restarted after the change) (remove mpg from video/mpeg and add it to video/mp4), and no success.

Any help will be appreciated.

Upvotes: 2

Views: 472

Answers (1)

Hackoo
Hackoo

Reputation: 18837

It's clear that you cannot play mpeg1 or mpeg2 using html5. I also was looking into something like that. You could embed a VLC web player that can handle these video formats pretty easily. Maybe consider... https://wiki.videolan.org/Documentation:WebPlugin/

<html>
     <title>VLC Mozilla plugin test page</title>
     <body>
          <center><embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org"
              width="640" height="480" id="vlc">
          </embed></center>
     <script language="Javascript">
         <!--
         var vlc = document.getElementById("vlc");
         var id = vlc.playlist.add("http://94.26.60.47:8880/865tv.mpg");
         vlc.playlist.playItem(id);
         //!-->
     </script>
     </body>
</html>

Upvotes: 1

Related Questions