GStreamer

GStreamer is a pipeline-based multimedia framework written in the C programming language with the type system based on GObject.

GStreamer allows a programmer to create a variety of media-handling components, including simple audio playback, audio and video playback, recording, streaming and editing. The pipeline design serves as a base to create many types of multimedia applications such as video editors, streaming media broadcasters, and media players.

Designed to be cross-platform, it is known to work on Linux (x86, PowerPC and ARM), Solaris (Intel and SPARC), macOS, Microsoft Windows and OS/400. GStreamer has bindings for programming-languages like Python, C++, Perl, GNU Guile (guile), and Ruby. GStreamer is free software, licensed under the GNU Lesser General Public License.

Installation

Install the gstreamer package.

To make GStreamer useful, install the plugins packages you require. See official documentation for list of features in each plugin.

Usage

Using gst-launch-1.0

A helpful tool of GStreamer is the gst-launch-1.0(1) command. It is an extremely versatile command line tool to create GStreamer pipelines. It is very similar to and can do many of the things the FFmpeg command can do. Here are some examples:

Convert an MP4 file to MKV:

$ gst-launch-1.0 filesrc location=source.mp4 ! qtdemux name=demux matroskamux name=mux ! filesink location=dest.mkv  demux.audio_0 ! queue ! aacparse ! queue ! mux.audio_0  demux.video_0 ! queue ! h264parse ! queue ! mux.video_0

Using gst-discoverer-1.0

Another helpful tool is gst-discoverer-1.0(1), which is the GStreamer equivalent of FFmpeg's .

Get info on a video file:

Integration

PulseAudio

PulseAudio support is provided by the gst-plugins-good package.

PipeWire

PipeWire support is provided by the package.

KDE / Phonon integration

See Phonon.

Hardware video acceleration

See Hardware video acceleration.

GStreamer will automatically detect and use the correct API . Depending on the system install:

If the new elements do not show up after installing the packages, you may want to delete and rebuild the plugin registry. Usually it suffices to

$ rm ~/.cache/gstreamer-1.0/registry.*.bin

Gstreamer will then rebuild the registry on the next invocation, which usually takes a few seconds.

Ignore driver whitelist

GStreamer uses a whitelist of VA-API drivers. To ignore the whitelist and allow support for other drivers, set as environment variable.

Verify VA-API support

To verify VA-API support:

Verify NVDECODE/NVENCODE support

To verify NVDECODE/NVENCODE support:

Set decoder ranks

For some NVIDIA users, gst-libav may prioritize the Libav decoder over nvcodec decoders which will inhibit hardware acceleration. The environment variable can be used to rank decoders and thus alleviate this issue. See "GST_PLUGIN_FEATURE_RANK" in the documentation for more information. For example:

GST_PLUGIN_FEATURE_RANK=nvmpegvideodec:MAX,nvmpeg2videodec:MAX,nvmpeg4videodec:MAX,nvh264sldec:MAX,nvh264dec:MAX,nvjpegdec:MAX,nvh265sldec:MAX,nvh265dec:MAX,nvvp9dec:MAX

Those without AV1 hardware support may also want to disable AV1 decoders (e.g., for YouTube on -based browsers) by appending and to the list above.

gollark: I think even my (e-ink) Kindle supports HTML/CSS and uses it for much of the UI, don't know how well it supports *canvases*.
gollark: Those run on a lot of devices but so does... SDL, Cairo, and whatever else.
gollark: Firefox's... not Gecko, whatever it is now... and Chromium/Blink.
gollark: That might be a stretch given that there are basically only two web rendering engines now.
gollark: The canvas, at least, is mostly standardized by now.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.