国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

【vue2】前端如何播放rtsp 視頻流,拿到rtsp視頻流地址如何處理,??狄曨lrtsp h264 如何播放

這篇具有很好參考價(jià)值的文章主要介紹了【vue2】前端如何播放rtsp 視頻流,拿到rtsp視頻流地址如何處理,??狄曨lrtsp h264 如何播放。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。


最近在寫(xiě)vue2 項(xiàng)目其中有個(gè)需求是實(shí)時(shí)播放攝像頭的視頻,攝像頭是 ???/code>的設(shè)備,搞了很長(zhǎng)時(shí)間終于監(jiān)控視頻出來(lái)了,記錄一下,放置下次遇到。文章有點(diǎn)長(zhǎng),略顯啰嗦請(qǐng)耐心看完。

測(cè)試

測(cè)試?測(cè)試什么?測(cè)試rtsp視頻流能不能播放。

video mediaplay官網(wǎng) 即(VLC)

下載、安裝完VLC后,打開(kāi)VLC 點(diǎn)擊媒體 -> 打開(kāi)網(wǎng)絡(luò)串流

【vue2】前端如何播放rtsp 視頻流,拿到rtsp視頻流地址如何處理,??狄曨lrtsp h264 如何播放,前端,vue2,前端,音視頻,vue.js
將rtsp地址粘貼進(jìn)去

【vue2】前端如何播放rtsp 視頻流,拿到rtsp視頻流地址如何處理,??狄曨lrtsp h264 如何播放,前端,vue2,前端,音視頻,vue.js

不能播放的話,rtsp視頻流地址有問(wèn)題。
注意:視頻可以播放也要查看視頻的格式,如下

右擊視頻選擇工具->編解碼器信息

【vue2】前端如何播放rtsp 視頻流,拿到rtsp視頻流地址如何處理,??狄曨lrtsp h264 如何播放,前端,vue2,前端,音視頻,vue.js

如果編解碼是H264的,那么我的這種方法可以。如果是H265或者其他的話就要登錄??岛笈_(tái)修改一下

【vue2】前端如何播放rtsp 視頻流,拿到rtsp視頻流地址如何處理,??狄曨lrtsp h264 如何播放,前端,vue2,前端,音視頻,vue.js

以vue2 為例

新建 webrtcstreamer.js

在public文件夾下新建webrtcstreamer.js文件,直接復(fù)制粘貼,無(wú)需修改

var WebRtcStreamer = (function() {

/** 
 * Interface with WebRTC-streamer API
 * @constructor
 * @param {string} videoElement - id of the video element tag
 * @param {string} srvurl -  url of webrtc-streamer (default is current location)
*/
var WebRtcStreamer = function WebRtcStreamer (videoElement, srvurl) {
	if (typeof videoElement === "string") {
		this.videoElement = document.getElementById(videoElement);
	} else {
		this.videoElement = videoElement;
	}
	this.srvurl           = srvurl || location.protocol+"http://"+window.location.hostname+":"+window.location.port;
	this.pc               = null;    

	this.mediaConstraints = { offerToReceiveAudio: true, offerToReceiveVideo: true };

	this.iceServers = null;
	this.earlyCandidates = [];
}

WebRtcStreamer.prototype._handleHttpErrors = function (response) {
    if (!response.ok) {
        throw Error(response.statusText);
    }
    return response;
}

/** 
 * Connect a WebRTC Stream to videoElement 
 * @param {string} videourl - id of WebRTC video stream
 * @param {string} audiourl - id of WebRTC audio stream
 * @param {string} options -  options of WebRTC call
 * @param {string} stream  -  local stream to send
*/
WebRtcStreamer.prototype.connect = function(videourl, audiourl, options, localstream) {
	this.disconnect();
	
	// getIceServers is not already received
	if (!this.iceServers) {
		console.log("Get IceServers");
		
		fetch(this.srvurl + "/api/getIceServers")
			.then(this._handleHttpErrors)
			.then( (response) => (response.json()) )
			.then( (response) =>  this.onReceiveGetIceServers(response, videourl, audiourl, options, localstream))
			.catch( (error) => this.onError("getIceServers " + error ))
				
	} else {
		this.onReceiveGetIceServers(this.iceServers, videourl, audiourl, options, localstream);
	}
}

/** 
 * Disconnect a WebRTC Stream and clear videoElement source
*/
WebRtcStreamer.prototype.disconnect = function() {		
	if (this.videoElement?.srcObject) {
		this.videoElement.srcObject.getTracks().forEach(track => {
			track.stop()
			this.videoElement.srcObject.removeTrack(track);
		});
	}
	if (this.pc) {
		fetch(this.srvurl + "/api/hangup?peerid=" + this.pc.peerid)
			.then(this._handleHttpErrors)
			.catch( (error) => this.onError("hangup " + error ))

		
		try {
			this.pc.close();
		}
		catch (e) {
			console.log ("Failure close peer connection:" + e);
		}
		this.pc = null;
	}
}    

/*
* GetIceServers callback
*/
WebRtcStreamer.prototype.onReceiveGetIceServers = function(iceServers, videourl, audiourl, options, stream) {
	this.iceServers       = iceServers;
	this.pcConfig         = iceServers || {"iceServers": [] };
	try {            
		this.createPeerConnection();

		var callurl = this.srvurl + "/api/call?peerid=" + this.pc.peerid + "&url=" + encodeURIComponent(videourl);
		if (audiourl) {
			callurl += "&audiourl="+encodeURIComponent(audiourl);
		}
		if (options) {
			callurl += "&options="+encodeURIComponent(options);
		}
		
		if (stream) {
			this.pc.addStream(stream);
		}

                // clear early candidates
		this.earlyCandidates.length = 0;
		
		// create Offer
		this.pc.createOffer(this.mediaConstraints).then((sessionDescription) => {
			console.log("Create offer:" + JSON.stringify(sessionDescription));
			
			this.pc.setLocalDescription(sessionDescription)
				.then(() => {
					fetch(callurl, { method: "POST", body: JSON.stringify(sessionDescription) })
						.then(this._handleHttpErrors)
						.then( (response) => (response.json()) )
						.catch( (error) => this.onError("call " + error ))
						.then( (response) =>  this.onReceiveCall(response) )
						.catch( (error) => this.onError("call " + error ))
				
				}, (error) => {
					console.log ("setLocalDescription error:" + JSON.stringify(error)); 
				});
			
		}, (error) => { 
			alert("Create offer error:" + JSON.stringify(error));
		});

	} catch (e) {
		this.disconnect();
		alert("connect error: " + e);
	}	    
}


WebRtcStreamer.prototype.getIceCandidate = function() {
	fetch(this.srvurl + "/api/getIceCandidate?peerid=" + this.pc.peerid)
		.then(this._handleHttpErrors)
		.then( (response) => (response.json()) )
		.then( (response) =>  this.onReceiveCandidate(response))
		.catch( (error) => this.onError("getIceCandidate " + error ))
}
					
/*
* create RTCPeerConnection 
*/
WebRtcStreamer.prototype.createPeerConnection = function() {
	console.log("createPeerConnection  config: " + JSON.stringify(this.pcConfig));
	this.pc = new RTCPeerConnection(this.pcConfig);
	var pc = this.pc;
	pc.peerid = Math.random();		
	
	pc.onicecandidate = (evt) => this.onIceCandidate(evt);
	pc.onaddstream    = (evt) => this.onAddStream(evt);
	pc.oniceconnectionstatechange = (evt) => {  
		console.log("oniceconnectionstatechange  state: " + pc.iceConnectionState);
		if (this.videoElement) {
			if (pc.iceConnectionState === "connected") {
				this.videoElement.style.opacity = "1.0";
			}			
			else if (pc.iceConnectionState === "disconnected") {
				this.videoElement.style.opacity = "0.25";
			}			
			else if ( (pc.iceConnectionState === "failed") || (pc.iceConnectionState === "closed") )  {
				this.videoElement.style.opacity = "0.5";
			} else if (pc.iceConnectionState === "new") {
				this.getIceCandidate();
			}
		}
	}
	pc.ondatachannel = function(evt) {  
		console.log("remote datachannel created:"+JSON.stringify(evt));
		
		evt.channel.onopen = function () {
			console.log("remote datachannel open");
			this.send("remote channel openned");
		}
		evt.channel.onmessage = function (event) {
			console.log("remote datachannel recv:"+JSON.stringify(event.data));
		}
	}
	pc.onicegatheringstatechange = function() {
		if (pc.iceGatheringState === "complete") {
			const recvs = pc.getReceivers();
		
			recvs.forEach((recv) => {
			  if (recv.track && recv.track.kind === "video") {
				console.log("codecs:" + JSON.stringify(recv.getParameters().codecs))
			  }
			});
		  }
	}

	try {
		var dataChannel = pc.createDataChannel("ClientDataChannel");
		dataChannel.onopen = function() {
			console.log("local datachannel open");
			this.send("local channel openned");
		}
		dataChannel.onmessage = function(evt) {
			console.log("local datachannel recv:"+JSON.stringify(evt.data));
		}
	} catch (e) {
		console.log("Cannor create datachannel error: " + e);
	}	
	
	console.log("Created RTCPeerConnnection with config: " + JSON.stringify(this.pcConfig) );
	return pc;
}


/*
* RTCPeerConnection IceCandidate callback
*/
WebRtcStreamer.prototype.onIceCandidate = function (event) {
	if (event.candidate) {
		if (this.pc.currentRemoteDescription)  {
			this.addIceCandidate(this.pc.peerid, event.candidate);					
		} else {
			this.earlyCandidates.push(event.candidate);
		}
	} 
	else {
		console.log("End of candidates.");
	}
}


WebRtcStreamer.prototype.addIceCandidate = function(peerid, candidate) {
	fetch(this.srvurl + "/api/addIceCandidate?peerid="+peerid, { method: "POST", body: JSON.stringify(candidate) })
		.then(this._handleHttpErrors)
		.then( (response) => (response.json()) )
		.then( (response) =>  {console.log("addIceCandidate ok:" + response)})
		.catch( (error) => this.onError("addIceCandidate " + error ))
}
				
/*
* RTCPeerConnection AddTrack callback
*/
WebRtcStreamer.prototype.onAddStream = function(event) {
	console.log("Remote track added:" +  JSON.stringify(event));
	
	this.videoElement.srcObject = event.stream;
	var promise = this.videoElement.play();
	if (promise !== undefined) {
	  promise.catch((error) => {
		console.warn("error:"+error);
		this.videoElement.setAttribute("controls", true);
	  });
	}
}
		
/*
* AJAX /call callback
*/
WebRtcStreamer.prototype.onReceiveCall = function(dataJson) {

	console.log("offer: " + JSON.stringify(dataJson));
	var descr = new RTCSessionDescription(dataJson);
	this.pc.setRemoteDescription(descr).then(() =>  { 
			console.log ("setRemoteDescription ok");
			while (this.earlyCandidates.length) {
				var candidate = this.earlyCandidates.shift();
				this.addIceCandidate(this.pc.peerid, candidate);				
			}
		
			this.getIceCandidate()
		}
		, (error) => { 
			console.log ("setRemoteDescription error:" + JSON.stringify(error)); 
		});
}	

/*
* AJAX /getIceCandidate callback
*/
WebRtcStreamer.prototype.onReceiveCandidate = function(dataJson) {
	console.log("candidate: " + JSON.stringify(dataJson));
	if (dataJson) {
		for (var i=0; i<dataJson.length; i++) {
			var candidate = new RTCIceCandidate(dataJson[i]);
			
			console.log("Adding ICE candidate :" + JSON.stringify(candidate) );
			this.pc.addIceCandidate(candidate).then( () =>      { console.log ("addIceCandidate OK"); }
				, (error) => { console.log ("addIceCandidate error:" + JSON.stringify(error)); } );
		}
		this.pc.addIceCandidate();
	}
}


/*
* AJAX callback for Error
*/
WebRtcStreamer.prototype.onError = function(status) {
	console.log("onError:" + status);
}

return WebRtcStreamer;
})();

if (typeof window !== 'undefined' && typeof window.document !== 'undefined') {
	window.WebRtcStreamer = WebRtcStreamer;
}
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
	module.exports = WebRtcStreamer;
}

下載webrtc-streamer

資源在最上面
也可以去github上面下載:webrtc-streamer
下載完后解壓,打開(kāi),啟動(dòng)

【vue2】前端如何播放rtsp 視頻流,拿到rtsp視頻流地址如何處理,??狄曨lrtsp h264 如何播放,前端,vue2,前端,音視頻,vue.js
出現(xiàn)下面這個(gè)頁(yè)面就是啟動(dòng)成功了,留意這里的端口號(hào),就是我選出來(lái)的部分,一般都是默認(rèn)8000,不排除其他情況

【vue2】前端如何播放rtsp 視頻流,拿到rtsp視頻流地址如何處理,海康視頻rtsp h264 如何播放,前端,vue2,前端,音視頻,vue.js

檢查一下也沒(méi)用啟動(dòng)成功,http://127.0.0.1:8000/ 粘貼到瀏覽器地址欄回車查看,啟動(dòng)成功能看到電腦當(dāng)前頁(yè)面(這里的8000就是啟動(dòng)的端口號(hào),啟動(dòng)的是多少就訪問(wèn)多少)

video.vue

新建video.js (位置自己決定,后面要引入的)

video.js中要修改兩個(gè)地方,第一個(gè)是引入webrtcstreamer.js路徑,第二個(gè)地方是ip地址要要修改為自己的ip加上啟動(dòng)的端口號(hào)(即上面的8000),不知道電腦ip地址的看下面一行

怎么查看自己的ip地址打開(kāi)cmd 黑窗口(即dos窗口),輸入ipconfig回車,在里面找到 IPv4 地址 就是了

<template>
  <div id="video-contianer">
    <video
      class="video"
      ref="video"
      preload="auto"
      autoplay="autoplay"
      muted
      width="600"
      height="400"
    />
    <div
      class="mask"
      @click="handleClickVideo"
      :class="{ 'active-video-border': selectStatus }"
    ></div>
  </div>
</template>

<script>
import WebRtcStreamer from "../../public/webrtcstreamer";

export default {
  name: "videoCom",
  props: {
    rtsp: {
      type: String,
      required: true,
    },
    isOn: {
      type: Boolean,
      default: false,
    },
    spareId: {
      type: Number,
    },
    selectStatus: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      socket: null,
      result: null, // 返回值
      pic: null,
      webRtcServer: null,
      clickCount: 0, // 用來(lái)計(jì)數(shù)點(diǎn)擊次數(shù)
    };
  },
  watch: {
    rtsp() {
      // do something
      console.log(this.rtsp);
      this.webRtcServer.disconnect();
      this.initVideo();
    },
  },
  destroyed() {
    this.webRtcServer.disconnect();
  },
  beforeCreate() {
    window.onbeforeunload = () => {
      this.webRtcServer.disconnect();
    };
  },
  created() {},
  mounted() {
    this.initVideo();
  },
  methods: {
    initVideo() {
      try {
        //連接后端的IP地址和端口
        this.webRtcServer = new WebRtcStreamer(
          this.$refs.video,
          `http://192.168.0.24:8000`
        );
        //向后端發(fā)送rtsp地址
        this.webRtcServer.connect(this.rtsp);
      } catch (error) {
        console.log(error);
      }
    },
    /* 處理雙擊 單機(jī) */
    dbClick() {
      this.clickCount++;
      if (this.clickCount === 2) {
        this.btnFull(); // 雙擊全屏
        this.clickCount = 0;
      }
      setTimeout(() => {
        if (this.clickCount === 1) {
          this.clickCount = 0;
        }
      }, 250);
    },
    /* 視頻全屏 */
    btnFull() {
      const elVideo = this.$refs.video;
      if (elVideo.webkitRequestFullScreen) {
        elVideo.webkitRequestFullScreen();
      } else if (elVideo.mozRequestFullScreen) {
        elVideo.mozRequestFullScreen();
      } else if (elVideo.requestFullscreen) {
        elVideo.requestFullscreen();
      }
    },
    /* 
    ison用來(lái)判斷是否需要更換視頻流
    dbclick函數(shù)用來(lái)雙擊放大全屏方法
    */
    handleClickVideo() {
      if (this.isOn) {
        this.$emit("selectVideo", this.spareId);
        this.dbClick();
      } else {
        this.btnFull();
      }
    },
  },
};
</script>

<style scoped lang="scss">
.active-video-border {
  border: 2px salmon solid;
}
#video-contianer {
  position: relative;
  // width: 100%;
  // height: 100%;
  .video {
    // width: 100%;
    // height: 100%;
    // object-fit: cover;
  }
  .mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
  }
}
</style>

頁(yè)面中調(diào)用

在頁(yè)面中引入video.vue,并注冊(cè)。將rtsp視頻地址傳過(guò)去就好了,要顯示幾個(gè)視頻就調(diào)用幾次

【vue2】前端如何播放rtsp 視頻流,拿到rtsp視頻流地址如何處理,??狄曨lrtsp h264 如何播放,前端,vue2,前端,音視頻,vue.js

回到頁(yè)面看,rtsp視頻已經(jīng)可以播放了文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-752949.html

到了這里,關(guān)于【vue2】前端如何播放rtsp 視頻流,拿到rtsp視頻流地址如何處理,??狄曨lrtsp h264 如何播放的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • electron+vue網(wǎng)頁(yè)直接播放RTSP視頻流?

    electron+vue網(wǎng)頁(yè)直接播放RTSP視頻流?

    目前大部分?jǐn)z像頭都支持RTSP協(xié)議,但是在瀏覽器限制,最新版的瀏覽器都不能直接播放RTSP協(xié)議,Electron 桌面應(yīng)用是基于 Chromium 內(nèi)核的,所以也不能直接播放RTSP,但是我們又有這個(gè)需求怎么辦呢? 市場(chǎng)上的方案很多,有很多免費(fèi)開(kāi)源的,同時(shí)也有比較成熟的商業(yè)軟件,豐儉

    2024年02月02日
    瀏覽(23)
  • vue中web端播放rtsp視頻流(攝像頭監(jiān)控視頻)(??低曚浵駲C(jī))

    vue中web端播放rtsp視頻流(攝像頭監(jiān)控視頻)(??低曚浵駲C(jī))

    ffmpeg下載?https://ffmpeg.org/download.html 找ffmpeg-release-essentials.zip點(diǎn)擊下載,下載完解壓 ffmpeg.exe 程序運(yùn)行 添加成功后驗(yàn)證是否生效任意地方打開(kāi)cmd窗口輸入 ffmpeg 打印如下表示成功 新建一個(gè)app.js文件,同級(jí)目錄下npm安裝 node-rtsp-stream 我是直接寫(xiě)在項(xiàng)目里了,你們可以單獨(dú)寫(xiě)在外

    2024年04月25日
    瀏覽(36)
  • 在VUE框架的WEB網(wǎng)頁(yè)端播放??低昍TSP視頻流完全方案

    在VUE框架的WEB網(wǎng)頁(yè)端播放??低昍TSP視頻流完全方案

    1.服務(wù)器轉(zhuǎn)流前端轉(zhuǎn)碼方案 服務(wù)器端先把RTSP流用Web Socket或WebRTC推送到前端,再通過(guò)WASM轉(zhuǎn)碼MP4播放。此方案雖號(hào)稱是無(wú)插件方案,但是需要服務(wù)器支持,兩次轉(zhuǎn)碼導(dǎo)致延遲較高,一般高達(dá)數(shù)秒甚至數(shù)分鐘。此方案首屏畫(huà)面顯示很慢。因?yàn)樾枰?wù)器不斷轉(zhuǎn)碼轉(zhuǎn)流,對(duì)CPU和內(nèi)存

    2024年02月05日
    瀏覽(22)
  • VUE3 播放RTSP實(shí)時(shí)、回放(NVR錄像機(jī))視頻流(使用WebRTC)

    VUE3 播放RTSP實(shí)時(shí)、回放(NVR錄像機(jī))視頻流(使用WebRTC)

    1、下載webrtc-streamer,下載的最新window版本 Releases · mpromonet/webrtc-streamer · GitHub ?2、解壓下載包 ?3、webrtc-streamer.exe啟動(dòng)服務(wù) (注意:這里可以通過(guò)當(dāng)前文件夾下用cmd命令webrtc-streamer.exe -o這樣占用cpu會(huì)很少,直接雙擊exe文件會(huì)占用cpu) cmd? webrtc-streamer.exe -o 啟動(dòng)如下圖所示,

    2024年04月12日
    瀏覽(23)
  • Windows上搭建rtsp-simple-server流媒體服務(wù)器實(shí)現(xiàn)rtsp、rtmp等推流以及轉(zhuǎn)流、前端html與Vue中播放hls(m3u8)視頻流

    Windows上搭建rtsp-simple-server流媒體服務(wù)器實(shí)現(xiàn)rtsp、rtmp等推流以及轉(zhuǎn)流、前端html與Vue中播放hls(m3u8)視頻流

    Nginx-http-flv-module流媒體服務(wù)器搭建+模擬推流+flv.js在前端html和Vue中播放HTTP-FLV視頻流: Nginx-http-flv-module流媒體服務(wù)器搭建+模擬推流+flv.js在前端html和Vue中播放HTTP-FLV視頻流_霸道流氓氣質(zhì)的博客-CSDN博客 上面講了Nginx-http-flv-module+flv.js進(jìn)行流媒體服務(wù)器搭建和前端播放視頻流的過(guò)

    2024年02月01日
    瀏覽(24)
  • QT實(shí)現(xiàn)OpenCV播放rtsp視頻流

    QT實(shí)現(xiàn)OpenCV播放rtsp視頻流

    使用OpenCV(圖像處理)、FastDeploy(飛槳部署)庫(kù); 監(jiān)控相機(jī)傳輸數(shù)據(jù)用的是碼流,高清網(wǎng)絡(luò)攝像機(jī)產(chǎn)品編碼器都會(huì)產(chǎn)生兩個(gè)編碼格式,稱為 主碼流 和 子碼流 。這就叫雙碼流技術(shù)。 目的是用于解決監(jiān)控錄像的本地存儲(chǔ)和網(wǎng)絡(luò)傳輸?shù)膱D像的質(zhì)量問(wèn)題。雙碼流能實(shí)現(xiàn)本地和遠(yuǎn)程

    2024年02月03日
    瀏覽(100)
  • web端播放rtsp視頻流(攝像頭監(jiān)控視頻)教程及window下開(kāi)機(jī)自啟動(dòng)部署

    web端播放rtsp視頻流(攝像頭監(jiān)控視頻)教程及window下開(kāi)機(jī)自啟動(dòng)部署

    像??荡笕A一些攝像頭或者直播源 為rtsp視頻流,想在web上播放必須進(jìn)行協(xié)議轉(zhuǎn)換。已知一些方案例如rtsp轉(zhuǎn)rtmp需要flash,現(xiàn)在瀏覽器基本不支持flash。還有轉(zhuǎn)hls或者flv這些延遲都比較高。經(jīng)過(guò)實(shí)踐對(duì)比比較理想方案是 經(jīng)轉(zhuǎn)碼后視頻流通過(guò)websocket傳送給客戶端在將視頻流解碼成

    2024年04月10日
    瀏覽(27)
  • 使用jsmpeg低延時(shí)播放rtsp視頻流(注:該方式在websocket服務(wù)器搭建好的情況下使用)

    注:本文僅在局域網(wǎng)下驗(yàn)證 1、安裝jsmpeg ????使用npm方式安裝(注:此方式安裝無(wú)法進(jìn)行二次開(kāi)發(fā)) npm install jsmpeg -s ?2、播放與使用 (1)引入方式(npm方式安裝) import? JSMpeg from \\\'jsmpeg\\\' (2)引入方式(使用源碼方式) import JSMpeg from \\\'xx/jsmpeg.min.js\\\'? ? ? ? ?//from后面的引用

    2024年02月09日
    瀏覽(15)
  • LiveNVR監(jiān)控流媒體Onvif/RTSP功能-視頻流水印如何疊加視頻水印疊加動(dòng)態(tài)圖片疊加視頻流時(shí)間示例

    LiveNVR監(jiān)控流媒體Onvif/RTSP功能-視頻流水印如何疊加視頻水印疊加動(dòng)態(tài)圖片疊加視頻流時(shí)間示例

    監(jiān)控視頻平臺(tái)播放視頻監(jiān)控的時(shí)候,除了滿足正常視頻播放外,有時(shí)還需要方便標(biāo)記或者防盜用等添加視頻水印。有些視頻在原始攝像頭端就可以添加OSD水印,這種方式最好。 但是有些原始視頻沒(méi)有水印,但是平臺(tái)端播放的時(shí)候又希望有水印,下面介紹下LiveNVR Onvif/RTSP流媒體

    2024年02月13日
    瀏覽(99)
  • 基于開(kāi)源的Micro-RTSP,使用VLC和ffmpeg拉流播放RTSP視頻流,本例使用安信可ESP32 CAM進(jìn)行推流。

    基于開(kāi)源的Micro-RTSP,使用VLC和ffmpeg拉流播放RTSP視頻流,本例使用安信可ESP32 CAM進(jìn)行推流。

    基于開(kāi)源的Micro-RTSP,使用VLC和ffmpeg拉流播放RTSP視頻流,本例使用安信可ESP32 CAM進(jìn)行推流。 vlc播放命令為:rtsp://192.168.43.128:8554/mjpeg/1。 ffmpeg播放命令為:ffplay rtsp://192.168.43.128:8554/mjpeg/1。 使用ESP-IDF5.0編譯成功。esp-idf-v4.4.2編譯不成功,有成功的小伙伴可以分享一下。 git cl

    2024年02月01日
    瀏覽(40)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包