(Gstreamer application development initial page creation) Β |
Β |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| class="wikitable" style="width:100%; background-color:#f0f0f0;" |
|||
|- |
|||
| '''Authors:''' |
|||
Sonni Lorenz F. Cubero (sonni.cubero@proventusnova.com) |
|||
CJ Mirafuentes (cj.mirafuentes@proventusnova.com) |
|||
|| '''Date:''' March 10, 2025 |
|||
|} |
|||
= GStreamer Application Development = |
= GStreamer Application Development = |
||
This page shows how to build gstreamer applications. |
This page shows how to build gstreamer applications. |
||
Line 14: | Line 22: | ||
The following must be present in the Linux system. |
The following must be present in the Linux system. |
||
=== Compiler === |
|||
<!-- |
|||
* GCC |
|||
Here, youβll find '''step-by-step tutorials, best practices, and deep technical insights''' to help you bring your projects to life. |
|||
* Clang |
|||
=== Package Manager === |
|||
Any one of the following will do: |
|||
* apt |
|||
* dnf |
|||
* snap |
|||
=== Linux Build Environment === |
|||
The Linux build environment was emulated using '''VMware Workstation 17 Pro''' with the following specifications: |
|||
{| class="wikitable" |
|||
| '''Operating System''': || Ubuntu 24.04.1 LTS |
|||
|- |
|||
| '''Processors''': || Number of processors: 4 |
|||
Number of cores per processor: 1 |
|||
|- |
|||
| '''Memory''': || 8GB |
|||
|- |
|||
| '''Storage''': || 30GB (Expandable) |
|||
|} |
|||
=== Installing on Ubuntu/Debian === |
|||
Run the following command: |
|||
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 |
|||
'''Note:''' Make sure you have root access to install. |
|||
=== Installing on Fedora === |
|||
Run the following command: |
|||
dnf install gstreamer1-devel gstreamer1-plugins-base-tools gstreamer1-doc gstreamer1-plugins-base-devel gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras |
|||
'''Note:''' Make sure you have root access to install. |
|||
=== Building a GStreamer Application === |
|||
Building GStreamer requires the gcc/clang compiler and a text editor. Run the following command to build an application using GStreamer: |
|||
gcc [filename].c -o [output_file] `pkg-config --cflags --libs gstreamer-1.0` |
|||
=== Running a GStreamer Application === |
|||
To run the application, simply run the following command: |
|||
./[application_name] |
|||
== Windows == |
|||
=== Prerequisites === |
|||
To develop applications using GStreamer for Windows, it is recommended to use Windows 10 or newer (Windows 7 or 8 is also supported), with Microsoft Visual Studio 2019 or newer. |
|||
Additionally, the runtime and development installers must be installed. |
|||
'''[https://gstreamer.freedesktop.org/download/#windows Download Gstreamer]''' |
|||
=== Installing on Windows === |
|||
Install the GStreamer Runtime and Development Installer. After installing GStreamer runtime and development, add its libraries and plugins to your environment variables. |
|||
Follow these steps to add them to your environment variables: |
|||
# Open Environment Variables. |
|||
# In System Variables, scroll down to the '''Path''' variable and click '''Edit'''. |
|||
# Click '''New'''. |
|||
# Add the locations for the '''\bin''', '''\lib''', '''\include''', and '''\gstreamer-1.0''' directories. |
|||
If you have the '''32-bit''' version installed, add the following paths to your System Variables: |
|||
*C:\gstreamer\1.0\msvc_x86\bin |
|||
*C:\gstreamer\1.0\msvc_x86\lib |
|||
*C:\gstreamer\1.0\msvc_x86\lib\gstreamer-1.0 |
|||
*C:\gstreamer\1.0\msvc_x86\include |
|||
If you have the '''64-bit''' version installed, add the following paths to your System Variables: |
|||
*C:\gstreamer\1.0\msvc_x86_64\bin |
|||
*C:\gstreamer\1.0\msvc_x86_64\lib |
|||
*C:\gstreamer\1.0\msvc_x86_64\lib\gstreamer-1.0 |
|||
*C:\gstreamer\1.0\msvc_x86_64\include |
|||
=== Building and Running a GStreamer Application === |
|||
This build was done with a 64-bit runtime and development GStreamer. |
|||
To build a GStreamer project, follow these steps: |
|||
1 .Open '''Visual Studio'''. |
|||
2. Click '''Create a new project'''. |
|||
3. Select either '''Empty Project''' or '''Console App'''. |
|||
.4 After selecting your project, set up the libraries and dependencies. |
|||
5. In '''Solution Explorer''', right-click on the project and select '''Properties'''. |
|||
6. Go to '''C/C++''' β '''General''' β '''Additional Include Directories''' β Click '''Edit''' and add the following paths: |
|||
C:\gstreamer\1.0\msvc_x86_64\include\glib-2.0 |
|||
C:\gstreamer\1.0\msvc_x86_64\include\gstreamer-1.0 |
|||
C:\gstreamer\1.0\msvc_x86_64\include\gstreamer-1.0\gst |
|||
C:\gstreamer\1.0\msvc_x86_64\include\glib-2.0\glib |
|||
C:\gstreamer\1.0\msvc_x86_64\lib\glib-2.0\include |
|||
C:\gstreamer\1.0\msvc_x86_64\include\glib-2.0\ |
|||
C:\gstreamer\1.0\msvc_x86_64\lib\gstreamer-1.0 |
|||
%(AdditionalIncludeDirectories) |
|||
'''Note:''' The directories may vary depending on where you installed the GStreamer runtime and development files. |
|||
7. Next, go to '''Linker''' β '''General''' β '''Additional Library Directories''' β Click '''Edit''' and add the following paths: |
|||
C:\gstreamer\1.0\msvc_x86_64\lib |
|||
C:\gstreamer\1.0\msvc_x86_64\lib\gstreamer-1.0 |
|||
C:\gstreamer\1.0\msvc_x86_64\bin |
|||
'''Note:''' The directories may vary depending on where you installed the GStreamer runtime and development files. |
|||
8. Next, go to '''Linker''' β '''Input''' β '''Additional Dependencies''' β Click '''Edit''' and add the following libraries: |
|||
gobject-2.0.lib |
|||
glib-2.0.lib |
|||
gstreamer-1.0.lib |
|||
kernel32.lib |
|||
user32.lib |
|||
gdi32.lib |
|||
winspool.lib |
|||
comdlg32.lib |
|||
advapi32.lib |
|||
shell32.lib |
|||
ole32.lib |
|||
oleaut32.lib |
|||
uuid.lib |
|||
odbc32.lib |
|||
odbccp32.lib |
|||
%(AdditionalDependencies) |
|||
'''Note:''' The directories may vary depending on where you installed the GStreamer runtime and development files. |
|||
9. After setting up the Libraries and Dependencies, its time to build the project. |
|||
== Gstreamer Linux application development == |
|||
* '''Hands-on Tutorials''' β Practical guides to get you started quickly. |
|||
* '''Industry Best Practices''' β Proven workflows and methodologies. |
|||
* '''Optimized Solutions''' β Performance tuning for embedded, AI, and multimedia applications. |
|||
* '''Open-Source Resources''' β Code samples, frameworks, and tools to accelerate development. |
|||
10. In the toolbar, select Debut, then select either x32 or x64, then click the play button. |
|||
Whether you're an individual developer, a startup, or an enterprise, youβll find resources here to '''enhance your expertise and improve your products'''. |
|||
--> |
|||
11. After clicking, the project should build and now you have your first Gstreamer Project! |
|||
<!-- |
|||
== π‘ Featured Tutorials == |
|||
π§ **[Building a Custom Linux OS with Yocto](Yocto-Project-Tutorial)** β Tailor an operating system for your hardware. |
|||
π€ **[Deploying AI for Real-Time Video Analytics](AI-Video-Analytics)** β Use machine learning for intelligent decision-making. |
|||
π₯ **[Optimizing GStreamer Pipelines](GStreamer-Optimization)** β Improve multimedia processing efficiency. |
|||
π **[Scaling Web Applications](Django-Web-Development)** β Design backends for performance and reliability. |
|||
--> |
|||
= References = |
|||
<!-- For more topics, explore the **[[Tutorials Index]]**. |
|||
* [https://gstreamer.freedesktop.org/documentation/application-development/introduction/gstreamer.html?gi-language=c GStreamer Introduction] |
|||
* [https://gstreamer.freedesktop.org/documentation/installing/building-from-source-using-meson.html?gi-language=c#basic-meson-and-ninja-usage Building GStreamer from Source (Meson & Ninja)] |
|||
* [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/README.md README.md - GStreamer GitLab] |
|||
* [https://developer.ridgerun.com/wiki/index.php/GStreamer_Daemon GStreamer Daemon - RidgeRun] |
|||
* [https://developer.ridgerun.com/wiki/index.php/GStreamer_Daemon_-_Building_GStreamer_Daemon Building GStreamer Daemon - RidgeRun] |
|||
* [https://developer.ridgerun.com/wiki/index.php?title=GstInterpipe GstInterpipe - RidgeRun Wiki] |
|||
* [https://stackoverflow.com/a/50756228 Stack Overflow Answer - GStreamer] |
|||
* [https://stackoverflow.com/a/73301549 Stack Overflow Answer - GStreamer] |
|||
= Frequently Asked Questions (FAQ) = |
|||
== βοΈ Technical Resources == |
|||
* [[Embedded Systems Development]] β BSPs, firmware, and real-time processing. |
|||
** [[Embedded Platforms]] |
|||
* [[AI & Computer Vision]] β Edge AI, model training, and deployment. |
|||
* [[GStreamer Development]] β High-performance video and audio streaming. |
|||
** [[GStreamer Daemon]] |
|||
** [[GStreamer Interpipes]] |
|||
** [[GStreamer Application Development]] |
|||
* [[Web & Cloud Solutions]] β Scalable, production-ready applications. |
|||
* What is GStreamer? |
|||
== π Need a Solution for Your Project? == |
|||
**GStreamer is an open-source multimedia framework used for creating media-handling components such as audio and video processing applications. It is widely used in media players, streaming applications, and multimedia frameworks. |
|||
Are you looking for ways to: |
|||
* How do I install GStreamer on Linux? |
|||
β
Optimize your '''embedded system''' for better performance? |
|||
**On Ubuntu/Debian, use the following command: |
|||
β
Integrate '''AI and computer vision''' into your products? |
|||
#Ubuntu |
|||
β
Improve '''multimedia processing''' for real-time applications? |
|||
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 |
|||
β
Develop a '''robust and scalable''' web platform? |
|||
#Debian |
|||
dnf install gstreamer1-devel gstreamer1-plugins-base-tools gstreamer1-doc gstreamer1-plugins-base-devel gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras |
|||
* How do I install GStreamer on Windows? |
|||
Our team has helped businesses across multiple industries solve these challenges. |
|||
**Download the GStreamer Runtime and Development Installer from the official website: [https://gstreamer.freedesktop.org/download/#windows GStreamer Download] |
|||
{{Footer}} |
|||
π© '''Letβs collaborate!''' Contact us at '''[support@proventusnova.com](mailto:support@proventusnova.com)''' or visit '''[ProventusNova.com](https://proventusnova.com)''' to discuss your project. --> |
Latest revision as of 02:05, 25 March 2025
Authors:
Sonni Lorenz F. Cubero (sonni.cubero@proventusnova.com) CJ Mirafuentes (cj.mirafuentes@proventusnova.com) |
Date: March 10, 2025 |
GStreamer Application Development
This page shows how to build gstreamer applications. Gstreamer applications can be built on the following platforms:
- Linux
- Windows
- Android
- iOS
- macOS
Linux
Gstreamer is included in all Linux distributions. We recommend using the latest version of a fast-moving distribution such as Fedora, Ubuntu (non-LTS), Debian or OpenSuse to get a recentg Gstreamer release.
Prerequisites
The following must be present in the Linux system.
Compiler
- GCC
- Clang
Package Manager
Any one of the following will do:
- apt
- dnf
- snap
Linux Build Environment
The Linux build environment was emulated using VMware Workstation 17 Pro with the following specifications:
Operating System: | Ubuntu 24.04.1 LTS |
Processors: | Number of processors: 4
Number of cores per processor: 1 |
Memory: | 8GB |
Storage: | 30GB (Expandable) |
Installing on Ubuntu/Debian
Run the following command:
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
Note: Make sure you have root access to install.
Installing on Fedora
Run the following command:
dnf install gstreamer1-devel gstreamer1-plugins-base-tools gstreamer1-doc gstreamer1-plugins-base-devel gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras
Note: Make sure you have root access to install.
Building a GStreamer Application
Building GStreamer requires the gcc/clang compiler and a text editor. Run the following command to build an application using GStreamer:
gcc [filename].c -o [output_file] `pkg-config --cflags --libs gstreamer-1.0`
Running a GStreamer Application
To run the application, simply run the following command:
./[application_name]
Windows
Prerequisites
To develop applications using GStreamer for Windows, it is recommended to use Windows 10 or newer (Windows 7 or 8 is also supported), with Microsoft Visual Studio 2019 or newer.
Additionally, the runtime and development installers must be installed. Download Gstreamer
Installing on Windows
Install the GStreamer Runtime and Development Installer. After installing GStreamer runtime and development, add its libraries and plugins to your environment variables.
Follow these steps to add them to your environment variables:
- Open Environment Variables.
- In System Variables, scroll down to the Path variable and click Edit.
- Click New.
- Add the locations for the \bin, \lib, \include, and \gstreamer-1.0 directories.
If you have the 32-bit version installed, add the following paths to your System Variables:
- C:\gstreamer\1.0\msvc_x86\bin
- C:\gstreamer\1.0\msvc_x86\lib
- C:\gstreamer\1.0\msvc_x86\lib\gstreamer-1.0
- C:\gstreamer\1.0\msvc_x86\include
If you have the 64-bit version installed, add the following paths to your System Variables:
- C:\gstreamer\1.0\msvc_x86_64\bin
- C:\gstreamer\1.0\msvc_x86_64\lib
- C:\gstreamer\1.0\msvc_x86_64\lib\gstreamer-1.0
- C:\gstreamer\1.0\msvc_x86_64\include
Building and Running a GStreamer Application
This build was done with a 64-bit runtime and development GStreamer.
To build a GStreamer project, follow these steps:
1 .Open Visual Studio.
2. Click Create a new project.
3. Select either Empty Project or Console App.
.4 After selecting your project, set up the libraries and dependencies.
5. In Solution Explorer, right-click on the project and select Properties.
6. Go to C/C++ β General β Additional Include Directories β Click Edit and add the following paths:
C:\gstreamer\1.0\msvc_x86_64\include\glib-2.0 C:\gstreamer\1.0\msvc_x86_64\include\gstreamer-1.0 C:\gstreamer\1.0\msvc_x86_64\include\gstreamer-1.0\gst C:\gstreamer\1.0\msvc_x86_64\include\glib-2.0\glib C:\gstreamer\1.0\msvc_x86_64\lib\glib-2.0\include C:\gstreamer\1.0\msvc_x86_64\include\glib-2.0\ C:\gstreamer\1.0\msvc_x86_64\lib\gstreamer-1.0 %(AdditionalIncludeDirectories)
Note: The directories may vary depending on where you installed the GStreamer runtime and development files.
7. Next, go to Linker β General β Additional Library Directories β Click Edit and add the following paths:
C:\gstreamer\1.0\msvc_x86_64\lib C:\gstreamer\1.0\msvc_x86_64\lib\gstreamer-1.0 C:\gstreamer\1.0\msvc_x86_64\bin
Note: The directories may vary depending on where you installed the GStreamer runtime and development files.
8. Next, go to Linker β Input β Additional Dependencies β Click Edit and add the following libraries:
gobject-2.0.lib glib-2.0.lib gstreamer-1.0.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib %(AdditionalDependencies)
Note: The directories may vary depending on where you installed the GStreamer runtime and development files.
9. After setting up the Libraries and Dependencies, its time to build the project.
10. In the toolbar, select Debut, then select either x32 or x64, then click the play button.
11. After clicking, the project should build and now you have your first Gstreamer Project!
References
- GStreamer Introduction
- Building GStreamer from Source (Meson & Ninja)
- README.md - GStreamer GitLab
- GStreamer Daemon - RidgeRun
- Building GStreamer Daemon - RidgeRun
- GstInterpipe - RidgeRun Wiki
- Stack Overflow Answer - GStreamer
- Stack Overflow Answer - GStreamer
Frequently Asked Questions (FAQ)
- What is GStreamer?
- GStreamer is an open-source multimedia framework used for creating media-handling components such as audio and video processing applications. It is widely used in media players, streaming applications, and multimedia frameworks.
- How do I install GStreamer on Linux?
- On Ubuntu/Debian, use the following command:
#Ubuntu 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 #Debian dnf install gstreamer1-devel gstreamer1-plugins-base-tools gstreamer1-doc gstreamer1-plugins-base-devel gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras
- How do I install GStreamer on Windows?
- Download the GStreamer Runtime and Development Installer from the official website: GStreamer Download
Need Further Support?
π Book Consultation Call: Show Calendar!
π© Contact Via Email: support@proventusnova.com
π Visit Our Website: ProventusNova.com