PHP-FFMPEG 波形不干净,是 bug 吗?

问题描述 投票:0回答:1

我通过示例代码制作了一个波形:

$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

php ffmpeg waveform
1个回答
0
投票

目前可以在第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, 

应该会取得更好的结果。

© www.soinside.com 2019 - 2024. All rights reserved.