Click here to Skip to main content
16,018,264 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I have a Raspberry Pi streaming video on 
http://pi-address:8082/

The Raspberry Pi code comes from: 
https://github.com/waveform80/pistreaming
In Chrome and Edge I can watch the video with no problem. 
Now my problem is how can I do this in Windows UWP with a good performance and low CPU usage.
In Visual Studio 2017 I tried with WebView 
VB
wvTest.Navigate(New Uri("http://pi-address:8082"))

It works but the framerate is very low, the picture is pixelating and the CPU usage very high, when I compare to Chrome or Edge.

Thank you in advance
 
Using Developer Tools in Edge gives:

JavaScript
<pre><!DOCTYPE html>
<html><head>
	<meta name="viewport" content="width=640, initial-scale=1">
	<title>jsmpeg streaming</title>
	<style type="text/css">
		body {
			background: #333;
			text-align: center;
			margin-top: 10%;
		}
		#videoCanvas {
			/* Always stretch the canvas to 640x480, regardless of its
			internal size. */
			width: 640px;
			height: 480px;
		}
	</style>
<style type="text/css"></style></head>
<body>
	<!-- The Canvas size specified here is the "initial" internal resolution. jsmpeg will
		change this internal resolution to whatever the source provides. The size the
		canvas is displayed on the website is dictated by the CSS style.
	-->
	<canvas width="640" height="480" id="videoCanvas">
		<p>
			Please use a browser that supports the Canvas Element, like
			<a href="http://www.google.com/chrome">Chrome</a>,
			<a href="http://www.mozilla.com/firefox/">Firefox</a>,
			<a href="http://www.apple.com/safari/">Safari</a> or Internet Explorer 10
		</p>
	</canvas>
	<script src="jsmpg.js" type="text/javascript"></script>
	<script type="text/javascript">
		// Show loading notice
		var canvas = document.getElementById('videoCanvas');
		var ctx = canvas.getContext('2d');
		ctx.fillStyle = '#444';
		ctx.fillText('Loading...', canvas.width/2-30, canvas.height/3);

		// Setup the WebSocket connection and start the player
		var client = new WebSocket('ws://' + window.location.hostname + ':8084/');
		var player = new jsmpeg(client, {canvas:canvas});
	</script>
</body></html>


What I have tried:

In Visual Studio 2017 I tried with WebView 
VB
wvTest.Navigate(New Uri("http://pi-address:8082"))
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900