openshot-qt icon indicating copy to clipboard operation
openshot-qt copied to clipboard

WARNING preview_thread: Audio initialization error: no channels

Open mSparks43 opened this issue 1 year ago • 14 comments

Describe the bug: A clear and concise description of what the bug is.

Steps to reproduce the behavior: ./OpenShot-v3.2.0-x86_64.AppImage get "no channels" error change any audio device, restart any change results in WARNING preview_thread: Audio initialization error: no channels WARNING preview_thread: Your (changed preference) does not match OpenShot (44100). Adjusting your 'Preferences->Preview->Default Sample Rate to match your (non working preference).

Expected behavior: preview audio works

System Details:

  • OpenShot Version3.2.0-x86_64.AppImage
  • Operating System / Distro: FC39

Screenshots: (Optional) image

mSparks43 avatar Jun 25 '24 06:06 mSparks43

Please download v3.2.1 AppImage and try again.

Colorjet3 avatar Jul 12 '24 14:07 Colorjet3

I have the exact same issue, the relevant log line is

WARNING preview_thread: Your active audio device (sof-hda-dsp; USB Stream Output||ALSA)
 does not match OpenShot (PulseAudio Sound Server||ALSA). 
Adjusting your 'Preferences->Playback->Audio Device' to match your active audio 
device: sof-hda-dsp; USB Stream Output||ALSA

I don't quite understand why openshot reverts to the sof-hda-dsp device. Would it crash if it tried to use the device I intended it to use (any "pulseaudio" option in the combobox)?

In my case, I tried both the 3.2.1 AppImage and the one currently available in guix (3.1.1). I have also deleted the ~/.openshot_qt config folder as suggested in other threads. Any pointers?

igoralmeida avatar Aug 10 '24 20:08 igoralmeida

I have assigned this to the lead developer for his review. Meanwhile please give these a try:

  1. Change the Default Sample Rate in OpenShot to be 44100 or 48000 and restart openshot. If it reverts to 22050 the you may have headphones plugged in which OpenShot struggles with. Unplug your headphones, restart your computer and try OpenShot again.
  2. Another option is to change the default audio sample rate of your output device in your Linux environment. I am a novice Linux user and don't have an environment to test in but in Windows 11 Pro environment I can go to Control Panel | Sound, find my default audio device and change the sample rate.

After you do this in your Linux environment. I suggest you restart your computer, ensure your audio is working outside of OpenShot. Then start OpenShot and test the audio.

Colorjet3 avatar Aug 11 '24 02:08 Colorjet3

Hi, thanks for the response.

re: changing the openshot config:

WARNING preview_thread: Audio initialization error: no channels
WARNING preview_thread: Your sample rate (22050) does not match OpenShot (44100). Adjusting your 'Preferences->Preview->Default Sample Rate to match your system rate: 22050.

I don't have any headphones plugged in, and the same thing happens if I use 48000.

re: changing the default audio sample rate: I don't see the value 22050 anywhere in pacmd list-sources. I do see the others:

$ pacmd list-sources | grep sample
	sample spec: s16le 2ch 44100Hz
	sample spec: s16le 2ch 44100Hz
	sample spec: s16le 2ch 44100Hz
	sample spec: s16le 2ch 48000Hz
	sample spec: s16le 2ch 48000Hz
	sample spec: s32le 2ch 48000Hz

I also see mentions of 48000 in alsactl dump-cfg, but nothing in alsactl dump-state. I believe openshot is bypassing pulseaudio, then? Where is it fetching the 22050 value from? Anywhere else I could check?

Cheers

igoralmeida avatar Aug 18 '24 00:08 igoralmeida

From the image you provided I see that OpenShot has set the Default Audio Sample Rate to 22050.

  1. Make a note of your Linux environment default audio sample rate.
  2. Start OpenShot and see if Default Audio Sample Rate match it to your operating system audio sample rate.
  3. Restart OpenShot confirm that they sample rates still match.

Did this resolve the issue?

Colorjet3 avatar Aug 18 '24 00:08 Colorjet3

No, changing the default in openshot to 22050 just makes it stop complaining about the sample rate, it still gives me the "no channels" popup error.

igoralmeida avatar Aug 18 '24 00:08 igoralmeida

Then may be experiment with selecting one of the other Playback Audio Device in OpenShot (the list you have shared with us). Each time you change you need to restart OpenShot.

This should help the lead developer as well. I will not be able to respond anymore as I am traveling. I'll check back when I return. Hopefully the lead developer or someone else can chime in.

Colorjet3 avatar Aug 18 '24 17:08 Colorjet3

That's what I mentioned in the initial post though https://github.com/OpenShot/openshot-qt/issues/5547#issuecomment-2282266594

It just always reverts to the sof-hda-dsp device.

igoralmeida avatar Aug 18 '24 20:08 igoralmeida

did you solve @igoralmeida ? I have the same issue with the same audio device on a thinkpad x1

vitotafuni avatar Jan 20 '25 21:01 vitotafuni

Hello @vitotafuni

  1. Please confirm the operating system/version you are running?
  2. Please confirm OpenShot version you are running?
  3. Are you running the AppImage or PPA?
  4. Have you tried OpenShot v3.3.0? If not, close OpenShot if running, delete /home/username/.openshot_qt folder, now run OpenShot v3.3.0 AppImage.

Colorjet3 avatar Jan 21 '25 13:01 Colorjet3