No audio during preview... sdl2 failed to open media

Hi guys,

I’ve installed a fresh centos 7 and looking for a video edit app, and find Shotcut. I liked the interface and decided to use it.

But whatever i did i can’t get a sound on preview. Terminal says:

[Info ] Failed to open audio device: No such audio device
[Info ] [sdl2] Try alternative driver: dsp
[Info ] [sdl2] Open failed: No such audio device
[Error ] [consumer sdl2_audio] SDL failed to open audio

when trying to play timeline.

I couldn’t find any preferences dialog i can choose correct device. Is there any?

sdl2 i think automatically sets card 0: which is NVIDIA HDA
I want to use card 1 which is scarlet 2i2 usb

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: USB [Scarlett 2i2 USB], device 0: USB Audio [USB Audio]
** Subdevices: 1/1**
** Subdevice #0: subdevice #0**

I can get system sounds.

JACK connection not working anyway.
Even if i don’t know what jack is,I’ve installed JACK libraries but if i try to enable it says:

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jackdmp 1.9.9.5
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
Cannot create thread 1 Operation not permitted
Cannot create thread 1 Operation not permitted
Could not open component .so '/usr/lib64/jack/jack_netone.so': /usr/lib64/jack/jack_netone.so: undefined symbol: opus_custom_mode_create
Could not open component .so '/usr/lib64/jack/jack_netone.so': /usr/lib64/jack/jack_netone.so: undefined symbol: opus_custom_mode_create
jack_get_descriptor : dll jack_netone.so is not a driver
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
[Error  ] <MLT> Failed to connect to JACK server

If i export timeline i can hear the sound.

Any suggestions?

Thanks.

This is not configurable. It is not supposed to be configured in the app but instead the OS. You are running a server OS whereas desktop Linux ala Fedora has moved to PulseAudio to make things easier and configurable globally.

If you are not using PulseAudio and going directly to ALSA, you need to use a SDL environment variable. Try export AUDIODEV={name of ALSA pcm}

JACK requires configuration and running a daemon.

Thank yout @shotcut

It is really interesting but i’ve noticed that i’ve thought that installed sdl2,
I’ve checked out installation with:

sudo yum list installed | grep SDL

it returned:

SDL.x86_64                             1.2.15-14.el7                 @base      
SDL_image.x86_64                       1.2.12-11.el7                 @epel 

So sld2 was missing. It wasn’t installed via downloaded installer package.

So I installed sdl2 with:

sudo yum install SDL2

Now i can see:

SDL.x86_64                             1.2.15-14.el7                 @base      
SDL2.x86_64                            2.0.8-5.el7                   @epel      
SDL_image.x86_64                       1.2.12-11.el7                 @epel 

And now i can hear sound.

Have a nice day!

I will probably look at the drivers.

[Info ] Failed to open audio device: No such audio device
[Info ] [sdl2] Try alternative driver: dsp
[Info ] [sdl2] Open failed: No such audio device
[Error ] [consumer sdl2_audio] SDL failed to open audio

In this case you must think of checking the audio drivers.
Guide: https://www.hows.tech/2019/05/how-to-scan-computer-for-missing-drivers-windows.html

This info-graphics adds value here.