Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


cannot play ogg over bluetooth
#1
Moode Version: 7.4.1 (fresh install today)
Computer: Raspberry Pi Zero-W
Local DAC: Adafruit I2S Audio Bonnet
Bluetooth Speaker: JBL Flip 4
Alternate Bluetooth Receiver: TaoTronics TT-BA07

I cannot play Ogg Vorbis files over a connected bluetooth speaker, but I can play MP3 and FLAC.

Detailed description:
I have three test audio files: FLAC, MP3, OGG VORBIS. 

I can play all three locally through the Adafruit I2S Audio Bonnet, so I know that all three are valid audio files.

I can play the FLAC and MP3 through my bluetooth speaker, so I know that the signal chain is good.

When I select the OGG VORBIS file, I expect it to play just like the MP3 and FLAC. However, I get no sound and this error pops up:
```
MPD error
Failed to open "ALSA Bluetooth" (alsa); Error opening ALSA device "_audioout"; snd_pcm_hw_params() failed: Invalid argument
```

I have tried this on a fresh Moode install (prior to installing and configuring the I2S Bonnet), and I get the same results, so I don't think that configuration is causing any problems.

I know that I could transcode every ogg formatted file to mp3, but that's a clumsy work-around.

I'm not sure where to start debugging this. Do I need to rebuild the bluealsa with ogg vorbis support? Is that even the right place to start looking?
Reply
#2
Turn on verbose logging in MPD Config, play an ogg file and then post the section in the log where the ogg file is processed.

Code:
cat /var/log/mpd/log
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
@pbarsic

I just downloaded some rando .ogg sample file I found on the InterWeb™
(https://filesamples.com/samples/audio/og...ement).ogg)

I'm listening to it right now via Bluetooth to my JBL Flip 2 speaker.

RPi4B
moOde 7.4.1

Audio Info reports

Code:
INPUT / OUTPUT
Source          SDCARD/OggTest/Symphony No.6 (1st movement).ogg
Encoded at      f bit, 44.1 kHz, Stereo Vorbis
Decoded to      24 bit, 44.1 kHz, Stereo,
Output rate     16 bit, 44.1 kHz, Stereo, 1.411 Mbps
Output mode     ALSA Default (plughw)
Output chain    MPD -> Bluetooth stream -> Bluetooth speaker


Perhaps you should examine your .ogg files. What does the mediainfo utility report? For my sample file

Code:
pi@rpi4b2:/mnt/SDCARD/OggTest $ mediainfo 'Symphony No.6 (1st movement).ogg'
General
Complete name                            : Symphony No.6 (1st movement).ogg
Format                                   : Ogg
File size                                : 9.43 MiB
Duration                                 : 12 min 8 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 109 kb/s
Album                                    : www.mfiles.co.uk
Track name                               : Symphony No.6 (1st movement)
Performer                                : Ludwig van Beethoven
Genre                                    : Classical
Description                              : © Music Files Ltd
Writing application                      : Lavc57.107.100 libvorbis

Audio
ID                                       : 1326227477 (0x4F0CA015)
Format                                   : Vorbis
Format settings, Floor                   : 1
Duration                                 : 12 min 8 s
Bit rate mode                            : Variable
Bit rate                                 : 112 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 kHz
Compression mode                         : Lossy
Stream size                              : 9.72 MiB
Writing library                          : Lavf57.83.100


Regards,
Kent
Reply
#4
@Tim Curtis

Note the funny 'Encoded at f bit' in the Audio Info response I posted above. I haven't noticed that for other encodings.

Regards,
Kent
Reply
#5
Lossy formats are a strange thing. Theres no concept of bit depth in a lossy compressed file.

If you do commands below you should see an 'f' in the Format: field. This means "no bit depth". You will also notice that  mediainfo on the file does not report a bit depth.

Code:
telnet localist 6600
lsinfo "PATH_TO_FILE_RELATIVE_TO_MPD_MUSIC_ROOT"

IIRC the test ogg files I had would play but they spammed the MPD log with lots of weird errors. It's not surprising that MPD barfs when trying to output the decoded file over a Bluetooth connection.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
(10-03-2021, 12:27 AM)Tim Curtis Wrote: Turn on verbose logging in MPD Config, play an ogg file and then post the section in the log where the ogg file is processed.

Code:
cat /var/log/mpd/log

Hi Tim,

Thanks for your response.

Here is the output:

Code:
Oct 02 21:05 : exception: Failed to open "ALSA Bluetooth" (alsa); Error opening ALSA device "_audioout"; snd_pcm_hw_params() failed: Invalid argument
Oct 02 21:05 : exception: Failed to open "ALSA Bluetooth" (alsa); Error opening ALSA device "_audioout"; snd_pcm_hw_params() failed: Invalid argument
Oct 02 21:05 : player: problems opening audio device while playing "SDCARD/Music/The_Meters/The_Very_Best_of_the_Meters/01_-_Cissy_Strut.ogg"
Reply
#7
Hi Kent,


I've pasted the mediainfo output below. It looks quite similar to your random ogg.

You mentioned audio info. Where did you find that information?

Best,
Paul

Code:
$ mediainfo /mnt/SDCARD/Music/The_Meters/The_Very_Best_of_the_Meters/01_-_Cissy_Strut.ogg
General
Complete name                            : /mnt/SDCARD/Music/The_Meters/The_Very_Best_of_the_Meters/01_-_Cissy_Strut.ogg
Format                                   : Ogg
File size                                : 2.49 MiB
Duration                                 : 3 min 5 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 112 kb/s
Album                                    : The Very Best of the Meters
Track name                               : Cissy Strut
Track name/Position                      : 1
Track name/Total                         : 16
Performer                                : The Meters
Genre                                    : Funk
Recorded date                            : 1970-01-01
ARTISTSORT                               : Meters, The

Audio
ID                                       : 1596890505 (0x5F2E9D89)
Format                                   : Vorbis
Format settings, Floor                   : 1
Duration                                 : 3 min 5 s
Bit rate mode                            : Variable
Bit rate                                 : 112 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 kHz
Compression mode                         : Lossy
Stream size                              : 2.48 MiB (100%)
Writing library                          : libVorbis (Everywhere) (20100325 (Everywhere))
Reply
#8
(10-03-2021, 01:05 AM)Tim Curtis Wrote: Lossy formats are a strange thing. Theres no concept of bit depth in a lossy compressed file.

If you do commands below you should see an 'f' in the Format: field. This means "no bit depth". You will also notice that  mediainfo on the file does not report a bit depth.

Code:
telnet localist 6600
lsinfo "PATH_TO_FILE_RELATIVE_TO_MPD_MUSIC_ROOT"

IIRC the test ogg files I had would play but they spammed the MPD log with lots of weird errors. It's not surprising that MPD barfs when trying to output the decoded file over a Bluetooth connection.


Hi Tim,

The output indeed shows that there is no bitdepth reported with either method.

I may end up writing that transcode script after all.

Thanks for your help.

Best,
Paul

Code:
$ telnet localhost 6600
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
OK MPD 0.22.4
lsinfo SDCARD/Music/The_Meters/The_Very_Best_of_the_Meters/01_-_Cissy_Strut.ogg
file: SDCARD/Music/The_Meters/The_Very_Best_of_the_Meters/01_-_Cissy_Strut.ogg
Last-Modified: 2021-09-29T19:06:29Z
Format: 44100:f:2
Title: Cissy Strut
Artist: The Meters
Track: 1
Album: The Very Best of the Meters
ArtistSort: Meters, The
Genre: Funk
Date: 1970-01-01
Time: 186
duration: 185.973
OK
Connection closed by foreign host.
Reply
#9
@TheOldPresbyope your PI4B combined with the comment from @Tim Curtis, "It's not surprising that mpd barfs...", makes me wonder if perhaps my Pi Zero W just can't keep up with BT streaming + decoding, while the 4B can? The ZW is pretty wimpy compared to the 4B.
Reply
#10
I'd convert the files to FLAC and not MP3 otherwise you will end up lossy compressing again an already lossy compressed file.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: