Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to play videos in .avi file format in chrome?

Technically It was possible to play .avi files by loading an embedded object for a external player directly in the HTML. Now chrome deprecated that capabitilities and the solution left it's to transcode all my video files into .mp4

Edited Because I don't own the files I don't pretend to transcode them. I'm looking forward for a way to re-enable the old embedded objects to play those files into the browser. Chrome is required

For firefox a solution would be:

<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
    <object id="MediaPlayer1" width="690" height="500" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
  codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
    standby="Loading Microsoft® Windows® Media Player components..." type="application/x-oleobject">
    <param name="FileName" value='My File Name' />
    <param name="AutoStart" value="True" />
    <param name="DefaultFrame" value="mainFrame" />
    <param name="ShowStatusBar" value="0" />
    <param name="ShowPositionControls" value="0" />
    <param name="showcontrols" value="0" />
    <param name="ShowAudioControls" value="0" />
    <param name="ShowTracker" value="0" />
    <param name="EnablePositionControls" value="0" />
    <embed  type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
           src='MY_AVI_FILE.avi' align="middle" width="600" height="500" defaultframe="rightFrame"
           id="MediaPlayer2" />
</body>
</html>
like image 807
Lothre1 Avatar asked Sep 08 '25 14:09

Lothre1


2 Answers

There are only a few file video formats which can be played in most browsers. Chrome probably does not want to support non-standard formats and thus pollute the Web with incompatible content.

Here are the video formats supported by various browsers:

+--------------------+----------------------+-------+-----+
|      Browser       |         MP4          | WebM  | Ogg |
+--------------------+----------------------+-------+-----+
| Internet Explorer  | YES                  | NO    | NO  |
| Chrome             | YES                  | YES   | YES |
| Firefox            | YES                  | YES   | YES |
| Safari             | YES                  | NO    | NO  |
| Opera              | YES (from Opera 25)  | YES   | YES |
+--------------------+----------------------+-------+-----+
like image 60
jcoffland Avatar answered Sep 10 '25 04:09

jcoffland


I invented an alternative for Npapi windows media player!

My windows program is an extension for all browsers installed on the computer. And it can be very interesting complement any browser functionality. For example I have added to my site (example site, with part of code: http://master255.org/DEAD LINK) mpc-hc player with feedback to view any video from the site.

It sounds fantastic? But it works! :-D

Program Code:

https://github.com/master255/Redirector

Download:

http://master255.org/setup/setup.exeDEAD LINK

Enjoy!

like image 29
Master Avatar answered Sep 10 '25 04:09

Master