Thank you for your donation!


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


Idea: waveform visualisation in web player ?
#11
(12-22-2023, 05:09 PM)TheOldPresbyope Wrote: True that. I was thinking it could be done while scanning a Library---course that's a whole 'nother problem, building a thumbnail-like directory.

Just for fun, I tried @steve4star 's command on several modestly sized tracks---one FLAC, one M4A, and one DSD. On an RPI4B it took from 2 to 6 seconds to execute, so a noticeable delay if at start of play.

Regards,
Kent


That amount of time would make Library generation take forever.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#12
Picky, picky.
Reply
#13
(12-22-2023, 05:09 PM)TheOldPresbyope Wrote: Just for fun, I tried @steve4star 's command on several modestly sized tracks---one FLAC, one M4A, and one DSD. On an RPI4B it took from 2 to 6 seconds to execute, so a noticeable delay if at start of play.
Definitely not viable as a runtime processing; needs, eventually, to be done at thumbnail generation time, IMO.
I'll experiment with my flacs, as I have everything (except a couple of albums) in flac + CUE.

ffmpeg supports time parameters for skipping and stopping, I have a shell script I wrote that allows me to parse the CUE, extract start / finish times, and extract single tracks from my whole-CD flacs, so instead of extraction, it could use such start/stop to generate the waveform of each track.

The animation is generally done having the waveform transparent, and below it a <div> with a suitable background color growing from left to right according to the time elapsed.
This of course involves some CSS magic to have the solid color surrounding the waveform to match moOde's current theme's background color.
I seem to remember there is some background rendering keys, along the way of - but not only - AND / OR / XOR etc. etc.

I mean, it can be done for sure. Then we all know about time and resources... :-)
Reply
#14
I can't see doing this unless there are a lot of requests for it because these bulk scan/generate approaches add a lot of time to what are already long running processes.

How are these other music apps doing it?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#15
(12-22-2023, 05:17 PM)Tim Curtis Wrote:
(12-22-2023, 05:09 PM)TheOldPresbyope Wrote: True that. I was thinking it could be done while scanning a Library---course that's a whole 'nother problem, building a thumbnail-like directory.

Just for fun, I tried @steve4star 's command on several modestly sized tracks---one FLAC, one M4A, and one DSD. On an RPI4B it took from 2 to 6 seconds to execute, so a noticeable delay if at start of play.

Regards,
Kent


That amount of time would make Library generation take forever.

Absolutely. But it will definitely be optional. and with the ordinary 1/2 albums "update" it could just take half a minute or so... :-)
Then it also depends on the image size...
Of course if we find some code snippet that can be ported to php we can also experiment there, as spawning ffmpeg vs a traversing an array in memory is also  time and resources consuming...

But till we start playing a bit with it, it's only speculation :-)
Reply
#16
Hi all,

I have been playing around with this on my Pi4 4GB, image size is 512 x 64, transparent bkg, PNG, always all channels merged to mono

1. stereo flac tracks <= 48kHz - about 1s
2. stereo flac tracks > 48kHz - about 2s
3. multitrack (5.1 - 24/96) flac - about 10s, could be well about 4/5s for 5.1 at 16/44.1

I tried a DSD64, and it took forever... about 30s, while a DSD512 took more or less 90s.
Now, on my system it will take 6 to 7 hours to generate all the waveforms (excluding MCHs and DSDs, but they are a minority, I can eventually run the process nightly), and take up about 20MB of disk space (well, 14K files about 1.3kB each may actually end up taking more space...)

IMO it is feasible, but time-consuming. While it could be acceptable to build the images on the fly for 16/44.1 (probably also MP3s / AACs, I have none on the Pi ATM) - so we may build the library of waves as we play the files... once they exist no generation takes place... still manually clean / (re)generate from config.

The script is very similar to that of the OP, takes track, png, start and stop times to allow extracting also from CUEs - of course, I have almost only those... ;-)
Images could be used INSTEAD of the progress-bar.

Just my 2c
Reply
#17
Hi Jeryci,
I just wish to share with you what I have done about your request.
The form you can see on the upper right is in realtime, because, otherwise, to have the waveform for a radio station it is impossible.
If you like I can send a short video.
Best regards,
Francesco
P.S.: what you see are 4 different applications: VUmeter with peek, volume, time, elapsed time, music infoes - waveform - Frequency spectrum, input infoes, output infoes - Temperature, CPU load, Memory load, SD load, system name and last octect of IPaddress.

   
Reply
#18
(01-07-2024, 10:54 PM)fdealexa Wrote: Hi Jeryci,
I just wish to share with you what I have done about your request.
The form you can see on the upper right is in realtime, because, otherwise, to have the waveform for a radio station it is impossible.
If you like I can send a short video.
Best regards,
Francesco
P.S.: what you see are 4 different applications: VUmeter with peek, volume, time, elapsed time, music infoes - waveform - Frequency spectrum, input infoes, output infoes - Temperature, CPU load, Memory load, SD load, system name and last octect of IPaddress.

This is the link to the short VIDEO
Regards,
Francesco
Reply


Forum Jump: