GStreamer

Differences between revisions 4 and 5
Revision 4 as of 2025-09-03 12:54:06
Size: 5211
Editor: charles05
Comment:
Revision 5 as of 2025-09-07 23:13:17
Size: 5448
Editor: charles05
Comment:
Deletions are marked like this. Additions are marked like this.
Line 125: Line 125:

== Integrations ==

Check the `gst-launch-1.0` command lines printed by,

{{{
gst-device-monitor-1.0 Video/Source
}}}

And ensure they all work as expected.

Do the same for,

{{{
gst-device-monitor-1.0 Audio/Source
}}}

Test Plan for GStreamer

Video Codecs

Find/utilize some test content for each codec. Fluster is one reliable source of test content. The more the better. Running thumbnailing software is often a quick check.

For each file, play it with the default media player and ensure it looks "ok". Also play it with GST_DEBUG=*:1 gst-play-1.0 and ensure nothing bad happens.

Some codecs will require modifications to a clean install. Such cases will be highlighted below.

Hardware configuration entails the set of tests to perform. Decide now if you are on testing Intel, AMD, NVIDIA.

VP8

Try vp8_variable_resolution.webm

This is a very weird file, but it should play for a few seconds, and show frames of varying resolutions. There should be a women with slider bars next to her visible.

As a royalty free codec, VP8 test files should play on a fresh installation.

AV1

At the time of writing, AV1 decoders are still being shipped only in the -bad plugin set. This should be fixed since there's no reason not to support AV1 out of the box.

Open Schiddler7.mkv-aom-q-28-1920-1080-P3.mkv in the default media player and ensure the codec installation wizard works, and that subsequently the media plays properly.

Rationale: AV1 aligns well with Ubuntu philosophy, we should support that as standard. The input files cover the majority of AV1 coding tools, especially film grain. Decoder see (see Fluster below) cover more.

H.264

Open Big_Buck_Bunny_720_10s_30MB.mp4 in the default media player and ensure the codec installation wizard works, and that subsequently the media plays properly.

- Ensure the files plays out correctly for the 10 seconds - Run whatever is the default media player from the CLI. Ensure no

  • warnings / errors are printed

Rationale: H.264 is ubiquitous. It must be default available or very easily installable for UX.

See: https://bugs.launchpad.net/ubuntu/+source/totem/+bug/2121434

H.265

Open 4K HEVC 59.940 Broadcast Capture Sample.mkv in the default media player and ensure the codec installation wizard works, and that subsequently the media plays properly.

Rationale: H.265 is also very popular, but very patent encumbered.

Hardware acceleration

Intel/AMD,

gst-launch-1.0 filesrc location=h264_high_yuv420p_720p.mp4 ! qtdemux ! h264parse ! vah264dec ! videoconvert ! autovideosink

gst-launch-1.0 filesrc location='4K HEVC 59.940 Broadcast Capture Sample.mkv' ! matroskademux ! h265parse ! vah265dec ! videoconvert ! autovideosink

NVIDIA,

gst-launch-1.0 filesrc location='4K HEVC 59.940 Broadcast Capture Sample.mkv' ! matroskademux ! h265parse ! vdpauh265dec ! vdpauvideopostprocess ! autovideosink

Intel,

gst-launch-1.0 filesrc location=h265_Main10_yuv420p10le_4K.mkv ! matroskademux ! h265parse ! msdkh265dec ! videoconvert ! autovideosink

TODO: Vulkan

Fluster

Fluster is a decoder conformance test-suite. At the time of writing, the full test database requires 14GB of space and takes many hours to run. Due to driver instability, there will also be many crashes, meaning automation is very challenging.

Instead, a cut-down version of the test-suite is prepared. Run the following script and ensure nothing catches fire.

https://wiki.ubuntu.com/DesktopTeam/TestPlans/GStreamer?action=AttachFile&do=view&target=run_fluster.sh

Audio codecs

Pipewire is the default sound sever at the time of writing, but most applications still use the old Pulse API's, so make sure that works to some approximation.

First, find your input device. In the instructions it happens to be alsa_card.usb-0c76_USB_PnP_Audio_Device-00. A list of device can be seen with pactl list.

gst-launch-1.0 -e pulsesrc device=alsa_card.usb-0c76_USB_PnP_Audio_Device-00 ! queue ! audioconvert ! audioresample !  opusenc audio-type=voice ! oggmux ! filesink location=test.ogg

Open test.ogg and check you can clearly hear the sounds you made.

Now do the same wit the FFmpeg AAC coder. You will need gstreamer1.0-libav,

gst-launch-1.0 -e pulsesrc device=alsa_card.usb-0c76_USB_PnP_Audio_Device-00 ! queue ! audioconvert ! audioresample ! avenc_aac aac-coder=fast ! avmux_mp4 ! filesink location=test.mp4

Open test.mp4 and check you can clearly hear the sounds you made.

Check Pipewire. Use gst-device-monitor-1.0 Audio/Source to find your target-object. In the examples mine is 66.

gst-launch-1.0 -e pipewiresrc target-object=66  ! queue ! audioconvert ! audioresample !  opusenc audio-type=voice ! oggmux ! filesink location=test.ogg

Open test.ogg and check you can clearly hear the sounds you made.

Development libraries

Ensure a few packages that use GStreamer can build from source, and that there's no issues installing the GStreamer binary packages for development.

GNOME Snapshot,

git clone https://salsa.debian.org/ubuntu-dev-team/snapshot.git
cd snapshot
sudo apt build-dep .
dpkg-buildpackage -us -uc
./debian/gnome-snapshot/usr/bin/snapshot

Check the camera is working. Check you can record etc.

Integrations

Check the gst-launch-1.0 command lines printed by,

gst-device-monitor-1.0 Video/Source

And ensure they all work as expected.

Do the same for,

gst-device-monitor-1.0 Audio/Source

DesktopTeam/TestPlans/GStreamer (last edited 2025-11-06 14:35:17 by jbicha)