{"id":641,"date":"2012-09-24T09:35:01","date_gmt":"2012-09-24T01:35:01","guid":{"rendered":"http:\/\/blog.hoyo.idv.tw\/?p=641"},"modified":"2017-12-20T23:17:24","modified_gmt":"2017-12-20T15:17:24","slug":"%e8%ae%93-apache-%e6%94%af%e6%8f%b4-h264-%e6%a0%bc%e5%bc%8f%e4%b8%b2%e6%b5%81","status":"publish","type":"post","link":"https:\/\/blog.hoyo.idv.tw\/?p=641","title":{"rendered":"\u8b93 Apache \u652f\u63f4 H264 \u683c\u5f0f\u4e32\u6d41"},"content":{"rendered":"<p>OS:\u00a0OpenSUSE 11.2<br \/>\n\u53c3\u8003\u4f86\u6e90\uff1a\u00a0<a href=\"http:\/\/h264.code-shop.com\/trac\/wiki\/Mod-H264-Streaming-Apache-Version2\">Mod-H264-Streaming-Apache-Version2 \u2013 h264<\/a>\u00a0(\u672c\u6a5f\u5099\u4efd)<\/p>\n<p>yast \u88dc\u4e0a<\/p>\n<ul>\n<li>gcc<\/li>\n<li>make<\/li>\n<li>apache2-devel<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true brush: bash; gutter: true\">cd ~\r\nwget http:\/\/h264.code-shop.com\/download\/apache_mod_h264_streaming-2.2.7.tar.gz\r\ntar -zxvf apache_mod_h264_streaming-2.2.7.tar.gz\r\ncd mod_h264_streaming-2.2.7\r\n.\/configure\r\nmake\r\nsudo make install<\/pre>\n<p>vi \/etc\/apache\/httpd.conf<\/p>\n<p>\u5728\u6700\u5f8c\u52a0\u4e0a<\/p>\n<pre class=\"brush: bash; gutter: true\">LoadModule h264_streaming_module \/usr\/lib\/apache2\/mod_h264_streaming.so\r\nAddHandler h264-streaming.extensions .mp4<\/pre>\n<p>\/etc\/rc.d\/apache2 restart<\/p>\n<h2>\u984d\u5916\u88dc\u5145<\/h2>\n<p>\u67e5\u8a62\u5df2\u77e5\u6307\u4ee4\u5728\u54ea\u4e00\u500b\u5957\u4ef6<\/p>\n<pre class=\"brush: bash; gutter: true\">rpm -qf \/usr\/sbin\/apxs2<\/pre>\n<p>--<\/p>\n<h2>CentOS 7<\/h2>\n<p>\u88dc\u4e0a\u9700\u8981\u7684\u5957\u4ef6\u6307\u4ee4<\/p>\n<pre class=\"lang:default decode:true\">yum install wget httpd-devel<\/pre>\n<p>\u7de8\u8f2f httpd.conf<\/p>\n<pre class=\"lang:default decode:true\">vi \/etc\/httpd\/conf\/httpd.conf\r\n\r\n\r\nLoadModule h264_streaming_module \/usr\/lib64\/httpd\/modules\/mod_h264_streaming.so\r\nAddHandler h264-streaming.extensions .mp4\r\n<\/pre>\n<p>\u91cd\u65b0\u555f\u52d5 httpd service<\/p>\n<pre class=\"lang:default decode:true\">systemctl restart httpd<\/pre>\n<p>--<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"641\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;1,905&nbsp;total views<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>OS:\u00a0OpenSUSE 11...<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"641\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;1,905&nbsp;total views<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[31],"tags":[74,75,76],"_links":{"self":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/641"}],"collection":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=641"}],"version-history":[{"count":10,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/641\/revisions"}],"predecessor-version":[{"id":4133,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/641\/revisions\/4133"}],"wp:attachment":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}