Showing posts from September, 2017

How to stream rtsp videos or mp4 files throught python/flask + opencv

First, you need to download the code to generate your site with flask. To do this, you can use the following @miguelgrinberg project to stream your webcam or image files with flask.

git clone

In you need replace:

from camera import Camera
from camera_opencv import Camera

Now, you must edit your video source from
video_source = 0, means that you want to stream your webcam (/dev/video0)
You can edit it, by a file or a rstp url

If you replace 0 by 'video.mp4' you will probably get the following error:

Starting camera thread.
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python3.5/", line 914, in _bootstrap_inner
File "/usr/lib/python3.5/", line 862, in run
self._target(*self._args, **self._kwargs)
File "/home/nboettcher/Downloads/rtsp/flask-video-streaming/", line 93, in _thread
for frame in frames_i…

How to install Matlab from iso files in Ubuntu Linux

If you try mount the iso files, maybe you can't change the permissions to execute (read-only files).
Try to extract both isos with:

7z x namefileDVD1.iso
7z x namefileDVD2.iso

To run matlab installer you must change the permissions from two files:

chmod +x install
chmod +x bin/glnxa64/install_unix

If you execute "sudo ./install" probably you will get this message:

Preparing installation files ...
Installing ...

That means that you may have problem with your jre environment.
Give the JRE path to the executable to run it:

sudo ./install -javadir "/usr/lib/jvm/java-8-openjdk-amd64/jre" 

If you don't know where is your JRE path, just find jre folders with:

locate jre

Enjoy it!