Posts

Showing posts from September, 2017

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

Image
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 https://github.com/miguelgrinberg/flask-video-streaming In app.py you need replace: from camera import Camera by from camera_opencv import Camera Now, you must edit your video source from camera_opencv.py. 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/threading.py", line 914, in _bootstrap_inner self.run() File "/usr/lib/python3.5/threading.py", line 862, in run self._target(*self._args, **self._kwargs) File "/home/nboettcher/Downloads/rtsp/flask-video-streaming/base_camera.py", line 93, i...

How to install Matlab from iso files in Ubuntu Linux

Image
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 ... Finished. 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!