我通过示例代码制作了一个波形:
$waveform = $audio->waveform(2000, 500, array('#FFA500'));
$waveform->save('waveform.png');
但是结果在边缘的顶部和底部有一些噪音。 怎样才能让它变得更好?
PHP-FFMpeg:23 | FFMpeg:2023-02-27-git-891ed24f77(Win X64)| PHP:8.3
目前可以在第140行做一些核心修改:
src\FFMpeg\Media\Waveform.php
//'showwavespic=colors='.$this->compileColors().':s='.$this->width.'x'.$this->height,
'showwavespic=draw=full:colors='.$this->compileColors().':s='.$this->width.'x'.$this->height,
应该会取得更好的结果。