Anfang der Tracks von Hörbüchern abgeschnitten

Hallo zusammen,

ich habe folgendes Problem: Der Anfang von Tracks von Hörbüchern ist abgeschnitten, ich glaube wenn eine Anfangsposition im NVS hinterlegt war. Der Effekt passiert, wenn man mit der „Next“ Taste zum nächsten Titel springt (und evtl. auch, wenn ein Titel ausgelaufen ist und der nächste dadurch abgespielt wird). Hier die Log-Ausgabe; auffallend ist, dass bei Titel 12 und auch nach dem Springen („Nächster Titel“) von Track 12 auf 13 jeweils die Ausgabe „Titel wird abgespielt ab Position 241136“ kommt, also exakt die gleiche Position. Das wiederholt sich dann ebenfalls bei den nachfolgenden Titeln.

Ideen?

Viele Grüße
Johannes

  _____   ____    ____            _                 
 | ____| / ___|  |  _ \   _   _  (_)  _ __     ___  
 |  _|   \__  \  | |_) | | | | | | | | '_ \   / _ \
 | |___   ___) | |  __/  | |_| | | | | | | | | (_) |
 |_____| |____/  |_|      \__,_| |_| |_| |_|  \___/ 
 Rfid-controlled musicplayer

 Rev 20210714-1

Wakeup was not caused by deep sleep: 0
Versuche SD-Karte wird im SD_MMC-Modus (1 Bit) zu mounten...
SD card type: SDHC
FTP-User wurde aus NVS geladen: ...
FTP-Passwort wurde aus NVS geladen: ...
Initiale Lautstärke wurde aus NVS geladen: 3
Maximale Lautstärke für Lautsprecher wurde ins NVS geschrieben.
MQTT-Flag (aktiviert) wurde aus NVS geladen: 1
MQTT-Server wurde aus NVS geladen: ...
MQTT-User wurde aus NVS geladen: ...
MQTT-Passwort wurde aus NVS geladen: ...
MQTT-Port wurde aus NVS geladen: 1883
Unterer Spannungslevel (Batterie) fuer Neopixel-Anzeige aus NVS geladen: 3.00 V
Oberer Spannungslevel (Batterie) fuer Neopixel-Anzeige aus NVS geladen: 4.20 V
Spannungslevel (Batterie) fuer Warnung via Neopixel aus NVS geladen: 3.40 V
Zyklus für Spannungsmessung (Batterie) fuer Neopixel-Anzeige aus NVS geladen: 10 Minuten
Hostname aus NVS geladen: espuino3
.Aktuelle IP: ...
Freier Heap-Speicher nach Setup-Routine: 126248
PSRAM: 0 bytes
Flash-size: 4194304 bytes
RSSI: -62 dBm
Firmware version=4.1
RFID-Tags koennen jetzt gescannt werden...
Versuche Verbindung zu MQTT-Broker aufzubauen ...
Verbinde zu MQTT-Server mit User und Passwort
Neue Lautstärke empfangen via Queue: 3
MQTT-Session aufgebaut.
MQTT-Nachricht empfangen: [Topic: Cmnd/ESPuino/Loudness] [Command: 3]
Neue Lautstärke empfangen via Queue: 3
RFID-Karte erkannt: (ISO-15693) ID: a2-6f-fb-1e
RFID-Karte empfangen: 162111251030
Playlist-Generierung: cached
Freier Speicher: 98972
Anzahl gültiger Files: 26
Modus: Hoerspiel
Neue Playlist empfangen mit 26 Titel(n)
Free heap: 98144
info        : PSRAM not found, inputBufferSize: 6399 bytes
info        : buffers freed, free Heap: 90128 bytes
info        : Reading file: "/Audiobooks/autor/album/12_Track_12.mp3"
MQTT-Nachricht empfangen: [Topic: Cmnd/ESPuino/LedBrightness] [Command: 0]
info        : MP3Decoder has been initialized, free Heap: 68108 bytes
Titel wird abgespielt ab Position 241136
MQTT-Nachricht empfangen: [Topic: Cmnd/ESPuino/LedBrightness] [Command: 16]
'/Audiobooks/autor/album/12_Track_12.mp3' wird abgespielt (12 von 26)
info        : stream ready
info        : Content-Length: 3487005
info        : file has no mp3 tag, skip metadata
info        : Audio-Length: 3487005
info        : syncword found at pos 120
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 1
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 6
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 155
info        : syncword found at pos 0
info        : Channels: 2
info        : SampleRate: 44100
info        : BitsPerSample: 16
info        : BitRate: 128000
Kontroll-Kommando empfangen via Queue: 4
Schreibe '#/Audiobooks/autor/album#0#3#12' in NVS für RFID-Card-ID 162111251030 mit playmode 3 und letzter Track 12
#/Audiobooks/autor/album#0#3#12
Titel wird im Hörspielmodus von vorne gespielt.
Kommando: Nächster Titel
info        : buffers freed, free Heap: 93632 bytes
info        : Reading file: "/Audiobooks/autor/album/13_Track_13.mp3"
info        : MP3Decoder has been initialized, free Heap: 69872 bytes
Titel wird abgespielt ab Position 241136
'/Audiobooks/autor/album/13_Track_13.mp3' wird abgespielt (13 von 26)
info        : stream ready
info        : Content-Length: 3120037
info        : file has no mp3 tag, skip metadata
info        : Audio-Length: 3120037
info        : syncword found at pos 161
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 7
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 5
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 3
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 102
info        : syncword found at pos 0
info        : Channels: 2
info        : SampleRate: 44100
info        : BitsPerSample: 16
info        : BitRate: 128000
Aktuelle Batteriespannung: 3.66 V
RSSI: -63 dBm
MQTT: Bin noch online.

Hattest du den Fehler vorher auch schon oder ist der neu?
Muss ich mir mal auf dem ESPuino vom Sohnemann anschauen. Der hat viele Hörspiele und auch die FW von gestern Abend :slight_smile:

Man sieht auf jeden Fall, dass zwischendrin die Position 0 ins NVS geschrieben wurde, nachdem der Titel gewechselt wurde. Das passt. Aber seltsam, dass er wieder die Position 241136 anspringen will.

EDIT:
Du hast einen Bug gefunden, den es da echt schon SEHR lange gibt :+1: Und womöglich erklärt der „komischen Kram“, den mir mein Sohnemann schon berichtet hatte.

1 „Gefällt mir“

Gefixt!

Bitte mal testen. Echt erstaunlich, dass dieser Bug sich so lange gehalten hat. Danke :smiley:

Danke Dir! Jetzt geht es. :wink:

Viele Grüße
Johannes

Habe den selben Fehler.

info        : stream ready
info        : Content-Length: 11076916
info        : file has no mp3 tag, skip metadata
info        : Audio-Length: 11076916
info        : syncword found at pos 53
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER

Ist der Fix schon in der Master?
Zumindest funktioniert bei mir die aktuelle Master nicht :-(.

Der Fix ist ausschließlich im aktuellen Master.
Für mich sieht der Fehler aus, als gäbe es hier ein Problem mit dem mp3. Poste vielleicht mal einen größeren Ausschnitt, damit man das besser beurteilen kann.

Ich glaube es hängt mit dem Speicherpunkt der Karte zusammen.
Jedes Mal wenn ich die Karte aufgelegt habe ist der ESP abgestürzt.

Maximale Inaktivitätszeit wurde aus NVS geladen: 10
Initiale LED-Helligkeit wurde aus NVS geladen: 30
LED-Helligkeit für Nachtmodus wurde aus NVS geladen: 2
Versuche SD-Karte wird im SPI-Modus zu mounten...
FTP-User wurde aus NVS geladen: esp32
FTP-Passwort wurde aus NVS geladen: esp32
Initiale Lautstärke wurde aus NVS geladen: 4
Maximale Lautstärke für Lautsprecher wurde aus NVS geladen: 21
MQTT-Flag (aktiviert) wurde aus NVS geladen: 1
MQTT-Server wurde aus NVS geladen: 192.168.1.2
MQTT-User wurde aus NVS geladen: 
MQTT-Passwort wurde aus NVS geladen: 
MQTT-Port wurde aus NVS geladen: 1883
RFID-Tags koennen jetzt gescannt werden...
Hostname aus NVS geladen: ESPuino
Aktuelle IP: 192.168.2.81
Freier Heap-Speicher nach Setup-Routine: 132492
PSRAM: 4194204 bytes
Flash-size: 16777216 bytes
RSSI: -40 dBm
Versuche Verbindung zu MQTT-Broker aufzubauen 192.168.1.2
Verbinde zu MQTT-Server ohne User und Passwort
Neue Lautstärke empfangen via Queue: 4
MQTT-Session aufgebaut.
RFID-Karte erkannt: e9-ec-a5-98
RFID-Karte empfangen: 233236165152
Playlist-Generierung: cached
Freier Speicher: 109184
Anzahl gültiger Files/Webstreams: 16
Modus: Hoerspiel
Neue Playlist empfangen mit 16 Titel(n)
info        : PSRAM found, inputBufferSize: 283615 bytes
info        : buffers freed, free Heap: 110012 bytes
info        : Reading file: "/Enny und Mo/Enny und Mo - 10 - Enny und Mo retten Ostern.mp3"
info        : MP3Decoder has been initialized, free Heap: 86260 bytes
Titel wird abgespielt ab Position 11038093
'/Enny und Mo/Enny und Mo - 10 - Enny und Mo retten Ostern.mp3' wird abgespielt (4 von 16)
info        : stream ready
info        : Content-Length: 11076916
info        : file has no mp3 tag, skip metadata
info        : Audio-Length: 11076916
info        : syncword found at pos 53
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER
info        : syncword found at pos 0
info        : MP3 decode error -6 : INVALID_FRAMEHEADER

Die Karte war erst wieder brauchbar nachdem ich die Verbindung gelöscht und neu verbunden habe.