Skip to content

All4Gis/QGISFMV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QGIS Full Motion Video (FMV) #QGISFMV

Build Status Project Stats

Donations

If this plugin is useful for you, consider to donate to the author.Want to buy me a beer (or gadget)? Please use Paypal button or contact me directly.

paypal

Plugin for QGIS 3 which allows to analyze, visualize and process videos inside the QGIS environment. QGIS FMV accepts multiple video formats such as mp4, ts, avi, etc. It is also able to extract video frames, to capture the current frame, to plot bitrate and to observe the video metadata with aerial images and more. It also offers the possibility to create reports with video metadata.

Standards supported:

Table of Contents

Motivation

This development arises after observing that there was no free solution for the metadata extraction and video analysis in real time. All solutions are APIs or private tools such as Esri or ImpleoTv, for this reason, I decided to develop this open source project and, this way, offer this open source alternative to the QGIS community.

Back to top

Dependencies

  • FFMPEG : After downloading it, you should store it in an accessible folder and modify settings.ini with the corresponding path. For example D://FFMPEG or /usr/bin/

  • OpenCV : python3 -m pip install opencv-python

  • opencv-contrib-python : python3 -m pip install opencv-contrib-python

  • MatPlotLib : python3 -m pip install matplotlib

  • Klvdata : customized version of this library. (No need to install it)

The plugin install automatically this requisites,but you can install it using on Windows and Linux:

python3 -m pip install -r requirements.txt

Here is a settings.ini sample Linux configuration file or Windows sample. On windows you can find the settings.ini file at C:\Users<user name>\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\QGIS_FMV.

Back to top

For show video

To see the video you need:

If everything works well the plugin should install these dependencies automatically in both, Windows and Linux.

Back to top

Usage

The use of this application is simple. It only needs a video with metadata, like for example one of these (ESRI copyright) Then, open the plugin where the "video manager" will be shown, open the video and with a double-click, the "player" will be opened. At this moment, you will see that new shapes have been added and you will see the platform position, metadata, etc.

If we don't have a MISB video we can create it from a video file and telemetry file from a DJI for example.

Link to Usage Documentation!

Back to top

Recommended readings

For more information about the Unmanned Air System (UAS) metadata from STANAG 4609

a

Back to top

Installation

The installation can be done from the QGIS Python Plugins Repository or from the zip.

Back to top

Installation on Windows

Windows automatically installs all, with user permission,If an error occurs, you should perform some checks.

Watch the video (Spanish)

Installation on Ubuntu

Ubuntu automatically installs all the dependencies if the user wants, for this his password will be requested.

If it does not install automatically, you should run:

Python dependencies

sudo pip3 install matplotlib python-apt

The installation of OpenCV and OpenCV-contrib requires a lot of time for this reason you will have to install these dependencies using this script

sh install-opencv.sh

FFMPEG

sudo apt-get -y install ffmpeg

GStreamer/QT5 Plugins

sudo apt-get -y install python3-pyqt5.qtmultimedia gst123 libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio libqt5gstreamer-1.0-0 libqt5multimedia5-plugins

You need to restart QGIS after this.

NOTE : If you only see the videos with .mp4 extension, make sure you don't have it installed gstreamer1.0-vaapi. If you have it installed, you must delete it.

sudo apt-get remove gstreamer1.0-vaapi

Installation on Archlinux

Archlinux installation :

pacman -S qgis python-matplotlib opencv ffmpeg

_ Set FFmpeg path in $HOME/.local/share/QGIS/QGIS3/profiles/[profile_name]/python/plugins/QGIS_FMV/settings.ini _

ffmpeg : "/usr/bin/"
ffprobe : "/usr/bin/"

Slides

Back to top

Mentions

If you want to add your presentation simply upload it or send me an email

Back to top

Screenshots

a

Back to top

Features

  • Convert videos to other format
  • Extract metadata from video file
  • Show Platform,Trajectory,Footprint and beams position in a QGIS
  • Possibility of extracting parts of the video
  • Capture of the current frame
  • Extraction of all frames of the video
  • Extract lon/lat/alt cursor coordinates
  • Apply sobel filters, edge detection ...

Back to top

Contributing

Contributions are welcome!

Back to top

Contributing Code

Want to work on the project? Any kind of contribution is welcome!

Follow these steps:

Fork the project.
Create a new branch.
Make your changes and write tests ( if is possible).
Commit your changes to the new branch.
Send a pull request.

See before FMV Coding Standards!

NOTE: If you are use Linux need install pyuic5 and transifex client to compile the UI.

https://command-not-found.com/pyuic5

Debian apt-get install pyqt5-dev-tools

Ubuntu apt-get install pyqt5-dev-tools

Arch Linux pacman -S python-pyqt5

Kali Linux apt-get install pyqt5-dev-tools

Fedora dnf install python2-qt5

Raspbian apt-get install pyqt5-dev-tools

For test stream feature you can simulate stream channel,like this:

ffmpeg -fflags +genpts -stream_loop -1 -re -i "C:\Users\Fran Raga\Desktop\video_test\Cheyenne.ts" -f rtp_mpegts -c copy -map 0:v -map 0:a -map 0:d rtp://127.0.0.1:8888

ffmpeg -i rtp://127.0.0.1:8888 -c copy -map 0:v? -map 0:a? -f rtp_mpegts rtp://127.0.0.1:8898 -map 0:d? -f data -

And transifex client:

pip3 install transifex-client

Code Format

pip install coveralls
pip install pycodestyle

autopep8 --in-place --aggressive  --aggressive -v --recursive deploy/*.py --exclude="*gui/*"

pycodestyle --ignore=E501 code/*.py --statistics --exclude=code/gui/*.py
pycodestyle --ignore=E501,W504 deploy/*.py --statistics

And thanks for your code.

a

Contributing translations

Contributions are welcome!

transifex

Contributors List


Fran Raga

💻📖

ltbam

💻

Eandelin

📖

License

GNU Public License (GPL) Version 3

Free Software, Hell Yeah!

Back to top