您的位置:首页 > 运维架构 > Apache

Linux-CentOS XAMPP Apache 支持mp4与flv拖动播放的功能模块

2015-12-14 21:56 1026 查看
      需要两个功能模块的支持mod_flvx.somod_h264_streaming.so

【1】下载地址

1.1 mod_flvx 

http://people.apache.org/Epquerna/modules/mod_flvx.c

1.2 mod_h264_streaming

http://h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz

1.3 mod_h264_streaming的介绍

http://h264.code-shop.com/trac/wiki 

http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-Apache-Version2

【2】编译

2.1 mod_flvx

# apxs -cia mod_flvx.c
2.2 mod_h264_streaming

./configure --with-apxs=`which apxs`
make
sudo make install


【3】配置httpd.conf

LoadModule h264_streaming_module modules/mod_h264_streaming.so
LoadModule flvx_module        modules/mod_flvx.so

AddHandler h264-streaming.extensions .mp4
AddHandler flv-stream .flv


【4】视频处理
4.1 编码问题

      需要是 h.264 编码,不是此编码的在某些Flash版本或OS上会出现放不出来视频的问题;可以用 3GP、MP4视频转换精灵(BRVideoConverter) 转码。

4.2 下载完后才能播放的问题。

      mp4视频有metadata,通常在文件尾部,而flash读到这个metadata才开始播放,解决办法是用工具处理一下mp4,把它的metadata移至文件头部。
https://gpac.wp.mines-telecom.fr/mp4box/

处理指令:

mp4box -isma xx.mp4
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  apache mp4拖动播放