I have had a look at a couple of players like Flow Player, JW Player and a couple more but I can't get it to work exactly in PHP code.
我已经看过一些播放器,比如Flow Player, JW Player,还有一些,但是我不能让它在PHP代码中工作。
Is there any way to play FLV within HTML Video Tags?
有办法在HTML视频标签中播放FLV吗?
I know MP4 and OGG files will but the thing that I am working on will produce an FLV file.
我知道MP4和OGG文件,但是我正在做的事情将会产生一个FLV文件。
4 个解决方案
#1
10
You should look at video.js
from www.videojs.com I have been using it streaming live video feeds. It mimicks the video tag like this:
你应该看看视频。js来自www.videojs.com,我一直在使用它流直播视频。它像这样模仿视频标签:
<video id="example_video_1" class="video-js vjs-default-skin"
controls preload="auto" width="640" height="480"
poster="http://video-js.zencoder.com/oceans-clip.png"
data-setup='{"example_option":true}'>
<source src="rtmp://localhost/live/test" type="rtmp/flv">
</video>
Works very well for me.
很适合我。
#2
4
You might consider using some other players that are able to play FLV files; Known browsers (Chrome, Firefox etc...) are not able to run FLV files untill or unless you use some kind of flash player.
您可以考虑使用其他一些能够播放FLV文件的播放器;已知的浏览器(Chrome, Firefox等)不能运行FLV文件,除非你使用某种flash播放器。
-
If you are using PHP, you might want to use a flash player! Use Adobe Flash Player, don't be shy! YouTube and many other websites use it.
如果您正在使用PHP,您可能想要使用flash播放器!使用adobeflashplayer,不要害羞!YouTube和其他许多网站都使用它。
-
You can also try to stick to the flayers you have already tried.
你也可以尝试坚持你已经尝试过的flayers。
-
You can convert videos to MP4 or format of OGG. So that every browser can play the video file using the HTML5
<video></video>
tag.您可以将视频转换为MP4或OGG格式。这样每个浏览器都可以使用HTML5 标签播放视频文件。
But Remember: Each browser has its own limitaion for playing a video file; you can read browser support here: Mozilla Developer Network
但是请记住:每个浏览器都有自己的播放视频文件的限制;您可以在这里阅读浏览器支持:Mozilla开发人员网络
#3
3
Play it with Flash. I think it is the only way: http://css-tricks.com/forums/topic/how-to-play-flv-in-html5/
使用Flash。我认为这是唯一的方法:http://css-魔术师s.com/forums/topic/how to-play- flvin -html5/
#4
0
Technically speaking the HTML5 video specification is codec/protocol agnostic so one could imagine support for flv files could be possible. Problem is: none of the major web browser has implemented it (probably because flv is a proprietary container from Adobe). You will need a flash component to play it back. Either one of the players you mentioned or if you are looking for a standalone free flash player try strobe from Adobe. You can try it here.
从技术上讲,HTML5视频规范与编码/协议无关,因此可以想象支持flv文件是可能的。问题是:主要的web浏览器都没有实现它(可能是因为flv是Adobe的私有容器)。您将需要一个flash组件来回放它。您提到的其中一个播放器或如果您正在寻找一个独立的免费flash播放器,请尝试从Adobe。你可以在这里试试。
If you can produce .f4v files you may have success in renaming them to mp4 and then try and play them in an HTML5 video tag.
如果您可以生成.f4v文件,您可以成功地将它们重命名为mp4,然后尝试在HTML5视频标记中播放它们。
#1
10
You should look at video.js
from www.videojs.com I have been using it streaming live video feeds. It mimicks the video tag like this:
你应该看看视频。js来自www.videojs.com,我一直在使用它流直播视频。它像这样模仿视频标签:
<video id="example_video_1" class="video-js vjs-default-skin"
controls preload="auto" width="640" height="480"
poster="http://video-js.zencoder.com/oceans-clip.png"
data-setup='{"example_option":true}'>
<source src="rtmp://localhost/live/test" type="rtmp/flv">
</video>
Works very well for me.
很适合我。
#2
4
You might consider using some other players that are able to play FLV files; Known browsers (Chrome, Firefox etc...) are not able to run FLV files untill or unless you use some kind of flash player.
您可以考虑使用其他一些能够播放FLV文件的播放器;已知的浏览器(Chrome, Firefox等)不能运行FLV文件,除非你使用某种flash播放器。
-
If you are using PHP, you might want to use a flash player! Use Adobe Flash Player, don't be shy! YouTube and many other websites use it.
如果您正在使用PHP,您可能想要使用flash播放器!使用adobeflashplayer,不要害羞!YouTube和其他许多网站都使用它。
-
You can also try to stick to the flayers you have already tried.
你也可以尝试坚持你已经尝试过的flayers。
-
You can convert videos to MP4 or format of OGG. So that every browser can play the video file using the HTML5
<video></video>
tag.您可以将视频转换为MP4或OGG格式。这样每个浏览器都可以使用HTML5 标签播放视频文件。
But Remember: Each browser has its own limitaion for playing a video file; you can read browser support here: Mozilla Developer Network
但是请记住:每个浏览器都有自己的播放视频文件的限制;您可以在这里阅读浏览器支持:Mozilla开发人员网络
#3
3
Play it with Flash. I think it is the only way: http://css-tricks.com/forums/topic/how-to-play-flv-in-html5/
使用Flash。我认为这是唯一的方法:http://css-魔术师s.com/forums/topic/how to-play- flvin -html5/
#4
0
Technically speaking the HTML5 video specification is codec/protocol agnostic so one could imagine support for flv files could be possible. Problem is: none of the major web browser has implemented it (probably because flv is a proprietary container from Adobe). You will need a flash component to play it back. Either one of the players you mentioned or if you are looking for a standalone free flash player try strobe from Adobe. You can try it here.
从技术上讲,HTML5视频规范与编码/协议无关,因此可以想象支持flv文件是可能的。问题是:主要的web浏览器都没有实现它(可能是因为flv是Adobe的私有容器)。您将需要一个flash组件来回放它。您提到的其中一个播放器或如果您正在寻找一个独立的免费flash播放器,请尝试从Adobe。你可以在这里试试。
If you can produce .f4v files you may have success in renaming them to mp4 and then try and play them in an HTML5 video tag.
如果您可以生成.f4v文件,您可以成功地将它们重命名为mp4,然后尝试在HTML5视频标记中播放它们。