GStreamer Suite 1.26.3

Introduction to the GStreamer Suite

GStreamer is a streaming media framework that enables applications to share a common set of plugins for tasks such as video encoding and decoding, audio encoding and decoding, audio and video filters, audio visualisation, web streaming and anything else that streams in real-time or otherwise. This page provides most of the set of packages for ease of installation as they mostly have the same instructions.

[Notat]

Notat

Dette kan ta litt tid å bygge. Gjør gjerne noe annet mens dette bygges.

GStreamer Suite Dependencies

Required

FFmpeg-7.1.1 (for libav support), GLib-2.84.3 (GObject Introspection required for GNOME), and Meson Verktøykjedefiler (for lib32)

Recommended

Optional

AAlib, graphene, GTK-3 (for examples), gsl (used by one test if installed), libcdio (for CD-ROM drive access), libdv, libmpeg2, libnsl, libunwind-1.8.1, Opus-1.5.2, Qt-5, Qt-6, rustc-1.88.0 (for IEEE 1588:2008 PTP clock support), SDL2-2.32.8, Speex-1.2.1, taglib, Valgrind, v4l-utils, Wayland-1.23.1, alsa-oss, bash-completion, hotdoc, JACK, libavc1394, libcaca, libdw, libiec61883, libraw1394, libshout, libsidplay, libtheora, libvisual, Orc, Tremor, TwoLame, and WavPack

[Notat]

Notat

The optional list is not complete. See BLFS' gst-plugins-bad for dependencies that are missing from the list.

Downloading the GStreamer Suite

First create a list of files that will be downloaded:

cat > gstreamer-suite-1.26.3-list << EOF
gstreamer/gstreamer-1.26.3.tar.xz
gst-plugins-base/gst-plugins-base-1.26.3.tar.xz
gst-plugins-good/gst-plugins-good-1.26.3.tar.xz
gst-plugins-bad/gst-plugins-bad-1.26.3.tar.xz
gst-plugins-ugly/gst-plugins-ugly-1.26.3.tar.xz
gst-libav/gst-libav-1.26.3.tar.xz
EOF

To download the needed files using Wget-1.25.0, use the following commands:

mkdir gstreamer-suite &&
cd    gstreamer-suite &&
grep -v '^#' ../gstreamer-suite-1.26.3-list | wget -i- -c \
    -B https://gstreamer.freedesktop.org/src/

Installation of the GStreamer Suite

[Notat]

Notat

Når du installerer flere pakker i et skript, må installasjonen gjøres som root bruker. Det finnes tre generelle alternativer som kan brukes til å gjøre dette:

  1. Kjør hele skriptet som root bruker (ikke anbefalt).

  2. Bruk sudo kommandoen fra sudo pakken.

  3. Use su -c "command arguments" ((anførselstegn kreves) som vil be om root passordet for hver iterasjon av løkken.

En måte å håndtere denne situasjonen på er å lage en kort bash funksjon som automatisk velger riktig metode. Når kommandoen er satt i miljøet, trenger den ikke å settes på nytt.

as_root()
{
  if   [ $EUID = 0 ];        then $*
  elif [ -x /usr/bin/sudo ]; then sudo $*
  else                            su -c \\"$*\\"
  fi
}

export -f as_root

First do a test to see if the suite is installed, and if it is, remove the previous installation [14]:

pkgconf gstreamer-1.0
if test x"$?" = x"0"; then
  as_root rm -rvf /usr/bin/gst-* /usr/{lib,libexec}/gstreamer-1.0
fi

Now start a subshell that will exit on error:

bash -e

Install all of the packages by running the following commands:

for package in $(grep -v '^#' ../gstreamer-suite-1.26.3-list)
do
  package=$(basename "$package")
  packagedir=${package%.tar.?z*}
  echo "Building $packagedir"
  tar -xf $package
  pushd $packagedir

  case $packagedir in
    gstreamer-[0-9]* )
      extraflags="-D gst_debug=false"
    ;;
    gst-plugins-base-[0-9]* )
      extraflags="--wrap-mode=nodownload"
    ;;
    gst-plugins-bad-[0-9]* )
      extraflags="-D gpl=enabled"
    ;;
    gst-plugins-ugly-[0-9]* )
      extraflags="-D gpl=enabled"
    ;;
    * )
      extraflags=
    ;;
  esac

  mkdir build
  cd    build
    meson setup --prefix=/usr       \
                --buildtype=release \
                $(echo $extraflags) \
                .. &&
    ninja
    as_root ninja install
  popd
  rm -rf $packagedir
done

Finally, exit the shell that was started earlier:

exit

lib32 Installation of the GStreamer Suite

First do a test to see if the suite is installed, and if it is, remove the previous installation:

i686-pc-linux-gnu-pkg-config gstreamer-1.0
if test x"$?" = x"0"; then
  as_root rm -rvf /usr/lib32/gstreamer-1.0
fi

Now start a subshell that will exit on error:

bash -e

Install all of the packages by running the following commands:

for package in $(grep -v '^#' ../gstreamer-suite-1.26.3-list)
do
  package=$(basename "$package")
  packagedir=${package%.tar.?z*}
  echo "Building lib32-$packagedir"
  tar -xf $package
  pushd $packagedir

  case $packagedir in
    gstreamer-[0-9]* )
      extraflags="-D gst_debug=false"
    ;;
    gst-plugins-base-[0-9]* )
      extraflags="--wrap-mode=nodownload -D qt5=disabled"
    ;;
     gst-plugins-good-[0-9]* )
      extraflags="$([ -f /usr/lib32/libmp3lame.so ] || echo "-D lame=disabled")"
      extraflags+=" -D qt5=disabled -D qt6=disabled"
    ;;
    gst-plugins-bad-[0-9]* )
      extraflags="-D gpl=enabled"
    ;;
    gst-plugins-ugly-[0-9]* )
      extraflags="-D gpl=enabled"
    ;;
    * )
      extraflags=
    ;;
  esac

  mkdir build
  cd    build
    meson setup --prefix=/usr       \
                --libdir=/usr/lib32 \
                --cross-file=lib32  \
                --buildtype=release \
                $(echo $extraflags) \
                .. &&
    ninja
    DESTDIR=$PWD/DESTDIR ninja install
    as_root cp -vR DESTDIR/usr/lib32/* /usr/lib32
    rm -rf DESTDIR
  popd
  rm -rf $packagedir
  as_root /sbin/ldconfig
done

Finally, exit the shell that was started earlier:

exit

Command Explanations

[Notat]

Notat

Undersøk meson_options.txt eller meson.options for en fullstendig liste over alternativer.

--buildtype=release: Spesifiser en byggetype som er egnet for stabile utgivelser av pakken, da standardtypen kan produsere uoptimaliserte binærfiler.

-D gpl=enabled: Without this switch, plugins with dependencies on (A)GPL licensed libraries are not built.

-D qt{5,6}=disabled: On a multilib system, while Qt-5 or Qt-6 may be installed, it is far less likely for them to be installed for lib32. meson falsely detects them being installed if 64-bit installations are detected, which leads to linker errors. If you have installed lib32-Qt-{5,6}, remove these parameters.

$([ -f /usr/lib32/libmp3lame.so ] ...: This command searches for a library from one of the recommended dependencies, and if it can't find the library, the command invokes -D lame=disabled to disable LAME support for the 32-bit build as meson can't detect if it is the right architecture or not.

Contents

Installed Programs: gst-device-monitor-1.0, gst-discoverer-1.0, gst-inspect-1.0, gst-launch-1.0, gst-play-1.0, gst-stats-1.0, gst-tester-1.0, gst-transcoder-1.0, gst-typefind-1.0, and playout
Installed Libraries: libgstadaptivedemux-1.0, libgstallocators-1.0, libgstanalytics-1.0, libgstapp-1.0, libgstaudio-1.0, libgstbadaudio-1.0, libgstbase-1.0, libgstbasecamerabinsrc-1.0, libgstcheck-1.0, libgstcodecparsers-1.0, libgstcodecs-1.0, libgstcontroller-1.0, libgstcuda-1.0, libgstdxva-1.0, libgstfft-1.0, libgstgl-1.0, libgstinsertbin-1.0, libgstisoff-1.0, libgstmpegts-1.0, libgstmse-1.0, libgstnet-1.0, libgstpbutils-1.0, libgstphotography-1.0, libgstplay-1.0, libgstplayer-1.0, libgstreamer-1.0, libgstriff-1.0, libgstrtp-1.0, libgstrtsp-1.0, libgstsctp-1.0, libgstsdp-1.0, libgsttag-1.0, libgsttranscoder-1.0, libgsturidownloader-1.0, libgstva-1.0, libgstvideo-1.0, libgstwayland-1.0, libgstwebrtc-1.0, and several plugins under /usr/lib{,32}/gstreamer-1.0
Installed Directories: /usr/include/gstreamer-1.0/gst/{allocators,app,audio,fft,gl,pbutils}, /usr/include/gstreamer-1.0/gst/{audio,basecamerabinsrc,cuda}, /usr/include/gstreamer-1.0/gst/{codecparsers,insertbin,interfaces}, /usr/include/gstreamer-1.0/gst/{isoff,mpegts,play,player,sctp}, /usr/include/gstreamer-1.0/gst/{riff,rtp,rtsp,sdp,tag,video}, /usr/include/gstreamer-1.0/gst/{transcoder,uridownloader,va}, /usr/include/gstreamer-1.0/gst/{wayland,webrtc}, /usr/share/gst-plugins-base, /usr/share/gstreamer-1.0/presets, and /usr/{include,lib{,32},libexec,share}/gstreamer-1.0

Short Descriptions

gst-device-monitor-1.0

is a command line tool that can be used to test GStreamer's device monitoring functionality

gst-discoverer-1.0

is a tool that can be used to print basic metadata and stream information about a media file

gst-inspect-1.0

is a tool that prints out information on available GStreamer plugins, information about a particular plugin, or information about a particular element

gst-launch-1.0

is a tool that builds and runs basic GStreamer pipelines

gst-play-1.0

is a command line tool that can be used to test basic playback using the playbin element

gst-stats-1.0

is a tool used to gather statistics about GStreamer operations

gst-tester-1.0

runs a test plan in TAP compatible format while integrating with the meson test harness

gst-transcoder-1.0

is used to transcode a stream into a different format

gst-typefind-1.0

uses the GStreamer type finding system to determine the relevant GStreamer plugin to parse or decode files, and the corresponding MIME type

playout

is an example application used to sequentially play a list of audio-video files

libgstbase-1.0

provides some base classes to be extended by elements and utility classes that are most useful for plugin developers

libgstcheck-1.0

provides functionality for writing unit tests that use the check framework

libgstcontroller-1.0

provides functionality to animate element properties over time

libgstnet-1.0

provides network elements and objects

libgstreamer-1.0

provides all of the core GStreamer services, including initialization, plugin management and types, as well as the object hierarchy that defines elements and bins, along with some more specialized elements



[14] Removal of previous installation is required or else processes may hang or not function properly due to mixed versions being installed.