简体   繁体   English

如何在jPlayer中流式传输原始h.264视频?

[英]How to stream a raw h.264 video in jPlayer?

jplayer supports mp4. jplayer支持mp4。 But, I have a server that streams a raw h.264 video. 但是,我有一台服务器可以传输原始h.264视频。 Is it possible to stream it directly on the client side using jPlayer? 是否可以使用jPlayer直接在客户端流式传输? If yes, please tell me how I should do it. 如果是,请告诉我应该怎么做。 If no, how do I put the video into an mp4 container? 如果不是,我如何将视频放入mp4容器?

Or, is there any other JS library or jQuery plugin that can be used to display the h.264 stream? 或者,是否有任何其他JS库或jQuery插件可用于显示h.264流?

You be better off putting your video file into a container. 最好将视频文件放入容器中。 If your video stream is already recorded then mp4 is a good choice. 如果您的视频流已经录制,那么mp4是一个不错的选择。 You can wrap your video stream using ffmpeg or may be mp4box. 您可以使用ffmpeg包装视频流,也可以使用mp4box。 For playback in the browser you can use the html video tag or your jPlayer. 要在浏览器中播放,您可以使用html视频标签或jPlayer。

If you are live streaming - wrap your stream into mpeg dash and use Dash JS for playback. 如果你是实时流式传输 - 将你的流包装成mpeg dash并使用Dash JS进行播放。

有一个示例如何使用x264或MP4Box等开源工具生成MPEG-DASH内容: http ://www.dash-player.com/blog/2014/11/mpeg-dash-content-generation-using-mp4box- 和X264 /

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM