A Gstreamer plugin to display the FPS of the pipeline
The following libraries are required for this plugin:
- v4l-utils
- libv4l-dev
- libgstreamer1.0-dev
- libgstreamer-plugins-base1.0-dev
- gcc
- meson
- ninja
sudo apt install v4l-utils libv4l-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev meson
Teledyne provide a bbappend file which provides all packages needed : https://github.com/teledyne-e2v/Yocto-files
Note : You can also compile them on your installed distribution but it will take a long time to compile (Do it only if you miss one or two packages)
First you must make sure that your device's clock is correctly setup. Otherwise the compilation will fail.
In the gst-fpscounter folder do:
meson build
ninja -C build
sudo ninja -C build install
First you must make sure that your device's clock is correctly setup. Otherwise the compilation will fail.
In the gst-fpscounter folder do:
meson build
ninja -C build install
To test if the plugin has been correctly install, do:
export GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0/
gst-inspect-1.0 fpscounter
If the plugin failed to install the following message will be displayed: "No such element or plugin 'fpscounter'"
sudo rm /usr/local/lib/gstreamer-1.0/libgstfpscounter.*
By default the plugin is installed in /usr/local/lib/gstreamer-1.0. It is then required to tell gstreamer where to find it with the command:
export GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0/
The plugin can be used in any gstreamer pipeline by adding fpscounter
, the name of the plugin.
gst-launch-1.0 v4l2src ! fpscounter ! 'video/x-raw,width=1920,height=1080,format=GRAY8' ! capssetter join=false caps="video/x-bayer,format=rggb" ! bayer2rgb ! nvvidconv ! 'video/x-raw(memory:NVMM)' ! nv3dsink sync=0
Note : You can use the plugin without debayer or with another (only if the debayer is after in the pipeline)
-
timestamp :
- Flags: readable, writable
- Type: Boolean
- Default: false
- Description: Measure the time between each frame
-
framerate :
- Flags: readable
- Type: Integer
- Range: 0 - 1000
- Default: 0
- Description: Indicate the framerate
-
silent :
- flags: writable
- Type: Boolean.
- Default: false
- Description: Control the std output