using ffmpeg/ffprobe to create a waveform json using php

I have many ogg & opus files on my server and need to generate json-waveform numeric arrays on an as-needed basis (example below).

recently i discovered the node based waveform-util which uses ffmpeg/ffprobe for rendering a JSON waveform and it works perfectly. i am undecided if having a node process constantly running is the optimum solution to my issue.

since ffmpeg seems to be able to handle anything i can throw at it, i wish to stick with an ffmpeg solution.

i have three questions:

1) is there a php equivalent? i have found a couple that generate PNG images but not one that generates JSON-waveform numeric arrays

2) are there any significant advantages of going with the node-based solution rather than a php based solution (assuming there is a php based solution)?

3) is there a way using CLI ffmpeg/ffprobe to generate a json-waveform ? i saw all the -show_ options (-show_data, -show_streams, -show_frames) but nothing looked like it produced what i am looking for.

the json-waveform needs to be in this format:

[ 0.0002, 0.001, 0.15, 0.14, 0.356 .... ]

thank you all.

it sounds as if there is a conflict with the way my server is handling cgi. i am using virtualmin and am using the following setting:

PHP script execution mode: CGI wrapper (run as virtual server owner)

after much research, it appears that using pure node.js is more lightweight rather than using a shell executable. i was able to have some success merely by putting a schbang line to call node, but having a node.js script always memory resident is probably the way to go.