Skip to content

GStreamer

GStreamer is a library for constructing graphs of media-handling components. The applications it supports range from simple Ogg/Vorbis playback, audio/video streaming to complex audio (mixing) and video (non-linear editing) processing.

Applications can take advantage of advances in codec and filter technology transparently. Developers can add new codecs and filters by writing a simple plugin with a clean, generic interface. Read more ...

GStreamer is released under the LGPL. The 1.x series is API and ABI stable and supersedes the previous stable 0.10 series. Both can be installed in parallel.

About

GStreamer는 GObject 기반 자료형 체계와 더불어 C 프로그래밍 언어로 작성한 파이프라인 기반 멀티미디어 프레임워크이다.

GStreamer는 단순 오디오 재생, 오디오 및 비디오 재생, 녹음, 스트리밍 및 편집을 비롯하여 프로그래머가 다양한 미디어 관리 구성 요소를 만들 수 있게 해 준다. 파이프라인 디자인은 영상 편집기, 스트리밍 미디어 브로드캐스터, 미디어 플레이어와 같은 수많은 종류의 멀티미디어 응용 프로그램을 만드는 역할을 한다.

Categories

C API Class/Struct/Functions

Core Library

  • Core Library
  • Running GStreamer Applications - How to run and debug your GStreamer application
  • GStreamer:GStreamer - Media library supporting arbitrary formats and filter graphs.
  • GStreamer:Debugging utilities - A set of utilities for debugging and development
  • GStreamer:GstAllocator - allocate memory blocks
  • GStreamer:GstAtomicQueue - An atomic queue implementation
  • GStreamer:GstBin - Base class and element that can contain other elements
  • GStreamer:GstBuffer - Data-passing buffer type
  • GStreamer:GstBufferList - Lists of buffers for data-passing
  • GStreamer:GstBufferPool - Pool for buffers
  • GStreamer:GstBus - Asynchronous message bus subsystem
  • GStreamer:gstbytearrayinterface
  • GStreamer:GstCaps - Structure describing sets of media formats
  • GStreamer:GstCapsFeatures - A set of features in caps
  • GStreamer:GstChildProxy - Interface for multi child elements.
  • GStreamer:GstClock - Abstract class for global clocks
  • GStreamer:GstCompat - Deprecated API entries
  • GStreamer:GstContext - Lightweight objects to represent element contexts
  • GStreamer:GstControlBinding - attachment for control source sources
  • GStreamer:GstControlSource - base class for control source sources
  • GStreamer:GstDateTime - A date, time and timezone structure
  • GStreamer:GstDevice - Object representing a device
  • GStreamer:GstDeviceMonitor - A device monitor and prober
  • GStreamer:GstDeviceProvider - A device provider
  • GStreamer:GstDeviceProviderFactory - Create GstDeviceProviders from a factory
  • GStreamer:GstDynamicTypeFactory - Represents a registered dynamically loadable GType
  • GStreamer:GstElement - Abstract base class for all pipeline elements
  • GStreamer:GstElementFactory - Create GstElements from a factory
  • GStreamer:GstEvent - Structure describing events that are passed up and down a pipeline
  • GStreamer:GstFormat - Dynamically register new data formats
  • GStreamer:GstGError - Categorized error messages
  • GStreamer:GstGhostPad - Pseudo link pads
  • GStreamer:GstIdStr - String type optimized for short strings
  • GStreamer:GstInfo - Debugging and logging facilities
  • GStreamer:GstIterator - Object to retrieve multiple elements in a threadsafe way.
  • GStreamer:GstMemory - refcounted wrapper for memory blocks
  • GStreamer:GstMessage - Lightweight objects to signal the application of pipeline events
  • GStreamer:GstMeta - Buffer metadata
  • GStreamer:GstMiniObject - Lightweight base class for the GStreamer object hierarchy
  • GStreamer:GstObject - Base class for the GStreamer object hierarchy
  • GStreamer:GstPad - Object contained by elements that allows links to other elements
  • GStreamer:GstPadTemplate - Describe the media type of a pad.
  • GStreamer:GstParamSpec - GParamSpec implementations specific to GStreamer
  • GStreamer:GstParse - Get a pipeline from a text pipeline description
  • GStreamer:GstPipeline - Top-level bin with clocking and bus management functionality.
  • GStreamer:GstPlugin - Container for features loaded from a shared object module
  • GStreamer:GstPluginfeature - Base class for contents of a GstPlugin
  • GStreamer:GstPoll - Keep track of file descriptors and make it possible to wait on them in a cancellable way
  • GStreamer:GstPreset - helper interface for element presets
  • GStreamer:GstPromise - a miniobject for future/promise-like functionality
  • GStreamer:GstProtection - Functions and classes to support encrypted streams.
  • GStreamer:GstQuery - Provide functions to create queries, and to set and parse values in them.
  • GStreamer:GstRegistry - Abstract base class for management of #GstPlugin objects
  • GStreamer:GstSample - A media sample
  • GStreamer:GstSegment - Structure describing the configured region of interest in a media file.
  • GStreamer:GstStreamCollection - Base class for collection of streams
  • GStreamer:GstStreams - Base class for stream objects
  • GStreamer:GstStructure - Generic structure containing fields of names and values
  • GStreamer:GstSystemClock - Default clock that uses the current system time
  • GStreamer:GstTagList - List of tags and values used to describe media metadata
  • GStreamer:GstTagsetter - Element interface that allows setting and retrieval of media metadata
  • GStreamer:GstTask - Abstraction of GStreamer streaming threads.
  • GStreamer:GstTaskPool - Pool of GStreamer streaming threads
  • GStreamer:GstToc - Generic table of contents support
  • GStreamer:GstTocSetter - Element interface that allows setting and retrieval of the TOC
  • GStreamer:GstTracer - Tracing base class
  • GStreamer:GstTracerFactory - Information about registered tracer functions
  • GStreamer:GstTracerRecord - Trace log entry class
  • GStreamer:gsttracerutils
  • GStreamer:GstTypefind - Stream type detection
  • GStreamer:GstTypeFindFactory - Information about registered typefind functions
  • GStreamer:GstUri - URI parsing and manipulation.
  • GStreamer:GstUriHandler - Interface to ease URI handling in plugins.
  • GStreamer:GstUtils - Various utility functions
  • GStreamer:GstValue - GValue implementations specific to GStreamer
  • GStreamer:GstVecDeque - Array based double-ended queue object

Tools

GStreamer Plugins

Template:GStreamer:Plugins <- 양이 많으니 페이지에 직접 들어가서 봐라.

Examples

Install

Install GStreamer on Ubuntu or Debian

Run the following command:

sudo 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-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio

GStreamer Terms

GStreamer:Basic#Terms 항목 참조.

Environment variables

  • export GST_PLUGIN_PATH=/usr/lib/gstreamer-0.10/ - gstreamer 라이브러리 및 plugin 설치한 위치
  • export GST_PLUGIN_SCANNER=/usr/libexec/gstreamer-0.10/gst-plugin-scanner - scanner 경로

gst-launch-1.0 examples

GStreamer:GstLaunch#Examples항목 참조.

RTP Metadata packet

Troubleshooting

gst/rtsp-server/rtsp-server.h: No such file or directory

/home/user/Project/jet/include/sink/rtsp_server_sink_bin.h:9:10: fatal error: gst/rtsp-server/rtsp-server.h: No such file or directory
    9 | #include <gst/rtsp-server/rtsp-server.h>

우분투에선 해당 패키지를 설치하면 된다.

sudo apt-get install libgstrtspserver-1.0-dev

External plugin loader failed

(answer-jet:19168): GStreamer-WARNING **: 06:28:23.547: External plugin loader failed. This most likely means that the plugin loader helper binary was not found or could not be run. You might need to set the GST_PLUGIN_SCANNER environment variable if your setup is unusual. This should normally not be required though.

한글 번역:

외부 플러그인 로더가 실패했습니다. 이는 플러그인 로더 헬퍼 바이너리를 찾을 수 없거나 실행할 수 없음을 의미할 가능성이 큽니다. 설정이 이상하다면 <code>GST_PLUGIN_SCANNER</code> 환경 변수를 설정해야 할 수도 있습니다. 하지만 일반적으로 필요하지 않습니다.

커스텀 플러그인 element 가 inspect 에서 검색되지 않는 현상

gst-inspect-1.0에서 Element 를 찾을 수 없다고 출력 된다. 대충 다음과 같이:

... No such element or plugin ...

컴파일이 완료되고 GST_PLUGIN_PATH 환경변수 설정도 완료했는데 위와 같은 에러가 출력될 수 있다.

이 때 LICENSE 를 확인해보자. "Proprietary" 라고 설정해야 한다.

#define LICENSE "Proprietary"

GST_ELEMENT_REGISTER_DEFINE macro error

얼추 다음의 위치에서 에러가 나면:

GST_ELEMENT_REGISTER_DEFINE(answerjet_relay, "answerjet_relay", GST_RANK_NONE,
        GST_TYPE_ANSWERJET_RELAY);

pkg-config를 사용하여 gstreamer 버전을 확인해 보자.

pkg-config --modversion gstreamer-1.0

만약 "1.20" 버전 보다 작다면 해당 매크로 지원인 안될 수 있다. 해당 매크로를 지우고, 플러그인 초기화 함수(대충 _init 함수)에서 GST_ELEMENT_REGISTER 매크로도 이전 버전에 맞게 수정해야 한다.

/**
 * entry point to initialize the plug-in
 * initialize the plug-in itself
 * register the element factories and other features
 */
static gboolean
answerjet_relay_init(GstPlugin * answerjet_relay)
{
    /* debug category for filtering log messages
     *
     * exchange the string 'Template answerjet_relay' with your description
     */
    GST_DEBUG_CATEGORY_INIT (gst_answerjet_relay_debug, "answerjet_relay",
            0, "Template answerjet_relay");

    return GST_ELEMENT_REGISTER (answerjet_relay, answerjet_relay);  // 이 부분을 수정해야 한다!
}

gstnvdsmeta.h: No such file or directory

/home/user/Project/jet/src/main.cpp:31:10: fatal error: gstnvdsmeta.h: No such file or directory
   31 | #include "gstnvdsmeta.h"

NVIDIA DeepStream SDK 를 설치하자.

Favorite site

Guide

Develop tutorials