当前位置: 首页> 娱乐> 明星 > 网站建设费用模板_咨询公司需要什么条件_上海seo顾问推推蛙_好项目推荐平台

网站建设费用模板_咨询公司需要什么条件_上海seo顾问推推蛙_好项目推荐平台

时间:2025/7/17 4:06:03来源:https://blog.csdn.net/qq_38233172/article/details/142484219 浏览次数:0次
网站建设费用模板_咨询公司需要什么条件_上海seo顾问推推蛙_好项目推荐平台

1. 服务地址(私有):https://gitee.com/nnlss/video-node-server
2.node-rtsp-stream 需要安装FFMPEG;
3.给推拉流做了开关,可借助http请求,有更好方式可联系;
 

4.存在问题:

1).对于网络摄像头,直接推拉流,测试6h+界面不卡顿,延迟1s以内(未精确测试延迟时间)

2).对于物料上的rstp, 由于工程师一直给rtsp推流,即便node服务结束进程,FFMPEG依然可以获取到rtsp

5.node 服务打包

  1. 安装ncc
    npm install -g @zeit/ncc

     2.安装成功

ncc version

     3. ncc 打包node 为单文件

ncc build index.js -o nodeServer

报错:

ncc: Version 0.22.3
ncc: Compiling file index.js
Error: error:0308010C:digital envelope routines::unsupported

原因:node 版本问题node.js - Error message "error:0308010C:digital envelope routines::unsupported" - Stack Overflow

利用nvm 切换版本 

nvm use 16.15.0

重新打包:

ncc build index.js -o nodeServer

生成文件目录nodeServer/index.js:

-nodeServer--index.js

cmd进入目录执行:

node index.js

启动服务成功

本地部署前后端配置nginx


#user  nobody;
worker_processes  1;#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;#pid        logs/nginx.pid;events {worker_connections  1024;
}http {include       mime.types;default_type  application/octet-stream;#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '#                  '$status $body_bytes_sent "$http_referer" '#                  '"$http_user_agent" "$http_x_forwarded_for"';#access_log  logs/access.log  main;sendfile        on;#tcp_nopush     on;#keepalive_timeout  0;keepalive_timeout  65;#gzip  on;server {listen       8081;server_name  localhost;#charset koi8-r;charset utf-8;#access_log  logs/host.access.log  main;location / {root dist;index index.html;try_files $uri $uri/ /index.html; # 解决前端界面刷新 路由重定向404问题}location /api/video/ {proxy_pass http://127.0.0.1:9998/video/;proxy_set_header Upgrade $http_upgrade; }location /dev-api/ {proxy_pass http://127.0.0.1:9000/;}client_max_body_size 10g;#error_page  404              /404.html;# redirect server error pages to the static page /50x.html## proxy the PHP scripts to Apache listening on 127.0.0.1:80##location ~ \.php$ {#    proxy_pass   http://127.0.0.1;#}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000##location ~ \.php$ {#    root           html;#    fastcgi_pass   127.0.0.1:9000;#    fastcgi_index  index.php;#    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;#    include        fastcgi_params;#}# deny access to .htaccess files, if Apache's document root# concurs with nginx's one##location ~ /\.ht {#    deny  all;#}}# another virtual host using mix of IP-, name-, and port-based configuration##server {#    listen       8000;#    listen       somename:8080;#    server_name  somename  alias  another.alias;#    location / {#        root   html;#        index  index.html index.htm;#    }#}# HTTPS server##server {#    listen       443 ssl;#    server_name  localhost;#    ssl_certificate      cert.pem;#    ssl_certificate_key  cert.key;#    ssl_session_cache    shared:SSL:1m;#    ssl_session_timeout  5m;#    ssl_ciphers  HIGH:!aNULL:!MD5;#    ssl_prefer_server_ciphers  on;#    location / {#        root   html;#        index  index.html index.htm;#    }#}}

关键字:网站建设费用模板_咨询公司需要什么条件_上海seo顾问推推蛙_好项目推荐平台

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: