Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introductory

Currently, the C3V Ubuntu rootfs includes has included the GStreamer 1.22.9 prebuild by default. It carries most of the commonly used elements and hardware media codec functions. Users can use gst-inspect-1.0 to check the installed elements directly. If you don’t want to use it, you can disable the install in the file <C3V_PRJ>/linux/rootfs/initramfs/build_disk.sh before running make config.

...

If successful, the screen can be viewed with the RTSP tool with the address rtsp://x.x.x.x:8554/test. Of course, this test need network supportThe x.x.x.x is the IP address of your C3V board.

If your C3V system doesn’t have the GStreamer or you feel that the provided GStreamer does not meet your needs, you can recompile one of the plugins or the entire GStreamer as below.

...

Compile and install Gstreamer to the target version 1.22.9 with C3V Codec supported:

1 . Install the building package

Code Block
sudo apt update
sudo apt install -y build-essential meson ninja-build python3-pip bison libglib2.0-dev flex git
sudo apt install -y libx264-dev
sudo apt install --reinstall libx11-dev libxext-dev libxrender-dev libxv-dev libxrandr-dev libxi-dev
pip3 install --upgrade meson
sudo pip3 install --upgrade meson

2 . Build Gstreamer GStreamer and install it:

Gst source and check out to be version 1.22.9

...

Patch files are below. Please download files and copy files to the root ~/code folder in C3V rootfs.

...

Code Block
7z x gstreamer-1.22.9-patch.7z
Info

The patch package in this document may not be up to date, if you are using the latest code of C3V, you can get the latest patch directly in the subdirectories of the code directory <C3V_PRJ>/linux/rootfs/initramfs/buildroot/package/gstreamer1 directly.

Apply patch

Code Block
cp ~/code/gstreamer1/gst1-plugins-bad/0001-h264-parser-pts-add.patch ~/code/gstreamer/subprojects/gst-plugins-bad/
cp ~/code/gstreamer1/gst1-plugins-bad/0001-webrtcdsp-Update-code-for-webrtc-audio-processing-1.patch ~/code/gstreamer/subprojects/gst-plugins-bad/
cd ~/code/gstreamer/subprojects/gst-plugins-bad
patch -p1 < 0001-h264-parser-pts-add.patch
patch -p1 < 0001-webrtcdsp-Update-code-for-webrtc-audio-processing-1.patch

cp ~/code/gstreamer1/gst1-plugins-good/0001-v4l2-codec-support.patch ~/code/gstreamer/subprojects/gst-plugins-good/
cp ~/code/gstreamer1/gst1-plugins-good/0002-support-jpeg-dec-4k.patch ~/code/gstreamer/subprojects/gst-plugins-good/
cp ~/code/gstreamer1/gst1-plugins-good/0003-fixed-get-v4l2-codec-failed.patch ~/code/gstreamer/subprojects/gst-plugins-good/
cd ~/code/gstreamer/subprojects/gst-plugins-good
patch -p1 < 0001-v4l2-codec-support.patch
patch -p1 < 0002-support-jpeg-dec-4k.patch
patch -p1 < 0003-fixed-get-v4l2-codec-failed.patch

...