[SOLVED] Live Stream Camera Issue

gopigo3
project

#1

Hello I am trying to get the live stream camera working.
I have a GoPiGo3
I am using stretch from the image: “2018.05.18_Raspbian_For_Robots_by_Dexter_Industries-stretch.0.0.2.zip”
I have the gopigo using a static IP.
I have done the following:

This is what it looks like when I try to start the video stream:

pi@dex:~/Dexter/GoPiGo3/Projects/RemoteCameraRobot $ sudo python flask_server.py
Running server!
Connect on either ‘http://dex.local:5000’ in your browser. * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)

  • Restarting with stat Running server! Connect on either ‘http://dex.local:5000’ in your browser. * Debugger is active! * Debugger pin code: 274-027-351 10.2.10.230 - - [01/Jun/2018 09:12:32] “GET / HTTP/1.1” 200 -

When I visit http://myIP:5000 I see:

  • “Waiting For Video Stream”
  • A paper airplane flying around.
  • A broken image icon, the kind you get on a website where an image is missing.
  • And the text:

GoPiGo3 - Live Stream
State: stop
Angle Degrees: 76.03
Angle Direction: up
Joystick Force: 2.87

The robot does not move when I drag the mouse around, and the image never shows up.

Any help would be appreciated.

(I also can’t use VNC, may be a related issue, noVNC just says “Failed to connect to server” I can live without the VNC, but would like to get the camera working.)


noVNC failed to connect to server
#2

Update: I see an update was just made on git, so I updated. Thanks. Now the robot moves when I drag the mouse. But still no video stream.


#3

Hi @jhutton,

Did you run the install.sh script the second time?

Also, can you tell me if you get a live stream by using the following URL? Make sure your Pi is accessible at dex.local first.

dex.local:8080/stream/video.mjpeg

Thank you!


#4

Yes, I’ve ran sudo bash install.sh after the updates.
The dex.local thing may be my issue. I’ve been trying to access it through a static IP. I don’t have Bonjour installed.
I can access the terminal trough IP:4200 but the http://IP:8080/stream/video.mjpeg does not work.


#5

Hi @jhutton,

Well on the latest version of the project, the index page can access the camera even without having to resort to using dex.local address name - it can also use IPs now. Anyway, you should be able to use the IP instead of the DNS name just fine.

There could be two things we can do.

  1. Have a console log to print out the address at which the page is trying to access the stream and then check it’s validity.

  2. Check if the camera service is running by running systemctl status uv4l_raspicam. If it’s not active then that could be the problem, though it should already be up.

Another thing would be for you to install Bonjour. As opposed to using Bonjour, there’s also the option of sharing the internet connection to the Raspberry Pi, but that’s generally a buggy functionality of Windows (it happens in ~ 2/10 cases).

Please let me know if you already have handled the situation. We really want to have this project working.

Thank you!


#6

Not sure what you are asking for step 1.

Step 2 gives:
Unit uv4l_raspicam.service could not be found

(I was able to take a picture using: raspistill -o /home/pi/image.jpg)


#7

Hi @jhutton,

I think step 2 answers my question. It looks like the live stream service is not installed. Are you sure you ran the install script? Could you sudo bash install.sh it again?

Thank you!


#8

Sorry before I saw this I ran:
sudo apt-get install uv4l uv4l-raspicam
sudo apt-get install uv4l-raspicam-extras

and then did the install.sh again. Now systemctl status uv4l_raspicam says it is enabled.

However I still get “Your Internet access is blocked” on http://IP:8080/stream/video.mjpeg


#9

Hi @jhutton,

Blocked? Do you have firewall rules placed on the router or somewhere else? Can you show me more?

Thanks


#10

Or in IE: “This page can’t be displayed” on http://IP:8080/stream/video.mjpeg


#11

I can access IP:5000 or IP:4200 or just http://IP, but not the :8080


#12

Hmm, I have an idea. Can you try reaching this address on your Pi with a browser? (By using VNC of course) And by the way, replace the IP with localhost.

I’m almost pretty sure there’s a firewall rule that’s blocking you from seeing the stream.

Edit: And please show me some screenshots. I want to have a better idea of what you’re seeing.


#13

My VNC isn’t working either, it could be a related issue.
So I connected now with a hdmi to a monitor, keyboard and mouse.
localhost:8080/stream/video.mjpeg gives “This site can’t be reached”


#14

localhost works, and so does localhost:5000 (works but no image)


#15

If you type in sudo netstat -tuplen do you get to see port 8080 being listed in the Local Address column? If so, can you provide me a screenshot of the output?

Also, what version of Raspbian are you using? Wheezy, Jessie, Stretch? Is it Raspbian For Robots or just a basic Raspbian?

Thanks!


#16

I am using stretch from the image: “2018.05.18_Raspbian_For_Robots_by_Dexter_Industries-stretch.0.0.2.zip”
Capture


#17

Scrolled through, didn’t see any 8080


#18

Hi @jhutton,

Please give me a screenshot of this command’s output systemctl status uv4l_raspicam and then run sudo systemctl start uv4l_raspicam and then check this again and see if there’s a difference.

Did you reboot the Pi upon running the install script? I know it’s not needed, but I’m like “what if?”

Thanks!


#19

Capture2


#21

after sudo systemctl start uv4l_raspicam
Capture4