中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當前位置: 首頁 > news >正文

個人怎樣建立網(wǎng)站市場調(diào)研報告1500字

個人怎樣建立網(wǎng)站,市場調(diào)研報告1500字,鄭州做網(wǎng)站怎么樣,外企網(wǎng)站建設公司排名技術要求:nginxnginx-rtmpffmpegVLC 跟著大佬走的: 傳送門 準備工作: 首先需要一臺公網(wǎng)ip的服務器 這是使用天翼云的彈性云主機:免費試用1個月 天翼云官網(wǎng) 點擊關機,更多里面選擇重置密碼, 默認用戶名為…

技術要求:nginx+nginx-rtmp+ffmpeg+VLC
跟著大佬走的:
傳送門
準備工作:

首先需要一臺公網(wǎng)ip的服務器

這是使用天翼云的彈性云主機:免費試用1個月
天翼云官網(wǎng)
在這里插入圖片描述
點擊關機,更多里面選擇重置密碼,

默認用戶名為root

使用xshell連接

彈性ip:xx.xx.xx.xx

root 密碼
在這里插入圖片描述
創(chuàng)建目錄:mkdir rtmp

切換目錄

使用winSCP軟件上傳rtmp源碼文件,下載nginx:

wget http://nginx.org/download/nginx-1.8.0.tar.gz

解壓:tar -xvf nginx-1.8.0.tar.gz
cd nginx-1.8.0/

安裝依賴庫
yum -y install pcre-develyum -y install openssl openssl-devel
# 注釋:add-module=自己的nginx-rtmp目錄 --with-http_ssl_module
./configure --add-module=../nginx-rtmp-module-master --with-http_ssl_module

在這里插入圖片描述

	# 編譯makemake install
# 啟動nginx:cd /usr/local/nginx/sbin./nginx

nginx默認使用的是80端口,開放防火墻
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
天翼云后臺開放安全組:80 0.0.0.0/0
但其實這里的80端口是不能使用的,除非備案!!!
天翼云服務器的80、443、8080端口均需要備案才能訪問,其他端口是開放的
修改nginx的端口為8090

cd /usr/local/nginx/confvi nginx.conf

在這里插入圖片描述


重啟nginxsudo pkill -9 nginx./nginx查看nginx端口是否是8090sudo netstat -anp | grep nginx

在這里插入圖片描述

關閉防火墻
首先,您需要打開終端并以root用戶身份登錄。

然后,使用以下命令停止firewalld服務,并禁用防火墻服務
sudo systemctl stop firewalld
sudo systemctl disable firewalld
# 接下來,您可以使用以下命令來檢查是否已成功停止防火墻服務。
sudo systemctl status firewalld

天翼云后臺添加安全組:
在這里插入圖片描述

出來了:
在這里插入圖片描述

添加rtmp配置

cd /usr/local/nginx/confvi nginx.conf
rtmp {server {listen 1935;chunk_size 4000;application live {live on;}}
}
# 重啟nginx
sudo pkill -9 nginx
cd /usr/local/nginx/sbin
./nginx

推流測試

下載ffmpeg源碼包
window電腦配置環(huán)境變量(path)
在這里插入圖片描述
使用ffmpeg推流
用gitbash打開,桌面有一個video.mp4 ,推流到ip為36.111.171.xx.xx(自己的):1935/live/流id(叫test也行,只是拉流也需要同名流id才能拉取成功)

 ffmpeg -re -i video.mp4 -f flv rtmp://36.111.171.36:1935/live/s1

在這里插入圖片描述

拉流測試

電腦端拉流測試

使用VLC軟件進行拉流,win11環(huán)境拉取服務器視頻

點擊媒體:選擇打開網(wǎng)絡串流,輸入rtmp://36.111.xx.xx:1935/live/s1
在這里插入圖片描述

安卓手機拉流測試

下載安卓版VLC軟件:點擊更多->新建文件串流->輸入
rtmp://36.111.xx.xx:1935/live/s1
在這里插入圖片描述

項目實戰(zhàn)demo:

創(chuàng)建一個uniapp項目,創(chuàng)建一個后綴為.nvue的文件
將代碼里面的data中的url,src中的ip換為自己的。

<template><view><!-- 音視頻播放 --><video id="myVideo" :src="src"@error="videoErrorCallback" :danmu-list="danmuList" enable-danmu danmu-btn controls></video><!-- 音視頻錄制 --><live-pusher id='livePusher' ref="livePusher" class="livePusher" :url="url"mode="SD" :muted="false" :enable-camera="true" :auto-focus="true" :beauty="1" whiteness="2"aspect="9:16" @statechange="statechange" @netstatus="netstatus" @error = "error"></live-pusher><!-- <button class="btn" @click="start">開始推流</button><button class="btn" @click="pause">暫停推流</button><button class="btn" @click="resume">resume</button><button class="btn" @click="stop">停止推流</button><button class="btn" @click="snapshot">快照</button><button class="btn" @click="startPreview">開啟攝像頭預覽</button><button class="btn" @click="stopPreview">關閉攝像頭預覽</button><button class="btn" @click="switchCamera">切換攝像頭</button> --></view>
</template><script>export default {data() {return {url:'rtmp://36.111.171.36:1935/live/s1',src:'rtmp://36.111.171.36:1935/live/s1'// url:'rtmp://192.168.74.128:1935/live/s1',// src:'rtmp://192.168.74.128:1935/live/s1'}},onReady() {// 注意:需要在onReady中 或 onLoad 延時this.context = uni.createLivePusherContext("livePusher", this);this.start();},methods: {statechange(e) {console.log("statechange:" + JSON.stringify(e));},netstatus(e) {console.log("netstatus:" + JSON.stringify(e));},error(e) {console.log("error:" + JSON.stringify(e));},start: function() {this.context.start({success: (a) => {console.log("livePusher.start:" + JSON.stringify(a));}});},close: function() {this.context.close({success: (a) => {console.log("livePusher.close:" + JSON.stringify(a));}});},snapshot: function() {this.context.snapshot({success: (e) => {console.log(JSON.stringify(e));}});},resume: function() {this.context.resume({success: (a) => {console.log("livePusher.resume:" + JSON.stringify(a));}});},pause: function() {this.context.pause({success: (a) => {console.log("livePusher.pause:" + JSON.stringify(a));}});},stop: function() {this.context.stop({success: (a) => {console.log(JSON.stringify(a));}});},switchCamera: function() {this.context.switchCamera({success: (a) => {console.log("livePusher.switchCamera:" + JSON.stringify(a));}});},startPreview: function() {this.context.startPreview({success: (a) => {console.log("livePusher.startPreview:" + JSON.stringify(a));}});},stopPreview: function() {this.context.stopPreview({success: (a) => {console.log("livePusher.stopPreview:" + JSON.stringify(a));}});}}}
</script><style></style>

運行到安卓手機
在這里插入圖片描述
效果:下面在推流,上面在拉流,

由于網(wǎng)絡傳輸,拉流的視頻會有延時(直播)
在這里插入圖片描述
完結撒花!!!碼字不易,點個贊再走啦

http://www.risenshineclean.com/news/62571.html

相關文章:

  • 怎么敲代碼做網(wǎng)站云南省最新疫情情況
  • 網(wǎng)頁制作團隊哈爾濱百度關鍵詞優(yōu)化
  • 焦作網(wǎng)站建設兼職網(wǎng)絡推廣公司哪家做得好
  • 徐州哪有做網(wǎng)站的熱門seo推廣排名穩(wěn)定
  • 網(wǎng)站修改標題有影響嗎站長工具seo綜合查詢columbu cat
  • 網(wǎng)站制作長沙長沙企業(yè)網(wǎng)站設計
  • 流量網(wǎng)站應該怎么做seo分析seo診斷
  • wdcp網(wǎng)站遷移google play下載安卓
  • 廣州做網(wǎng)站哪家專業(yè)最近三天的新聞大事國內(nèi)
  • 建設一個看電影的網(wǎng)站營銷軟文范例大全100
  • 個人備案網(wǎng)站做網(wǎng)購網(wǎng)站購買友情鏈接網(wǎng)站
  • html5可以做交互網(wǎng)站嗎成都抖音seo
  • 個別網(wǎng)站網(wǎng)速慢怎么做電商網(wǎng)站設計方案
  • 變態(tài)魔域游戲廣州seo推廣營銷
  • 網(wǎng)站建設網(wǎng)站需要什么軟件有哪些營銷網(wǎng)站建設多少錢
  • 住房和城鄉(xiāng)建設部網(wǎng)站主頁免費關鍵詞挖掘工具
  • 代理平臺注冊網(wǎng)站建設腰椎間盤突出壓迫神經(jīng)腿疼怎么治
  • 企業(yè)門戶網(wǎng)站功能列表杭州seo 云優(yōu)化科技
  • b2c旅游網(wǎng)站管理系統(tǒng)seo短視頻入口引流
  • 網(wǎng)站建設服務器的選擇方式包括哪些免費網(wǎng)絡推廣平臺有哪些
  • 企業(yè)網(wǎng)站內(nèi)容更新怎么操作網(wǎng)站收錄查詢?nèi)肟?/a>
  • 重慶網(wǎng)站建設重慶網(wǎng)站設計免費入駐的賣貨平臺有哪些
  • 創(chuàng)新模式_提高質(zhì)量_建設一流的數(shù)學人才培養(yǎng)基地 教學成果獎申報網(wǎng)站詳細描述如何進行搜索引擎的優(yōu)化
  • 做網(wǎng)站只有域名哪個網(wǎng)站百度收錄快
  • 骨科醫(yī)院網(wǎng)站優(yōu)化服務商seo網(wǎng)絡推廣公司報價
  • 多語種網(wǎng)站營銷溫州seo服務
  • 做網(wǎng)站商城怎么樣國產(chǎn)長尾關鍵詞拘挖掘
  • 做網(wǎng)站銷售iis搭建網(wǎng)站
  • 找人做網(wǎng)站 優(yōu)幫云百度電話銷售
  • wordpress 微網(wǎng)站模板百度搜索平臺