Thank you for your donation!


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


PeppyMeter and moOde
Hi all, this is mediainfo output I get from one of the purchased files that I can't play with Moode & PeppyMeter (as previously said, this file can be played with Moode without PeppyMeter) 



Generale
Nome completo                           : /Test folder/03 Depending On You.m4a
Formato                                 : MPEG-4
Profilo formato                         : Apple audio with iTunes info
ID codec                                : M4A  (M4A /mp42/isom)
Dimensione file                         : 8,41 MiB
Durata                                  : 4min 3s
Modo bitrate generale                   : Variabile
Bitrate totale                          : 290 kb/s
Album                                   : Hackney Diamonds
Album/Ordinato per                      : Hackney Diamonds
Album/Esecutore                         : The Rolling Stones
Parte/Posizione                         : 1
Parte/Totale                            : 1
Traccia                                 : Depending On You
Traccia/Posizione                       : 3
Traccia/Totale                          : 12
Esecutore                               : The Rolling Stones
Esecutore/Ordinato per                  : The Rolling Stones
Compositore                             : Andrew Watt, Keith Richards & Mick Jagger
Compositore/Ordinato per                : Andrew Watt, Keith Richards & Mick Jagger
Genere                                  : Rock
Tipo contenuto                          : Music
Data codifica                           : 2023-10-20 02:41:57 UTC
Data                                    : 2023-10-21 01:02:42 UTC
Posizione                               : None
AppleStoreAccount                       : xxx@xxx
ownr                                    : xxx xxx
AppleStoreCatalogID                     : 1704374045
AlbumTitleID                            : 0
PlayListID                              : 1704373695
GenreID                                 : 0
PurchaseDate                            : 2023-10-20 23:02:39
Title/Sort                              : Depending On You
Vendor                                  : Universal:isrc:GBUM72302315

Audio
ID                                      : 1
Formato                                 : AAC LC
Formato/Informazioni                    : Advanced Audio Codec Low Complexity
ID codec                                : mp4a-40-2
Durata                                  : 4min 3s
Modalità  bitrate                        : Variabile
Bitrate                                 : 270 kb/s
Bitrate nominale                        : 256 kb/s
Bitrate massimo                         : 315 kb/s
Canali                                  : 2 canali
Layout canale                           : L R
Frequenza campionamento                 : 44,1 KHz
Frequenza fotogrammi                    : 43,066 fps (1024 SPF)
Modo compressione                       : Con perdita
Dimensione traccia                      : 7,84 MiB (93%)
Lingua                                  : Inglese
Data codifica                           : 2023-10-20 02:41:57 UTC
Data                                    : 2023-10-21 01:02:42 UTC

Generale
Nome completo                           : /Test folder/03 Depending On You 1.m4a
Formato                                 : MPEG-4
Profilo formato                         : Apple audio with iTunes info
ID codec                                : M4A  (M4A /mp42/isom)
Dimensione file                         : 28,4 MiB
Durata                                  : 4min 3s
Modo bitrate generale                   : Variabile
Bitrate totale                          : 982 kb/s
Album                                   : Hackney Diamonds
Album/Esecutore                         : The Rolling Stones
Parte/Posizione                         : 1
Parte/Totale                            : 1
Traccia                                 : Depending On You
Traccia/Posizione                       : 3
Traccia/Totale                          : 12
Esecutore                               : The Rolling Stones
Compositore                             : Andrew Watt, Keith Richards & Mick Jagger
Genere                                  : Rock
Data codifica                           : 2023-12-12 11:44:06 UTC
Data                                    : 2023-12-12 11:44:17 UTC
Creato con                              : Musica 13.3.4.56
Encoding Params                         : (Binary)

Audio
ID                                      : 1
Formato                                 : ALAC
ID codec                                : alac
ID codec/Informazioni                   : Apple Lossless Audio Codec
Durata                                  : 4min 3s
Duration_LastFrame                      : -65ms
Modalità  bitrate                        : Variabile
Bitrate                                 : 981 kb/s
Canali                                  : 2 canali
Frequenza campionamento                 : 44,1 KHz
Profondità  bit                          : 16 bit
Dimensione traccia                      : 28,4 MiB (100%)
Data codifica                           : 2023-12-12 11:44:06 UTC
Data                                    : 2023-12-12 11:44:17 UTC

Generale
Nome completo                           :/Test folder/03 Depending On You.m4a
Formato                                 : MPEG-4
Profilo formato                         : Apple audio with iTunes info
ID codec                                : M4A  (M4A /mp42/isom)
Dimensione file                         : 8,41 MiB
Durata                                  : 4min 3s
Modo bitrate generale                   : Variabile
Bitrate totale                          : 290 kb/s
Album                                   : Hackney Diamonds
Album/Ordinato per                      : Hackney Diamonds
Album/Esecutore                         : The Rolling Stones
Parte/Posizione                         : 1
Parte/Totale                            : 1
Traccia                                 : Depending On You
Traccia/Posizione                       : 3
Traccia/Totale                          : 12
Esecutore                               : The Rolling Stones
Esecutore/Ordinato per                  : The Rolling Stones
Compositore                             : Andrew Watt, Keith Richards & Mick Jagger
Compositore/Ordinato per                : Andrew Watt, Keith Richards & Mick Jagger
Genere                                  : Rock
Tipo contenuto                          : Music
Data codifica                           : 2023-10-20 02:41:57 UTC
Data                                    : 2023-10-21 01:02:42 UTC
Posizione                               : None
AppleStoreAccount                       : xxx@xxx.com
ownr                                    : Xxxx X
AppleStoreCatalogID                     : 1704374045
AlbumTitleID                            : 0
PlayListID                              : 1704373695
GenreID                                 : 0
PurchaseDate                            : 2023-10-20 23:02:39
Title/Sort                              : Depending On You
Vendor                                  : Universal:isrc:GBUM72302315

Audio
ID                                      : 1
Formato                                 : AAC LC
Formato/Informazioni                    : Advanced Audio Codec Low Complexity
ID codec                                : mp4a-40-2
Durata                                  : 4min 3s
Modalità  bitrate                        : Variabile
Bitrate                                 : 270 kb/s
Bitrate nominale                        : 256 kb/s
Bitrate massimo                         : 315 kb/s
Canali                                  : 2 canali
Layout canale                           : L R
Frequenza campionamento                 : 44,1 KHz
Frequenza fotogrammi                    : 43,066 fps (1024 SPF)
Modo compressione                       : Con perdita
Dimensione traccia                      : 7,84 MiB (93%)
Lingua                                  : Inglese
Data codifica                           : 2023-10-20 02:41:57 UTC
Data                                    : 2023-10-21 01:02:42 UTC
Reply
(12-13-2023, 03:32 PM)raspiter Wrote: Hi all, this is mediainfo output I get from one of the purchased files that I can't play with Moode & PeppyMeter (as previously said, this file can be played with Moode without PeppyMeter) 

Hi Kent,

I'll bring the data locally and examine it later on, to check about the image/video stream the art is embedded into...

Weird, though, the data headers mediainfo shows are in Italian... Smile

P.S.
Good find.
Reply
Update of my previous post.

As suggested by @raspiter 's posted mediainfo output and repro'ed with a test I just did with an AAC/M4A file not containing embedded coverart, the PeppyMeter / moOde lashup failure apparently is not due to the coverart.

The saga continues....

Regards,
Kent
Reply
(12-13-2023, 04:20 PM)TheOldPresbyope Wrote: As suggested by @raspiter 's posted mediainfo output and repro'ed with a test I just did with an AAC/M4A file not containing embedded coverart, the PeppyMeter / moOde lashup failure apparently is not due to the coverart.

The saga continues....
Indeed, now it gets interesting... you won't stop 'till you got it by the tail, will you...? Big Grin
Reply
(12-13-2023, 04:20 PM)Nutul Wrote:
(12-13-2023, 03:32 PM)raspiter Wrote: Hi all, this is mediainfo output I get from one of the purchased files that I can't play with Moode & PeppyMeter (as previously said, this file can be played with Moode without PeppyMeter) 

Hi Kent,

I'll bring the data locally and examine it later on, to check about the image/video stream the art is embedded into...

Weird, though, the data headers mediainfo shows are in Italian... Smile

P.S.
Good find.
Hi, many itunes files do not have cover image when used in Moode. Sometimes I manually edit the file to embed a cover image
Not so weird about italian headers... I'm italian... Smile
Reply
(12-13-2023, 04:20 PM)TheOldPresbyope Wrote: Update of my previous post.

As suggested by @raspiter 's posted mediainfo output and repro'ed with a test I just did with an AAC/M4A file not containing embedded coverart, the PeppyMeter / moOde lashup failure apparently is not due to the coverart.

The saga continues....

Regards,
Kent

Hi, yes... I suppose it not depends on embedded coverart: files can/can't be played with or without it. The only things that matters - as far as I can see - is if I've purchased or not the song. 
Did you replicate the issue Moode/PeppyMeter/iTunes file?
Reply
On the player configured per Francesco's instructions in his github distro up to the end of page, er,
https://github.com/FdeAlexa/PeppyMeter_a...2_moOde.md [As best I can determine, the subset of instructions for moOde 7.2.0 still apply]


Looking at the MPD log (I had debug logging enabled but I'm not sure that mattered for this)

1. Play my downloaded Art Blakey track with ALSA loopback disabled.

Code:
Dec 13 10:40 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, timescale not set
Dec 13 10:40 : ffmpeg/aac: Could not update timestamps for skipped samples.
Dec 13 10:40 : player: played "SDCARD/Art Blakey & The Jazz Messengers/Moanin' (Remastered)/02 Moanin'.m4a"

2. Enable ALSA loopback and play the same track again


Code:
Dec 13 10:41 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, timescale not set
Dec 13 10:41 : ffmpeg/aac: Could not update timestamps for skipped samples.
mpd: pcm_meter.c:1220: snd_pcm_scope_s16_get_channel_buffer: Assertion `s16->buf_areas' failed.


which leads to the MPD abort I observed in syslog

Code:
mpd.service: Main process exited, code=killed, status=6/ABRT



Good clues, but at this point I have some things in real life I have to go take care of, so stay tuned.

Regards,
Kent
Reply
@raspiter 

Ok, I think I have a solution, thanks to some hints I found on the InterWeb™. I've tested it briefly with the ALSA Loopback enabled and using the  peppyalsa-client (described in @fdealexa github documentation) which displays a text-based bar graph in real time in the terminal window. This combo works with the Art Blakey M4A tracks I downloaded from Apple iTunes, the other M4A test tracks I had on hand, on the moOde Internet radio stations, and some music tracks with other encodings.

You might give it a try with your full PeppyMeter installlation.

My solution consists of an modification of /etc/alsa/conf.d/_sndaloop.conf to insert a new plugin in the loopback branch which explicitly forces the format in that branch to be S16_SE. I arbitrary named the new plugin peppyprep.

Here's my entire new file


Code:
pi@moode837:/etc/alsa/conf.d $ more _sndaloop.conf
#
# This file provides a default Loopback device by overriding the _audioout device defined in /etc/alsa/conf.d/
#
# The trailing underscores are removed/added by job "alsa_loopback" to effectively turn the override On/Off.
# This job is submitted by snd-config.php and corresponds to the setting "ALSA loopback ON/OFF".
#
# modified by TheOldPresbyope to define and interconnect plugin "peppyprep"
#
pcm.!_audioout {
type plug
slave.pcm {
type multi
slaves {
a { channels 2 pcm "plughw:2,0" }
b { channels 2 pcm "peppyprep" }
}
bindings {
0 { slave a channel 0 }
1 { slave a channel 1 }
2 { slave b channel 0 }
3 { slave b channel 1 }
}
}
ttable [
[ 1 0 1 0 ]   # left  -> a.left,  b.left
[ 0 1 0 1 ]   # right -> a.right, b.right
]
}

pcm.peppyprep {
       type plug
       slave
       {
       pcm "pippopeppy"
       format S16_LE
       }
       }

pcm.pippopeppy {
       type meter
       slave.pcm "hw:Loopback,0"
       scopes.0 peppyalsa
}

pcm_scope.peppyalsa {
       type peppyalsa
       decay_ms 400
       meter "/var/tmp/peppyfifo"
       meter_max 100
       meter_show 0
}

pcm_scope_type.peppyalsa {
       lib /usr/local/lib/libpeppyalsa.so
}

The hint found on the InterWeb™ was that plugin type meter doesn't advise ALSA of its input format requirements so this alteration lets us tell it explicitly.

Let us know how it goes.

Regards,
Kent

PS - It should be possible to use a simplified syntax in the definition of peppyprep but that didn't work for me. I had to use the syntax you see here.
Reply
PPS - Best practice is to turn off the ALSA Loopback, then change the indicated file, then reboot, and then reenable the ALSA Loopback.
Reply
Argh! I claimed victory prematurely.

I was testing with a Creative Tech BT-W4 USB adapter as my DAC so I could listen to my tests without disturbing my partner.

This is a 16-bit DAC fo which alsacap reports

Code:
   2 channels, sampling rate 48000..48000 Hz
   Sample formats: S16_LE

This morning I swapped this DAC out for my Khadas Tone 1 board, for which alsacap reports

Code:
   2 channels, sampling rate 44100..768000 Hz
   Sample formats: S32_LE, SPECIAL, DSD_U32_BE



Sadly, my hack fails with this DAC. Even worse, it fails for all material and not just the M4A tracks. In every case the MPD error message is "openMpdSock() failed".

My guess is that although my hack is intended to apply to the dataflow only on the loopback branch it alsa then forces both branches to S16_SE. The BT-W4 is ok with that and the Tone1 DAC is not. But that's just a guess.

Looks like some help is needed from an ALSA guru.

Regards,
Kent
Reply


Forum Jump: