Update Ubuntu Gstreamer to the target Update Ubuntu GStreamer to the specified version:
1. Enter root user
...
4. Setting up compile environment:
Code Block |
---|
apt update
apt install -y build-essential meson ninja-build python3-pip bison libglib2.0-dev flex
pip3 install --upgrade meson |
...
5. Install GStreamer:
Insert an SD card or disk as a build directory, for example:
extern packages:
Code Block |
---|
apt install -y libopus-dev libasound2-dev libopenh264-dev libx264-dev libjpeg-dev libmp3lame-dev libfdk-aac-dev |
For glimagesink on Ubuntu mate:
Code Block |
---|
apt install -y libx11-dev libgl-dev libx11-xcb-dev |
6. Build and install GStreamer:
Get the GStreamer package and build(Take version 1.20.1 for example):
Code Block |
---|
wget https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.1.tar.xz tar -xf gstreamer-1.20.1.tar.xz cd gstreamer-1.20.1 meson build --prefix=/usr ninja -C build ninja -C build install |
6 7. Check
gst-inspect-1.0 --version
...
7 8. Install other package packages as step 5, path:
https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.1.tar.xz
https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.1.tar.xz
https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.1.tar.xz
https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.1.tar.xz
8 9. Running test cmdTest:
gst-launch-1.0 -v videotestsrc ! timeoverlay ! x264enc ! mp4mux ! filesink location=test.mp4
...
10. Hardware video codec support:
The C3V platform has hardware video codecs and provides a V4L2 framework. It currently supports GStreamer 1.20.1, 1.22.9, and 1.24.2:
For Ubuntu 20.04 and Ubuntu 22.04, we recommend using version 1.22.9, which is the same as the version that Buildroot 2024.02 used default. It’s newer than the default versions of Ubuntu 20.04 and Ubuntu 22.04. And its patches can be found in the path: <C3V_code>/linux/rootfs/initramfs/buildroot/package/gstreamer1/gst1-plugins-good
Or you can just use the following:
View file | ||
---|---|---|
|
For Ubuntu 24.04, we recommend using version 1.24.2, which is the same as the version of Ubuntu 24.04 used default.
View file | ||
---|---|---|
|
To use version 1.20.1, please use the following patch:
View file | ||
---|---|---|
|
This patch is older than other GStreamer patches and may have some bugs, if you really need to use this version, please contact us to update it.
Reference
Compile and install GStreamer 1.22.9 for C3V codec in C3V Ubuntu environment