Using Videos in jBEAM using GStreamer
Writing Date: 2022-06-22
URLs adapted: 2023-09-04
GStreamer Integration in jBEAM
Starting with versions 8.4.0.0, 8.3.0.4 the video stack in jBEAM has been reworked so a new module “GStreamer” with which the video importer and the video player can play videos and video streams.
The GStreamer framework must be installed in the operating system and provides a variety of video formats and streams and is available for many operating systems (including Windows, Linux, Mac OS X) for both 32-bit and 64-bit platforms. In jBEAM we use a Java wrapper library to access this native GStreamer framework.
New jBEAM installations usually include the Java wrapper library. For older jBEAM installations this must be done manually, see chapter Download and Installation of Java Wrapper Library below.
The native GStreamer framework must always be installed separately.
Installation of GStreamer Framework (all version numbers and links at the moment of writing)
Project URL
See https://gstreamer.freedesktop.org/
Download for Windows x64-Binary, Version 1.20.2
See https://gstreamer.freedesktop.org/data/pkg/windows/1.22.5/msvc/gstreamer-1.0-msvc-x86_64-1.22.5.msi
For Linux see chapter below.
Tested with GStreamer 64 Bit Version 1.20.2 on Windows and Linux.
Installation of native GStreamer Framework (Windows)
See https://gstreamer.freedesktop.org/documentation/installing/on-windows.html
Start installation using .msi file
Follow installation steps and select “Custom” setting
Select the following GStreamer modules for installation:
GStreamer 1.0 core
GStreamer 1.0 system plugins
GStreamer 1.0 plugins for playback
GStreamer 1.0 codecs
GStreamer 1.0 effects and instrumentation plugins
GStreamer 1.0 plugins for network protocols
GStreamer 1.0 visualization plugins
GStreamer 1.0 libav wrapper
Modules that can lead to potential copyright infringement are not installed.
The .msi installation routine for 64-bit versions creates an environment variable named GSTREAMER_1_0_ROOT_MSVC_X86_64. This variable is used by jBEAM to find the native libraries of the GStreamer framework.
If the GStreamer library is still not found, it is most likely caused by using an older/ customized jBEAM installation. Then additionaly the Gstreamer bin-directory must also be added to Windows “Path” environment variable:
%GSTREAMER_1_0_ROOT_MSVC_X86_64%\bin
(In versions from 2023 and later, this step happens automatically in the start_jBEAM.bat)
Installation of native GStreamer Framework (Ubuntu)
See https://gstreamer.freedesktop.org/documentation/installing/on-linux.html
The following packages must be installed:
apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad 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 gstreamer1.0-plugins-base-apps
In addition to the installation instructions on the website, the package gstreamer1.0-plugins-base-apps must be installed, because the tool gst-discoverer-1.0 must be available on the command line.
The package gstreamer1.0-plugins-ugly should rather not be installed, because the package contains codecs that can lead to potential copyright infringements.
Download and Installation of Java Wrapper Library
The Java wrapper library is used to leverage the native GStreamer framework in Java applications such as jBEAM. Typically, the library is already installed during the jBEAM installation process. The library must be located in the <jBEAM installation directory>/lib folder or a subfolder of that directory.
Project URL
https://github.com/gstreamer-java/gst1-java-core
Download jar file
https://github.com/gstreamer-java/gst1-java-core/releases/download/v1.4.0/gst1-java-core-1.4.0.jar
Integration in jBEAM
To check the usage open Resources/Library Usage in jBEAMs Help menu.
The library “GStreamer 1.x Java Core” is displayed in green in the dialog if it can be used. The video importer and video player can then use the GStreamer framework to play video files or streams. If the wrapper library (see Section 2.3) or the native GStreamer libraries are not available, the “GStreamer 1.x Java Core” library is displayed in red.
To use the native resources of the GStreamer framework, the “bin” directory of the framework that contains the native libraries must be made available via the platform-specific path environment variable. When starting jBEAM via start_jBEAM.bat or with jBEAM.exe the path environment variable is usually already set correctly.
Setting the path environment variable manually for 64-bit version:
Windows: set PATH=%PATH%;<GStreamer-Installationpath>\ 1.0\ x86_64\ bin;
Mac OS X: export LD_LIBRARY_PATH=”GStreamer-Installationpath>/1.0/x86_64/bin”
The installation of the GStreamer framework on Windows creates an environment variable named GSTREAMER_1_0_ROOT_X86_64 that points to the <GStreamer installation directory>\ 1.0\ x86_64 folder and is used by the start_jBEAM.bat and jBEAM.exe startup files.
GStreamer Integration in MaDaM
See Videos in analyses - MaDaM - Kistler Wiki (atlassian.net)