Skip to main content
Senior
Oct 15, 2026 6:35 PM UTC
Question

GStreamer - Play video works, but no sound?

Hi!

I’m using this comman

gst-launch-1.0 -v  filesrc location=bbb.mp4 !  qtdemux ! h264parse !  v4l2slh264dec !   waylandsink fullscreen=true

To play video in 1080p without lagging. But this comes without sound.

How can I play sound with gst-launch-1.0?

I can only play sound with “aplay /path/to/file.wav”.

5 replies

WindowsAuthor
Senior
Oct 15, 2026 7:49 PM UTC

Here is one solution to play videos and sound at the same time e.g mp4 file. The question is now: Can this command to play videos with sound be shorten any further?

gst-launch-1.0 -e \
filesrc location=bbb.mp4 ! qtdemux name=d \
d.video_0 ! queue ! h264parse ! v4l2slh264dec ! waylandsink fullscreen=true \
d.audio_0 ! queue ! decodebin ! audioconvert ! \
audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! \
alsasink device=playback_hdmi

 

Jean-Christophe_TROTIN
ST Employee
Oct 16, 2026 6:54 AM UTC

Hi,

 

As explained in https://wiki.st.com/stm32mpu/wiki/How_to_play_a_video_with_the_hardware_video_decoder, you can try to use the gst-play high level utility: the hardware-accelerated video decoder shall be automatically selected for its performances. With this utility, the command is obviously shorter, but the “control” on the different elements of the GStreamer pipeline is no more possible.

Otherwise, I don’t see how to remove any element of your GStreamer pipeline that looks good to me.

 

Hope this information helps.

Regards,

JC.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
WindowsAuthor
Senior
Oct 16, 2026 8:01 AM UTC

Thank you ​@Jean-Christophe_TROTIN 

I will try that within 3 hours and giving you a reply of the result.