Go Down

Topic: Guide to Setup Streaming Web Cam on the Yun (Read 95041 times) previous topic - next topic

muhkuh

After updating my Yun to the latest version (1.41) and reinstalling mjpeg streamer,
i get a lot of image tearing in my stream.

anyone else expirienced these issues?
with the stock Yun firmware i had no issues at all, it worked perfectly.
But after update its realy bad. Kinda makes the webcam stream useless because the image is constanlty flashing in strange colors or showing half images.

marco26

I am having the exact same problem here with 1.4.2 and other updates. Does anyone know how I can return to the factory (1.0) firmware? I tried pressing the WLAN RST button for more than 30 seconds but it didn't help... Thanks!

stefanos90

Hello,
I have website on a remote server,
does anyone have any idea how to pass the stream  http://arduino.local:8080/?action=stream  to the server?

I had an idea of iframe but still the video is streaming on arduino not on my server.

mart256

#63
Dec 19, 2014, 12:49 pm Last Edit: Dec 19, 2014, 12:51 pm by mart256
First I want to thank OP, Vadorequest and the guy who compiled the MJPEG streamer for Yun. I've been able to stream with my Microsoft Life HD 3000 with yun and using firefox as browser.

After updating my Yun to the latest version (1.41) and reinstalling mjpeg streamer,
i get a lot of image tearing in my stream.

anyone else expirienced these issues?
with the stock Yun firmware i had no issues at all, it worked perfectly.
But after update its realy bad. Kinda makes the webcam stream useless because the image is constanlty flashing in strange colors or showing half images.
I have yun with OpenWRT-Yun 1.0 (never upgraded, but doesn't have Linino I'm sure about that)
I downloaded the last version of mjpeg and I've this same problem, image tearing and strange color each 5-10 sec, not permanent though.
I noticed that the problem was reduced the lower the resolution is, I used 320x240 5 fps and the tearing was almost gone. Anyway, if it is a wifi problem I can't do much  :smiley-sweat:

sonnyyu

#64
Dec 19, 2014, 03:56 pm Last Edit: Dec 19, 2014, 04:10 pm by sonnyyu
Stream high resolution video:

1. Cpu utilization
use command "top" to comfirm
http://forum.arduino.cc/index.php?topic=188690.msg1711487#msg1711487
offload compression to GPU, multiple core GPUs even better.

2. Memory usage
use command "free" to comfirm
expand the RAM.

3. Network bandwidth requirement
http://forum.arduino.cc/index.php?topic=188690.msg1711526#msg1711526
H.264/MPEG-4 has compression-ratios of 1:50
M-JPEG has compression-ratios of 1:20
by use H.264/MPEG-4 will reduce bandwidth requirement by 250%.

If you need stream 3D Blu-ray all of above have to address.

sonnyyu

Plan B:

Offload all the heavy lift to Webcam which has H.264 built in

Logitech H.264 Webcam Technology

http://www.logitech.com/en-us/webcam-communications/articles/11612


trippingly

Thank you to the OP and the other contributors to this thread and project  :)  - I've been able to get the webcam stream up and have tinkered with starting and stopping the stream various ways (via a shell script, a php call to the script, a spacebrew button). It's very encouraging and points to some interesting projects to try.

I'm wondering what options there might be for making the stream secure. The password to mjpg_streamer (with the -c option) is sent in plain text, and it hasn't worked for me to access the stream via https. Looking on the web seems to indicate https is not how things are done with streaming, anyhow.

Is a non-linked, non-obvious page for the stream, linked to from another https page that uses basic authentication the simplest way to have some modest security?

- Doug

sonnyyu

#67
Jan 31, 2015, 07:09 am Last Edit: Jan 31, 2015, 07:11 am by sonnyyu
Plan A:

Turn on firewall of Yun, use IP authentication only allow authorized IP address ( Machine )  to access.




trippingly

Thanks for the idea of the firewall, @sonnyyu - I hadn't thought of that.

Can I set the Yun's firewall via Luci to allow an outside web browser on a phone (the IP address will change, but the phone's MAC address is fixed and known) to connect to port 8080 on the Yun while blocking other MAC addresses?

I tried setting up a port forward for the phone's MAC address, but I am doing something incorrectly:

on Luci: Network > Firewall > Traffic Rules > Open ports on router with the settings:

Any TCP, UDP
From any host in any zone with source port 8765 and MAC xx:xx:xx:xx:xx:4A (MAC address I'm testing from)
To any host, port 8080 in any zone

(I'm new to the Yun's firewall and don't know anything yet about MAC addresses and the nuances of port forwarding - I am not even sure I have it turned on  ::) , though I tried iptables -L and got a lot of output.)

Thanks for ideas/guidance - this can go into a new thread if it would be better...

Doug

trippingly

#69
Feb 01, 2015, 01:52 am Last Edit: Feb 01, 2015, 02:29 am by trippingly Reason: Didn't quite work, after all
I'm making progress!

Instead of:

I tried setting up a port forward for the phone's MAC address, but I am doing something incorrectly:

on Luci: Network > Firewall > Traffic Rules > Open ports on router with the settings:

Any TCP, UDP
From any host in any zone with source port 8765 and MAC xx:xx:xx:xx:xx:4A (MAC address I'm testing from)
To any host, port 8080 in any zone
I tried on Luci: Network > Firewall > Port Forwards

IPv4-TCP
From any host in lan with source MAC xx:xx:xx:xx:xx:4A  (MAC address I'm testing from)
Via IP 10.0.1.8 at port 8765          (the Yun is at 10.0.1.8 )
any host, port 8080 in lan

This enabled the browser with the listed MAC to connect to the port 8080 stream via http://10.0.1.8:8765/stream.html

At this point, other browsers could still connect at http://10.0.1.8:8080, but when I added another rule (not sure if this is the best way to do this):

IPv4-TCP
From any host in lan
Via any router IP at port 8080
any host, port 8888 in lan      (8888 is just a random port I'm not using)

...then attempts to connect on 8080 fail as intended.

I'll see if I can now 1) set my home router (a Time Capsule, which can't handle this MAC filtering) to port forward 8080 to the Yun on 10.0.1.8, 2) put the MAC addresses of the devices I want to authorize into similar rules in the Yun firewall, and 3) modify the rules to work with connections coming from outside my home network.

Edit: Close, but no cigar...

The cable internet gateway puts its own MAC address on the traffic, so I won't be able to use the phone's MAC address this way. Back to the drawing board (on to the next drawing board)... :smiley-lol:

bobli

Hello,
I have website on a remote server,
does anyone have any idea how to pass the stream  http://arduino.local:8080/?action=stream  to the server?

I had an idea of iframe but still the video is streaming on arduino not on my server.
Hello there,

Have any of you found a solution to this problem: inserting the webcam stream with its specific port in a random port 80 http page?

Cheers
Mongo!

jessemonroy650

@bobli,
this question has been answer multiple times. Please start a new thread.

TIA
Jesse

bobli

At the moment I have only found a way to display a custom web page I've created from Yun and how to display a webcam stream on a a web page with an adress like blablabla.local:8080

I still can't find a way to display the webcam stream on my custom webpage, I mean I don't need to have 2 adresses for my project.

Any help? 
Mongo!

sonnyyu

#73
Apr 14, 2015, 01:00 pm Last Edit: Apr 14, 2015, 01:01 pm by sonnyyu
Sample html page from blablabla.local:8080:


Code: [Select]
<html>
  <head>
    <title>MJPG-Streamer - Stream Example</title>
  </head>
  <body>
    <center>
      <img src="/?action=stream" />
    </center>
  </body>
</html>


Code: [Select]
nano /www/video.html

Code: [Select]
<html>
  <head>
    <title>MJPG-Streamer - Stream Example</title>
  </head>
  <body>
    <center>
      <img src="http://192.168.0.102:8080/?action=stream" />
    </center>
  </body>
</html>


Use browser view video page at:

http://192.168.0.102/video.html





bobli

It looks clear and simple, I look forward to testing it tonight!!!

I already had the sample page from mpg-streamer, I was just missing this part "<img src="http://192.168.0.102:8080/?action=stream" />" to put in my own page.... 

Mongo!

Go Up