Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:02 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Question about MP3 with VS1053 module

Author Message
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 830
Posted: 08:58am 01 Dec 2023
Copy link to clipboard 
Print this post

Hi,

I would like to set up an audio book reader.

To do this, it would be necessary to start an MP3 file at a certain point and remember this new position when stopping, as these files often have a playing time of 1/2 hour or more.

If I understand correctly, our "PLAY MP3" command can only start the file from the beginning.

Is there (another) way to start MP3 files only at a certain time index?

THANKS!!!

Frank
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9122
Posted: 09:51am 01 Dec 2023
Copy link to clipboard 
Print this post

You have already asked this and got no reply because, as you are presumably asking me, I have no idea and don't intend to investigate.
Why don't you do the work to look at how to construct a mp3 header and edit a mp3 file to trim it to a specified point and then insert a suitable header at the beginning of a shortened file
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 830
Posted: 01:27pm 01 Dec 2023
Copy link to clipboard 
Print this post

Hi Peter,
thanks for your reply - I wasn't sure if you had read my entry. I was hoping there was an easier way to achieve it.
A web radio also gets a continuous stream (without a header?) and I was hoping it would be possible (with a trick) to jump to a certain point in the file to start it from there...
Thanks anyway!!!

Frank
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9122
Posted: 02:33pm 01 Dec 2023
Copy link to clipboard 
Print this post

AFAIK streamed mp3 is constant bitrate and each frame is self-contained and any data before a frame start will be ignored by the codec. Normal mp3 files are variable bitrate so there is no way of knowing where in the file a certain playback time will occur without reading from the beginning and essentially decoding the data as you go.
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 830
Posted: 04:21pm 01 Dec 2023
Copy link to clipboard 
Print this post

Ok, thank you very much for your explanation! Then it won't work that easily...
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9122
Posted: 04:23pm 01 Dec 2023
Copy link to clipboard 
Print this post

I've had an idea - watch this space
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9122
Posted: 05:15pm 01 Dec 2023
Copy link to clipboard 
Print this post

Frank - see the "back to beta" thread
Edited 2023-12-02 20:10 by matherp
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 830
Posted: 08:01am 04 Dec 2023
Copy link to clipboard 
Print this post

@Peter:

  Quote  V5.08.08b2

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

Gerry: thanks for all the great testing

b2 should fix all of the above and Harm's issue (not tested). In addition I have added functionality for Frank.

PLAY HALT - stops playback for MP3 files via the VS1053 and notes the current location in the file
PLAY CONTINUE track$ - restarts playback of an mp3 track from the position halted. "track$" will be the name of the file with all file attributes removed

e.g.

PLAY MP3 "B:/mp3/mymp3.mp3"
sometime later
PLAY HALT
later again
PLAY CONTINUE "mymp3"


Thank you very much for your efforts! I can't wait to try out your new commands!
       

Frank
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 554
Posted: 08:05am 04 Dec 2023
Copy link to clipboard 
Print this post

like this also , thx a lot
Plasma
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6797
Posted: 02:41pm 06 Dec 2023
Copy link to clipboard 
Print this post

A further question, Peter. :)
Is it likely that treble, bass and EarSpeaker control might be included at some point?
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024