Skip to main content

Posts

Showing posts from December, 2019

Opencv reading IP camera, Video stream, Web camera, images and

Opencv reading video files, reading video stream, Images, IP and Web cameras. I would like to cover this all in one post. Yes, video writer is also important to store your results and achievements in video. There is couple of simple trick and if you follow them, you will never have a problem with the reading and writing video, stream, files in future. Basic opencv web camera reading There is couple think you need to take care. My favorite installation on windows platform is trough NUGET package system. It is easy in few steps. I describe this many times for example VS 2017 here. Nuget set up your project without any linking settings, library path selection, global environmental variables and you can directly start coding in few seconds. Just select and install nuget and compile code below. Nothing else.  You need to take care if you have included several thinks. highgui.hpp core.hpp, imgproc.hpp, videoio, imgcodecs. All of them are not necessary to read the web camera but for example…

Install FFMPEG from source: Debian

Debian FFMPEG installation  The following steps describe how to build FFMPEG on the Debian system from source. The Debian Jessie is my current server version. The FFMPEG steps pipeline is: Get and install prerequisites, download FFmpeg, unpack FFmpeg source, configure installation and build the solution. Easy and straightforward as possible.  Debian installation steps for FFMPEG You need to install some prerequisites.
sudo apt-get -y install git make nasm pkg-config libx264-dev libxext-dev libxfixes- dev zlib1g-dev Download FFMPEG from the website
sudo wget -O ffmpeg-2.8.tar.bz2"https://www.ffmpeg.org/releases/ffmpeg-2.8.tar.bz2" Unzip and remove original package if you like
sudo tar -xvf ffmpeg-2.8.tar.bz2 sudo rm -Rf ffmpeg-2.8.tar.bz2
Run configuretion in source Folder 
./configure --enable-nonfree --enable-gpl --enable-libx264 --enable-x11grab --enable -zlib
Build solution
make -j2 Note here. -J 2 depends on your number of processor cores. If you have 20 cores intel ma…

Opencv Web camera and Video streams in Windows subsystem for Linux WSL, by FFmpeg and GStreamer

Opencv in Windows Subsystem for Linux (WSL) is a compatibility layer designed to running Linux binary executables (in ELF format) natively on Windows 10. I love it. There are some limitations to mention. The first biggest is the lack of support of CUDA, which could be a limitation for deep learning application and learning in WSL. The second trouble for Opencv development is the lack of Web camera support. This suspends WSL almost on a useless level for me until now. 
VideoCapture cap;   is not working in WSL for now
cap.open(0); 
This Video capture is right now not possible at in Ubuntu running under Windows (WSL). I will hit this limitation in this article. I will show you how to reach a video camera and learn something more about video streaming. Yes, the opencv processed frames will be stream to the web player on simple web site.
Check the goal of this opencv tutorial on this video
What you will learn about Opencv and FFMPEGStream video from windows to Linux in WSL environment. C…