No sound when playing audio with gst-play-1.0

I have a Jetson Nano Developer Kit running the pre-built ubuntu image. When playing video or audio with totem player from GUI or command line, I can hear sound from the HDMI monitor. But when I play anything (wav, mp3, mp4) from command line with gst-play-1.0 or gst-launch-1.0, there is no sound, although everything looks fine in the command line.

$ DISPLAY=:0 totem audiofile.wav
$
$ DISPLAY=:0 gst-play-1.0 audiofile.wav
Press 'k' to see a list of keyboard shortcuts.
Now playing /tmp/audiofile.wav
Redistribute latency...
0:01:32.5 / 0:01:32.5
Reached end of play list.

The attachments are the diagrams of gstreamer pipelines from totem and gst-play-1.0. I couldn’t find any essential difference between them.

I found this post https://devtalk.nvidia.com/default/topic/1049272/jetson-nano/jetson-nano-no-sound-output/
But I believe it’s different from mine, because I can hear sound when using totem.

Thanks.


Hi Harry16,

Have you checked the from Audio Troubleshooting section from L4T doc?See:https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fasoc_driver.17.2.html%23wwpID0E0VD0HA

It’s a great document with a lot of useful information. Unfortunately none of the toubleshooting part seems to be able to explain why one software can produce sound while another can’t.

Thank you, anyway. Happy new year.

Hi,
You can run ‘aplay -l’ to list all audio output device, and configure it to audiosink:

$ gst-play-1.0 file:///home/nvidia/test_stereo_44100Hz_16bit_PCM.wav <b>--audiosink='alsasink device=hw:0,3'</b>

It works for me. Thank you so much for your help.