{"id":32043,"date":"2025-04-22T19:16:02","date_gmt":"2025-04-22T11:16:02","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/32043.html"},"modified":"2025-04-22T19:16:02","modified_gmt":"2025-04-22T11:16:02","slug":"%e6%9c%ac%e5%9c%b0%e6%8e%a8%e6%b5%81%ef%bc%8c%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%8b%89%e6%b5%81%e5%85%a8%e6%b5%81%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/32043.html","title":{"rendered":"\u672c\u5730\u63a8\u6d41\uff0c\u670d\u52a1\u5668\u62c9\u6d41\u5168\u6d41\u7a0b"},"content":{"rendered":"<h2>\u672c\u5730\u63a8\u6d41&#xff0c;\u670d\u52a1\u5668\u62c9\u6d41\u5168\u6d41\u7a0b<\/h2>\n<p>\u73af\u5883\u51c6\u5907&#xff1a;\u51c6\u5907\u4e00\u53f0\u670d\u52a1\u5668&#xff0c;\u5176\u4e2dopenssl\u6700\u597d\u4e3a1.1.1\u7248\u672c&#xff08;\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528ubuntu20.04\u64cd\u4f5c\u7cfb\u7edf&#xff09;<\/p>\n<h3>\u670d\u52a1\u5668\u62c9\u6d41<\/h3>\n<h4>1\u3001 \u5b89\u88c5\u73af\u5883\u4f9d\u8d56<\/h4>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">apt-get<\/span> update<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">apt-get<\/span> <span class=\"token function\">install<\/span> <span class=\"token function\">unzip<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">apt-get<\/span> <span class=\"token function\">install<\/span> gcc g&#043;&#043;<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">apt-get<\/span> <span class=\"token function\">install<\/span> libpcre3 libpcre3-dev<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">apt-get<\/span> <span class=\"token function\">install<\/span> zlib1g zlib1g-dev<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">apt-get<\/span> <span class=\"token function\">install<\/span> yasm<\/p>\n<h4>2 \u3001\u5b89\u88c5nginx\u548cnginx-http-flv-module<\/h4>\n<p><span class=\"token builtin class-name\">cd<\/span> \/usr\/local\/<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">wget<\/span> http:\/\/nginx.org\/download\/nginx-1.19.5.tar.gz<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">tar<\/span> -zxvf nginx-1.19.5.tar.gz<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">mv<\/span> nginx-1.19.5 nginx<br \/>\n<span class=\"token builtin class-name\">cd<\/span> nginx<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">wget<\/span> https:\/\/github.com\/winshining\/nginx-http-flv-module\/archive\/master.zip<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">unzip<\/span> master.zip<br \/>\n<span class=\"token function\">sudo<\/span> .\/configure &#8211;prefix<span class=\"token operator\">&#061;<\/span>\/usr\/local\/nginx &#8211;add-module<span class=\"token operator\">&#061;<\/span>.\/nginx-http-flv-module-master &#8211;with-http_ssl_module<\/p>\n<p>\u672c\u90e8\u5206\u5982\u679c\u62a5\u5982\u4e0b\u9519\u8bef&#xff0c;\u539f\u56e0\u4e3b\u8981\u662f\u6ca1\u6709\u68c0\u6d4b\u5230openssl&#xff0c;\u56e0\u6b64\u9700\u8981\u8fdb\u884c\u8def\u5f84\u7684\u6307\u5b9a&#xff1b;<\/p>\n<p>.\/configure: error: SSL modules require the OpenSSL library.<br \/>\nYou can either <span class=\"token keyword\">do<\/span> not <span class=\"token builtin class-name\">enable<\/span> the modules, or <span class=\"token function\">install<\/span> the OpenSSL library<br \/>\ninto the system, or build the OpenSSL library statically from the <span class=\"token builtin class-name\">source<\/span><br \/>\nwith nginx by using &#8211;with-openssl<span class=\"token operator\">&#061;<\/span><span class=\"token operator\">&lt;<\/span>path<span class=\"token operator\">&gt;<\/span> option.<\/p>\n<p>\u8fd9\u91cc\u53ef\u76f4\u63a5\u957f\u4f20openssl-1.1.0h.tar.gz\u8fd9\u4e2a\u6587\u4ef6&#xff0c;\u6211\u8fd9\u91cc\u662f\u76f4\u63a5\u4e0a\u4f20\u81f3root\u8def\u5f84\u4e0b&#xff0c;\u4f7f\u7528tar\u8fdb\u884c\u89e3\u538b\u5230\u5f53\u524d\u8def\u5f84&#xff1b;<\/p>\n<p><span class=\"token builtin class-name\">cd<\/span> \/usr\/local\/nginx<br \/>\n<span class=\"token function\">sudo<\/span> .\/configure &#8211;prefix<span class=\"token operator\">&#061;<\/span>\/usr\/local\/nginx &#8211;add-module<span class=\"token operator\">&#061;<\/span>.\/nginx-http-flv-module-master &#8211;with-http_ssl_module &#8211;with-openssl<span class=\"token operator\">&#061;<\/span>\/root\/openssl-1.1.0h <\/p>\n<p>\u518d\u8fdb\u884c\u5b89\u88c5<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">make<\/span> <span class=\"token operator\">&amp;&amp;<\/span> <span class=\"token function\">sudo<\/span> <span class=\"token function\">make<\/span> <span class=\"token function\">install<\/span><\/p>\n<p>\u8fd9\u91cc\u53ef\u80fd\u62a5\u9519\u5982\u4e0b\u9519\u8bef&#xff0c;\u663e\u793a\u5728\u5c1d\u8bd5\u590d\u5236 conf\/koi-win \u6587\u4ef6\u5230 \/usr\/local\/nginx\/conf \u76ee\u5f55\u65f6\u51fa\u73b0\u4e86\u95ee\u9898&#xff0c;\u63d0\u793a\u8fd9\u4e24\u4e2a\u6587\u4ef6\u5b9e\u9645\u4e0a\u662f\u540c\u4e00\u4e2a\u6587\u4ef6\u3002<\/p>\n<p><span class=\"token function\">cp<\/span> conf\/koi-win <span class=\"token string\">&#039;\/usr\/local\/nginx\/conf&#039;<\/span><br \/>\ncp: <span class=\"token string\">&#039;conf\/koi-win&#039;<\/span> and <span class=\"token string\">&#039;\/usr\/local\/nginx\/conf\/koi-win&#039;<\/span> are the same <span class=\"token function\">file<\/span><br \/>\nmake<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: *** <span class=\"token punctuation\">[<\/span>objs\/Makefile:1618: install<span class=\"token punctuation\">]<\/span> Error <span class=\"token number\">1<\/span><br \/>\nmake<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: Leaving directory <span class=\"token string\">&#039;\/usr\/local\/nginx&#039;<\/span><br \/>\nmake: *** <span class=\"token punctuation\">[<\/span>Makefile:11: install<span class=\"token punctuation\">]<\/span> Error <span class=\"token number\">2<\/span><br \/>\nroot&#064;iZ2ze2bgtgn8177sed0v0fZ:\/usr\/local\/nginx<span class=\"token comment\">#<\/span><\/p>\n<p>\u9700\u8981\u91cd\u65b0\u8fdb\u884c\u7f16\u8bd1&#xff0c;\u6dfb\u52a0&#8211;conf-path&#061;\/usr\/local\/nginx\/nginx.conf&#xff0c;\u518d\u8fdb\u884c\u5b89\u88c5\u5373\u53ef<\/p>\n<p><span class=\"token function\">sudo<\/span> .\/configure &#8211;prefix<span class=\"token operator\">&#061;<\/span>\/usr\/local\/nginx &#8211;add-module<span class=\"token operator\">&#061;<\/span>.\/nginx-http-flv-module-master &#8211;with-http_ssl_module &#8211;with-openssl<span class=\"token operator\">&#061;<\/span>\/root\/openssl-1.1.0h &#8211;conf-path<span class=\"token operator\">&#061;<\/span>\/usr\/local\/nginx\/nginx.conf<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">make<\/span> <span class=\"token operator\">&amp;&amp;<\/span> <span class=\"token function\">sudo<\/span> <span class=\"token function\">make<\/span> <span class=\"token function\">install<\/span><\/p>\n<p>\u5229\u7528Vim\u7f16\u8f91nginx\u914d\u7f6e&#xff08;\u56e0\u4e3a\u524d\u9762\u6240\u6307\u5b9a\u7684\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u5728\/usr\/local\/nginx\/nginx.conf&#xff0c;\u6240\u4ee5\u8c03\u914d\u4e5f\u662f\u8fd9\u4e2a&#xff09;<\/p>\n<p><span class=\"token builtin class-name\">cd<\/span> \/usr\/local\/nginx<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">vim<\/span> \/usr\/local\/nginx\/nginx.conf<\/p>\n<p>\u914d\u7f6e\u5185\u5bb9\u5982\u4e0b&#xff08;\u6839\u636e\u81ea\u5df1\u6587\u4ef6\u8def\u5f84\u8fdb\u884c\u4fee\u6539&#xff0c;\u5f00\u653e\u670d\u52a1\u56689909&#xff0c;9938&#xff0c;80&#xff0c;443\u7aef\u53e3&#xff09;<\/p>\n<p>#user  nobody;<br \/>\nworker_processes  1;<\/p>\n<p>#error_log  logs\/error.log;<br \/>\n#error_log  logs\/error.log  notice;<br \/>\n#error_log  logs\/error.log  info;<\/p>\n<p>#pid        logs\/nginx.pid;<\/p>\n<p>events {<br \/>\n    worker_connections  1024;<br \/>\n}<\/p>\n<p>http {<br \/>\n    include       mime.types;<br \/>\n    default_type  application\/octet-stream;<br \/>\n    sendfile            on;<br \/>\n    keepalive_timeout  65;<br \/>\n    server {<br \/>\n        listen       9938;<br \/>\n        server_name  localhost;<br \/>\n        location \/live {<br \/>\n            flv_live on;<br \/>\n            chunked_transfer_encoding  on;<br \/>\n            add_header &#039;Access-Control-Allow-Origin&#039; * always;<br \/>\n            add_header &#039;Access-Control-Allow-Credentials&#039; &#039;true&#039;;<br \/>\n        }<br \/>\n        location \/ {<br \/>\n            root   html;<br \/>\n            index  index.html index.htm;<br \/>\n        }<br \/>\n        error_page   500 502 503 504  \/50x.html;<br \/>\n        location &#061; \/50x.html {<br \/>\n            root   html;<br \/>\n        }<br \/>\n    }<br \/>\n  include \/usr\/local\/nginx\/conf\/vhost\/*.conf;<br \/>\n}<\/p>\n<p>rtmp {<br \/>\n    out_queue               4096;<br \/>\n    out_cork                 8;<br \/>\n    max_streams             128;<br \/>\n    timeout                 15s;<br \/>\n    drop_idle_publisher     15s;<br \/>\n    log_interval 5s;<br \/>\n    log_size     1m;<br \/>\n    server {<br \/>\n        listen 9909;      #\u76d1\u542c\u7684\u7aef\u53e3\u53f7<br \/>\n        #server_name 127.0.0.1;<br \/>\n        application live {     #\u81ea\u5b9a\u4e49\u7684\u540d\u5b57<br \/>\n            live on;<br \/>\n       }<br \/>\n        application hls {<br \/>\n            live on;<br \/>\n            hls on;<br \/>\n            hls_path \/tmp\/hls;<br \/>\n            hls_fragment 1s;<br \/>\n            hls_playlist_length 3s;<br \/>\n       }<br \/>\n    }<br \/>\n}<\/p>\n<p>\u68c0\u9a8cnginx\u914d\u7f6e\u662f\u5426\u6709\u95ee\u9898&#xff0c;\u8f93\u51fasuccessful\u5219\u4ee3\u8868\u914d\u7f6e\u65e0\u8bef<\/p>\n<p><span class=\"token builtin class-name\">cd<\/span> \/usr\/local\/nginx\/sbin<br \/>\n.\/nginx -t<\/p>\n<p>\u5148\u542f\u52a8&#xff0c;\u518d\u91cd\u542fnginx\u670d\u52a1<\/p>\n<p>.\/nginx<br \/>\n.\/nginx -s reload<\/p>\n<p>\u67e5\u770bnginx\u542f\u52a8\u7aef\u53e3<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">netstat<\/span> -tulnp <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> nginx<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422111559-68077a6fe12ce.jpg\" alt=\"\u5916\u94fe\u56fe\u7247\u8f6c\u5b58\u5931\u8d25,\u6e90\u7ad9\u53ef\u80fd\u6709\u9632\u76d7\u94fe\u673a\u5236,\u5efa\u8bae\u5c06\u56fe\u7247\u4fdd\u5b58\u4e0b\u6765\u76f4\u63a5\u4e0a\u4f20\" \/><\/p>\n<p>\u8fdb\u5165\u5f53\u524d\u516c\u7f51ip\u4e0b9938&#xff1a;http:\/\/101.200.135.211:9938\/&#xff0c;\u80fd\u591f\u8bbf\u95ee&#xff0c;\u4ee3\u8868\u914d\u7f6e\u6210\u529f<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422111600-68077a7047b4d.png\" alt=\"\u5916\u94fe\u56fe\u7247\u8f6c\u5b58\u5931\u8d25,\u6e90\u7ad9\u53ef\u80fd\u6709\u9632\u76d7\u94fe\u673a\u5236,\u5efa\u8bae\u5c06\u56fe\u7247\u4fdd\u5b58\u4e0b\u6765\u76f4\u63a5\u4e0a\u4f20\" \/><\/p>\n<h4>3 \u3001\u670d\u52a1\u5668\u5b89\u88c5ffmpeg<\/h4>\n<h5>3.1 \u5b89\u88c5nasm<\/h5>\n<p>cd \/usr\/local<br \/>\nsudo wget https:\/\/www.nasm.us\/pub\/nasm\/releasebuilds\/2.14\/nasm-2.14.tar.gz<br \/>\nsudo tar -zxvf nasm-2.14.tar.gz<br \/>\ncd nasm-2.14<br \/>\nsudo .\/configure<br \/>\nsudo make &amp;&amp; sudo make install<\/p>\n<h5>3.2 \u5b89\u88c5\u00d7264<\/h5>\n<p>cd \/usr\/local<br \/>\nsudo wget https:\/\/code.videolan.org\/videolan\/x264\/-\/archive\/master\/x264-master.zip<br \/>\nsudo unzip x264-master.zip<br \/>\ncd x264-master<br \/>\nsudo .\/configure &#8211;enable-static &#8211;enable-shared<br \/>\nsudo make &amp;&amp; sudo make install<\/p>\n<h5>3.3 \u5b89\u88c5ffmpeg<\/h5>\n<p>cd \/usr\/local<br \/>\nsudo wget http:\/\/www.ffmpeg.org\/releases\/ffmpeg-4.3.tar.gz<br \/>\nsudo tar -zxvf ffmpeg-4.3.tar.gz<br \/>\ncd ffmpeg-4.3<br \/>\nsudo .\/configure &#8211;prefix&#061;\/usr\/local\/ffmpeg  &#8211;enable-gpl &#8211;enable-libx264<br \/>\nsudo make &amp;&amp; sudo make install<br \/>\nsudo cp \/usr\/local\/ffmpeg\/bin\/* \/usr\/bin\/<\/p>\n<p>sudo vim \/etc\/ld.so.conf<\/p>\n<p>\u6dfb\u52a0\u5982\u4e0b\u914d\u7f6e<\/p>\n<p>include \/usr\/local\/lib\/<br \/>\n\/usr\/local\/lib\/<\/p>\n<p>\u4fdd\u5b58\u540e\u8fdb\u884c\u91cd\u8f7d<\/p>\n<p>sudo ldconfig<br \/>\nsudo ffmpeg -version<\/p>\n<p>\u5b8c\u6210<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422111600-68077a70a5e79.jpg\" alt=\"\u5916\u94fe\u56fe\u7247\u8f6c\u5b58\u5931\u8d25,\u6e90\u7ad9\u53ef\u80fd\u6709\u9632\u76d7\u94fe\u673a\u5236,\u5efa\u8bae\u5c06\u56fe\u7247\u4fdd\u5b58\u4e0b\u6765\u76f4\u63a5\u4e0a\u4f20\" \/><\/p>\n<h3>\u5ba2\u6237\u7aef\u63a8\u6d41<\/h3>\n<h4>1\u3001Windows\u7aef<\/h4>\n<p>\u5b89\u88c5ffmpeg\u5e76\u914d\u7f6e\u73af\u5883\u53d8\u91cf&#xff1a;\u5b98\u7f51&#xff1a;FFmpeg<\/p>\n<p>\u4e0b\u8f7d\u540e\u89e3\u538b\u5e76\u6dfb\u52a0\u7cfb\u7edf\u73af\u5883\u53d8\u91cf&#xff0c;\u5982&#xff1a; D:\\\\develop\\\\ffmpeg-master-latest-win64-gpl\\\\bin<\/p>\n<p>\u7ec8\u7aef\u8f93\u5165\u547d\u4ee4\u63a8\u6d41\u5230\u6307\u5b9artmp\u670d\u52a1\u5668<\/p>\n<p>ffmpeg -f dshow -i video&#061;&#034;USB2.0 HD UVC WebCam&#034; -vcodec libx264 -pix_fmt yuv420p -s 400&#215;200 -framerate 15 -r 25 -preset:v ultrafast -tune zerolatency -f flv rtmp:\/\/119.3.211.142:9909\/live\/101<\/p>\n<h4>2\u3001Orange Pi Ai Pro\/\u6607\u817e\u7b49\u8bbe\u5907<\/h4>\n<p>\u901a\u8fc7python\u4ee3\u7801\u63a8\u6d41\u5230\u6307\u5b9artmp\u670d\u52a1\u5668&#xff0c;\u6ce8\u610f\u9700\u8981\u4e8b\u5148\u5b89\u88c5ffmpeg\u5e76\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/p>\n<p><span class=\"token keyword\">if<\/span> __name__ <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token string\">&#039;__main__&#039;<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    context <span class=\"token operator\">&#061;<\/span> init_acl<span class=\"token punctuation\">(<\/span>DEVICE_ID<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u521d\u59cb\u5316\u6a21\u578b<\/span><br \/>\n    det_model <span class=\"token operator\">&#061;<\/span> YoloV5<span class=\"token punctuation\">(<\/span>model_path<span class=\"token operator\">&#061;<\/span>trained_model_path<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u6253\u5f00\u6444\u50cf\u5934<\/span><br \/>\n    cap <span class=\"token operator\">&#061;<\/span> cv2<span class=\"token punctuation\">.<\/span>VideoCapture<span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u4f7f\u7528 FFmpeg \u521b\u5efa RTSP \u6d41<\/span><br \/>\n    command <span class=\"token operator\">&#061;<\/span> <span class=\"token string-interpolation\"><span class=\"token string\">f&#039;ffmpeg -re -i pipe:0 -f flv rtmp:\/\/101.200.135.211:9909\/live\/101&#039;<\/span><\/span><br \/>\n    process <span class=\"token operator\">&#061;<\/span> subprocess<span class=\"token punctuation\">.<\/span>Popen<span class=\"token punctuation\">(<\/span>command<span class=\"token punctuation\">.<\/span>split<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> stdin<span class=\"token operator\">&#061;<\/span>subprocess<span class=\"token punctuation\">.<\/span>PIPE<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token keyword\">while<\/span> cap<span class=\"token punctuation\">.<\/span>isOpened<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span>  <span class=\"token comment\"># \u5728\u6444\u50cf\u5934\u6253\u5f00\u7684\u60c5\u51b5\u4e0b\u5faa\u73af\u6267\u884c<\/span><br \/>\n        ret<span class=\"token punctuation\">,<\/span> frame <span class=\"token operator\">&#061;<\/span> cap<span class=\"token punctuation\">.<\/span>read<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u8bfb\u53d6\u4e00\u5e27\u56fe\u50cf<\/span><\/p>\n<p>        <span class=\"token keyword\">if<\/span> <span class=\"token keyword\">not<\/span> ret<span class=\"token punctuation\">:<\/span><br \/>\n            <span class=\"token keyword\">break<\/span><\/p>\n<p>        <span class=\"token comment\"># \u524d\u5904\u7406\u3001\u63a8\u7406\u3001\u540e\u5904\u7406&#xff0c;\u5f97\u5230\u6700\u7ec8\u63a8\u7406\u56fe\u7247<\/span><br \/>\n        img_res<span class=\"token punctuation\">,<\/span> det_result_str <span class=\"token operator\">&#061;<\/span> det_model<span class=\"token punctuation\">.<\/span>infer<span class=\"token punctuation\">(<\/span>frame<span class=\"token punctuation\">)<\/span><\/p>\n<p>        <span class=\"token comment\"># \u5c06\u5904\u7406\u540e\u7684\u5e27\u8f6c\u6362\u4e3a\u5b57\u8282\u6d41<\/span><br \/>\n        _<span class=\"token punctuation\">,<\/span> <span class=\"token builtin\">buffer<\/span> <span class=\"token operator\">&#061;<\/span> cv2<span class=\"token punctuation\">.<\/span>imencode<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;.jpg&#039;<\/span><span class=\"token punctuation\">,<\/span> img_res<span class=\"token punctuation\">)<\/span><br \/>\n        frame_bytes <span class=\"token operator\">&#061;<\/span> <span class=\"token builtin\">buffer<\/span><span class=\"token punctuation\">.<\/span>tobytes<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>        <span class=\"token comment\"># \u5199\u5165\u5e27\u5230 FFmpeg \u8fdb\u7a0b<\/span><br \/>\n        process<span class=\"token punctuation\">.<\/span>stdin<span class=\"token punctuation\">.<\/span>write<span class=\"token punctuation\">(<\/span>frame_bytes<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u91ca\u653e\u8d44\u6e90<\/span><br \/>\n    cap<span class=\"token punctuation\">.<\/span>release<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    cv2<span class=\"token punctuation\">.<\/span>destroyAllWindows<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    det_model<span class=\"token punctuation\">.<\/span>release<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u91ca\u653e\u6a21\u578b\u76f8\u5173\u8d44\u6e90<\/span><br \/>\n    deinit_acl<span class=\"token punctuation\">(<\/span>context<span class=\"token punctuation\">,<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u53bb\u521d\u59cb\u5316 ACL<\/span><\/p>\n<p>    <span class=\"token comment\"># \u5173\u95ed FFmpeg \u8fdb\u7a0b<\/span><br \/>\n    process<span class=\"token punctuation\">.<\/span>stdin<span class=\"token punctuation\">.<\/span>close<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    process<span class=\"token punctuation\">.<\/span>terminate<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    process<span class=\"token punctuation\">.<\/span>wait<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n\u5e27\u5230 FFmpeg \u8fdb\u7a0b<br \/>\n        process<span class=\"token punctuation\">.<\/span>stdin<span class=\"token punctuation\">.<\/span>write<span class=\"token punctuation\">(<\/span>frame_bytes<span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u91ca\u653e\u8d44\u6e90<\/span><br \/>\n    cap<span class=\"token punctuation\">.<\/span>release<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    cv2<span class=\"token punctuation\">.<\/span>destroyAllWindows<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    det_model<span class=\"token punctuation\">.<\/span>release<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u91ca\u653e\u6a21\u578b\u76f8\u5173\u8d44\u6e90<\/span><br \/>\n    deinit_acl<span class=\"token punctuation\">(<\/span>context<span class=\"token punctuation\">,<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u53bb\u521d\u59cb\u5316 ACL<\/span><\/p>\n<p>    <span class=\"token comment\"># \u5173\u95ed FFmpeg \u8fdb\u7a0b<\/span><br \/>\n    process<span class=\"token punctuation\">.<\/span>stdin<span class=\"token punctuation\">.<\/span>close<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    process<span class=\"token punctuation\">.<\/span>terminate<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    process<span class=\"token punctuation\">.<\/span>wait<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.2k\u6b21\uff0c\u70b9\u8d5e8\u6b21\uff0c\u6536\u85cf4\u6b21\u3002\u73af\u5883\u51c6\u5907\uff1a\u51c6\u5907\u4e00\u53f0\u670d\u52a1\u5668\uff0c\u5176\u4e2dopenssl\u6700\u597d\u4e3a1.1.1\u7248\u672c\uff08\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528ubuntu20.04\u64cd\u4f5c\u7cfb\u7edf\uff09_\u63a8\u6d41\u670d\u52a1\u5668<\/p>\n","protected":false},"author":2,"featured_media":32040,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[43,2594,44],"topic":[],"class_list":["post-32043","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-43","tag-2594","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u672c\u5730\u63a8\u6d41\uff0c\u670d\u52a1\u5668\u62c9\u6d41\u5168\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/32043.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u672c\u5730\u63a8\u6d41\uff0c\u670d\u52a1\u5668\u62c9\u6d41\u5168\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.2k\u6b21\uff0c\u70b9\u8d5e8\u6b21\uff0c\u6536\u85cf4\u6b21\u3002\u73af\u5883\u51c6\u5907\uff1a\u51c6\u5907\u4e00\u53f0\u670d\u52a1\u5668\uff0c\u5176\u4e2dopenssl\u6700\u597d\u4e3a1.1.1\u7248\u672c\uff08\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528ubuntu20.04\u64cd\u4f5c\u7cfb\u7edf\uff09_\u63a8\u6d41\u670d\u52a1\u5668\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/32043.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-22T11:16:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422111559-68077a6fe12ce.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/32043.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/32043.html\",\"name\":\"\u672c\u5730\u63a8\u6d41\uff0c\u670d\u52a1\u5668\u62c9\u6d41\u5168\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-22T11:16:02+00:00\",\"dateModified\":\"2025-04-22T11:16:02+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/32043.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/32043.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/32043.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u672c\u5730\u63a8\u6d41\uff0c\u670d\u52a1\u5668\u62c9\u6d41\u5168\u6d41\u7a0b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u672c\u5730\u63a8\u6d41\uff0c\u670d\u52a1\u5668\u62c9\u6d41\u5168\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/32043.html","og_locale":"zh_CN","og_type":"article","og_title":"\u672c\u5730\u63a8\u6d41\uff0c\u670d\u52a1\u5668\u62c9\u6d41\u5168\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.2k\u6b21\uff0c\u70b9\u8d5e8\u6b21\uff0c\u6536\u85cf4\u6b21\u3002\u73af\u5883\u51c6\u5907\uff1a\u51c6\u5907\u4e00\u53f0\u670d\u52a1\u5668\uff0c\u5176\u4e2dopenssl\u6700\u597d\u4e3a1.1.1\u7248\u672c\uff08\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528ubuntu20.04\u64cd\u4f5c\u7cfb\u7edf\uff09_\u63a8\u6d41\u670d\u52a1\u5668","og_url":"https:\/\/www.wsisp.com\/helps\/32043.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-22T11:16:02+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422111559-68077a6fe12ce.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/32043.html","url":"https:\/\/www.wsisp.com\/helps\/32043.html","name":"\u672c\u5730\u63a8\u6d41\uff0c\u670d\u52a1\u5668\u62c9\u6d41\u5168\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-22T11:16:02+00:00","dateModified":"2025-04-22T11:16:02+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/32043.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/32043.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/32043.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u672c\u5730\u63a8\u6d41\uff0c\u670d\u52a1\u5668\u62c9\u6d41\u5168\u6d41\u7a0b"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/32043","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=32043"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/32043\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/32040"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=32043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=32043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=32043"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=32043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}