Build and install specified GStreamer on the Ubuntu
Update Ubuntu GStreamer to the specified version:
1. Enter root user
sudo -s
2. Connect the internet
Connect the network cable and make sure the network is unobstructed.
If no IP, please run dhclient -i eth0
.
3. Check the internet:
4. Setting up compile environment:
apt update
apt install -y build-essential meson ninja-build python3-pip bison libglib2.0-dev flex libx264-dev
pip3 install --upgrade meson
5. Install extern packages:
apt install -y libopus-dev libasound2-dev libopenh264-dev libx264-dev libjpeg-dev libmp3lame-dev
6. Build and install GStreamer:
Get the GStreamer package and build(Take version 1.20.1 for example):
7. Check
gst-inspect-1.0 --version
8. Install other 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
9. Test:
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 interface. 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 24 used default. It’s newer than the default versions of Ubuntu 20.04 and Ubuntu 22.04. And its patch can be found in the code path: <C3V_code>/linux/rootfs/initramfs/buildroot/package/gstreamer1.
For Ubuntu 24.04, we recommend using version 1.24.2, which is the same as the version of Ubuntu 24.04 used default.
To use version 1.20.1, please use the following patch:
.
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