Recherche avancée

Médias (0)

Mot : - Tags -/serveur

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (102)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (6435)

  • FFmpeg Concatenation Command Fails in Flutter App

    18 février 2024, par Petro

    I'm developing a Flutter application where I need to concatenate several images into a single video file using FFmpeg. Despite following the recommended practices and trying multiple variations of the FFmpeg command, all my attempts result in failure with an exit code of 1.

    


    FFMPEG Version : ffmpeg_kit_flutter: ^6.0.3-LTS

    


    All of the files are present when this happens...
enter image description here

    


    Environment :
Flutter app targeting Android
Using ffmpeg-kit-flutter for FFmpeg operations

    


    Objective :
To concatenate multiple images stored in the app's file system into a video.

    


    Code Snippet :
I'm generating a list of image paths, writing them to a file (ffmpeg_list.txt), and using that file with FFmpeg's concat demuxer. Here's a simplified version of my code :

    


    Future<void> _createVideoFromImages() async {&#xA;  final Directory appDir = await getApplicationDocumentsDirectory();&#xA;  final Uuid uuid = Uuid();&#xA;  final String videoFileName = uuid.v4();&#xA;  final String outputPath = &#x27;${appDir.path}/$videoFileName.mp4&#x27;;&#xA;  &#xA;  final Directory tempImageDir = await Directory(&#x27;${appDir.path}/tempImages&#x27;).create();&#xA;  final StringBuffer ffmpegInput = StringBuffer();&#xA;  int index = 0;&#xA;&#xA;  for (var image in _images) {&#xA;    String newFileName = &#x27;img${index&#x2B;&#x2B;}${Path.extension(image.path)}&#x27;.replaceAll(&#x27; &#x27;, &#x27;_&#x27;);&#xA;    final String newPath = &#x27;${tempImageDir.path}/$newFileName&#x27;;&#xA;    await image.copy(newPath);&#xA;    ffmpegInput.writeln("file &#x27;$newPath&#x27;");&#xA;  }&#xA;&#xA;  final String listFilePath = &#x27;${appDir.path}/ffmpeg_list.txt&#x27;;&#xA;  await File(listFilePath).writeAsString(ffmpegInput.toString());&#xA;&#xA;  if(await File(listFilePath).exists()) {&#xA;    String ffmpegCommand = "-v verbose -f concat -safe 0 -i $listFilePath -vsync vfr -pix_fmt yuv420p -c:v libx264 -r 30 $outputPath";&#xA;    // Additional commands tried here...&#xA;    await FFmpegKit.execute(ffmpegCommand).then((session) async {&#xA;      // Error handling code...&#xA;    });&#xA;  }&#xA;}&#xA;&#xA;Result Logs:&#xA;I/flutter: file exists at /data/user/0/com.example.app/app_flutter/ffmpeg_list.txt&#xA;I/flutter: FFmpeg command: -v verbose -f concat -safe 0 -i /data/user/0/com.example.app/app_flutter/ffmpeg_list.txt -vsync vfr -pix_fmt yuv420p -c:v libx264 -r 30 /data/user/0/com.example.app/app_flutter/58fdf92b-47b0-49d1-be93-d9c95870c733.mp4&#xA;I/flutter: Failed to create video&#xA;I/flutter: FFmpeg process exited with:1&#xA;I/flutter: FFmpeg command failed with logs: ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers...&#xA;</void>

    &#xA;

    Attempts :&#xA;-Simplified the FFmpeg command by removing -vsync vfr, -pix_fmt yuv420p, and adjusting -r 30 parameters.&#xA;-Tried using the -c copy option to avoid re-encoding.&#xA;-Tested with a single image to ensure basic functionality works.&#xA;-Checked file permissions and ensured all images and the list file are accessible.

    &#xA;

    Despite these attempts, the command fails without providing specific error messages related to the command's execution. The verbose logs do not offer insights beyond the FFmpeg version and configuration.

    &#xA;

    Questions :&#xA;Are there known issues with FFmpeg's concat that might lead to such failures ?&#xA;Are there alternative approaches ?

    &#xA;

    I appreciate any insights or suggestions the community might have. Thank you !

    &#xA;

    Full code :

    &#xA;

    Future<void> _createVideoFromImages() async {&#xA;    final Directory appDir = await getApplicationDocumentsDirectory();&#xA;    final Uuid uuid = Uuid();&#xA;    final String videoFileName = uuid.v4();&#xA;    final String outputPath = &#x27;${appDir.path}/$videoFileName.mp4&#x27;;&#xA;    final String singleImagePath = _images[0]!.path;&#xA;&#xA;// Create a directory to store renamed images to avoid any naming conflict&#xA;    final Directory tempImageDir = await Directory(&#x27;${appDir.path}/tempImages&#x27;).create();&#xA;&#xA;    final StringBuffer ffmpegInput = StringBuffer();&#xA;    int index = 0; // To ensure unique filenames&#xA;&#xA;    for (var image in _images) {&#xA;      // Generate a new filename by replacing spaces with underscores and adding an index&#xA;      String newFileName = &#x27;img${index&#x2B;&#x2B;}${p.extension(image!.path)}&#x27;.replaceAll(&#x27; &#x27;, &#x27;_&#x27;);&#xA;      final String newPath = &#x27;${tempImageDir.path}/$newFileName&#x27;;&#xA;&#xA;      // Copy and rename the original file to the new path&#xA;      await image!.copy(newPath);&#xA;&#xA;      // Add the new, safely named file path to the ffmpegInput&#xA;      ffmpegInput.writeln("file &#x27;$newPath&#x27;");&#xA;    }&#xA;&#xA;// Write the paths to a temporary text file for FFmpeg&#x27;s concat demuxer&#xA;    final String listFilePath = &#x27;${appDir.path}/ffmpeg_list.txt&#x27;;&#xA;    await File(listFilePath).writeAsString(ffmpegInput.toString());&#xA;&#xA;    //check if file exists&#xA;    if(await File(listFilePath).exists()) {&#xA;      print("file exists at $listFilePath");&#xA;&#xA;// Use the generated list file in the concat command&#xA;      String ffmpegCommand = "-v verbose -f concat -safe 0 -i $listFilePath -vsync vfr -pix_fmt yuv420p -c:v libx264 -r 30 $outputPath";&#xA;      String ffmpegCommand2 = "-v verbose -f concat -safe 0 -i $listFilePath -c:v libx264 $outputPath";&#xA;      String ffmpegCommand3 = "-v verbose -i $singleImagePath -frames:v 1 $outputPath";&#xA;      //print command&#xA;      print("FFmpeg command: $ffmpegCommand");&#xA;&#xA;&#xA;      await FFmpegKit.execute(ffmpegCommand).then((session) async {&#xA;        // Check the session for success or failure&#xA;        final returnCode = await session.getReturnCode();&#xA;        if (returnCode!.isValueSuccess()) {&#xA;          print("Video created successfully: $outputPath");&#xA;          //okay all set, now set the video to be this:&#xA;          _actual_video_file_ready_to_upload = File(outputPath);&#xA;          print ("video path is: ${outputPath}");&#xA;        } else {&#xA;          print("Failed to create video");&#xA;          print("FFmpeg process exited with:" &#x2B; returnCode.toString());&#xA;          // Command failed; capture and log error details&#xA;          await session.getLogsAsString().then((logs) {&#xA;            print("FFmpeg command failed with logs: $logs");&#xA;          });&#xA;          // Handle failure, e.g., by showing an error message&#xA;          showSnackBarHelperERRORWrapLongString(context, "Failed to create video");&#xA;        }&#xA;      });&#xA;&#xA;      //try command 2&#xA;      if(_actual_video_file_ready_to_upload == null) {&#xA;        await FFmpegKit.execute(ffmpegCommand2).then((session) async {&#xA;          // Check the session for success or failure&#xA;          final returnCode = await session.getReturnCode();&#xA;          if (returnCode!.isValueSuccess()) {&#xA;            print("Video created successfully: $outputPath");&#xA;            //okay all set, now set the video to be this:&#xA;            _actual_video_file_ready_to_upload = File(outputPath);&#xA;            print ("video path is: ${outputPath}");&#xA;          } else {&#xA;            print("Failed to create video");&#xA;            print("FFmpeg process exited with:" &#x2B; returnCode.toString());&#xA;            // Command failed; capture and log error details&#xA;            await session.getLogsAsString().then((logs) {&#xA;              print("FFmpeg command failed with logs: $logs");&#xA;            });&#xA;            // Handle failure, e.g., by showing an error message&#xA;            showSnackBarHelperERRORWrapLongString(context, "Failed to create video");&#xA;          }&#xA;        });&#xA;      }&#xA;      //try command 3&#xA;      if(_actual_video_file_ready_to_upload == null) {&#xA;        await FFmpegKit.execute(ffmpegCommand3).then((session) async {&#xA;          // Check the session for success or failure&#xA;          final returnCode = await session.getReturnCode();&#xA;          if (returnCode!.isValueSuccess()) {&#xA;            print("Video created successfully: $outputPath");&#xA;            //okay all set, now set the video to be this:&#xA;            _actual_video_file_ready_to_upload = File(outputPath);&#xA;            print ("video path is: ${outputPath}");&#xA;          } else {&#xA;            print("Failed to create video");&#xA;            print("FFmpeg process exited with:" &#x2B; returnCode.toString());&#xA;            // Command failed; capture and log error details&#xA;            await session.getLogsAsString().then((logs) {&#xA;              print("FFmpeg command failed with logs: $logs");&#xA;            });&#xA;            // Handle failure, e.g., by showing an error message&#xA;            showSnackBarHelperERRORWrapLongString(context, "Failed to create video");&#xA;          }&#xA;        });&#xA;      }&#xA;    }else{&#xA;      print("file does not exist at $listFilePath");&#xA;    }&#xA;  }&#xA;</void>

    &#xA;

  • Split video with ffmpeg segment option is missing frame

    9 février 2024, par Dan

    I’m trying to get the ffmpeg “segment” option to split my video into segments at the Iframes. I'm using ffmpeg V6.1.1.

    &#xA;

    First I added time stamps to each frame of my video so that when it plays, I can see exactly which frame is being displayed. I used this command :

    &#xA;

    ffmpeg -i In.mp4 -vf "drawtext=fontfile='C :\Windows\Fonts\Arial.ttf' : text='%frame_num :~ %pts':fontsize=200 : r=25 : x=(w-tw)/2 : y=h-(2*lh) : fontcolor=white : box=1 : boxcolor=0x00000099" -y Out.mp4

    &#xA;

    Then I used ffprobe to confirm that the video is 30 FPS and the Iframes are as follows :

    &#xA;

    0.000000&#xA;4.933333&#xA;10.000000&#xA;11.533333&#xA;18.866667&#xA;24.966667

    &#xA;

    Based on these Iframe times, I’d expect the following segments :

    &#xA;

    &#xA;&#xA;&#xA;&#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;&#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    &#xA;

    Start Frame Start Time End Frame End Time
    0 0 147 4.900000
    148 4.933333 299 9.966667
    300 10.000000 345 11.500000
    346 11.533333 565 18.833334
    566 18.866667 748 24.933334
    749 24.966667 867 28.906667

    &#xA;

    &#xA;

    When I use ffmpeg to split the video into segments with the following command, I get six files as expected :

    &#xA;

    ffmpeg -i Out.mp4 -f segment -c copy -reset_timestamps 1 -map 0 "Out %d.mp4"

    &#xA;

    When I play the segments, they are all correct except the first segment file (Out 0.mp4). It seems to be missing the last frame. It contains frames 0 to 146 (4.866667 sec) but should also include frame 147 (4.9 sec). All the other segment files are as expected.

    &#xA;

    I’ve tried this on several different mp4 videos and they all are missing the last frame on the first segments.

    &#xA;

    Any idea why my first segment files is missing the last frame of the segment ?

    &#xA;

    Could this be an ffmpeg bug ?

    &#xA;

    Thanks for the help !&#xA;Dan

    &#xA;

    Here is my console session with all output :

    &#xA;

    C:\> ffprobe Out.mp4&#xA;ffprobe version 2023-12-21-git-1e42a48e37-full_build-www.gyan.dev Copyright (c) 2007-2023 the FFmpeg developers&#xA;  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;  libavutil      58. 36.100 / 58. 36.100&#xA;  libavcodec     60. 36.100 / 60. 36.100&#xA;  libavformat    60. 20.100 / 60. 20.100&#xA;  libavdevice    60.  4.100 / 60.  4.100&#xA;  libavfilter     9. 14.100 /  9. 14.100&#xA;  libswscale      7.  6.100 /  7.  6.100&#xA;  libswresample   4. 13.100 /  4. 13.100&#xA;  libpostproc    57.  4.100 / 57.  4.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;Out.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    title           : Short 4k video sample - 4K Ultra HD (3840x2160)&#xA;    date            : 2014:05:24 19:00:00&#xA;    encoder         : Lavf60.20.100&#xA;  Duration: 00:00:28.96, start: 0.000000, bitrate: 3181 kb/s&#xA;  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 3045 kb/s, 30 fps, 30 tbr, 15360 tbn (default)&#xA;      Metadata:&#xA;        handler_name    : VideoHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;        encoder         : Lavc60.36.100 libx264&#xA;  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)&#xA;      Metadata:&#xA;        handler_name    : SoundHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;&#xA;C:\ ffprobe -loglevel error -skip_frame nokey -select_streams v:0 -show_entries frame=pts_time -of csv=print_section=0 Out.mp4&#xA;0.000000,&#xA;4.933333&#xA;10.000000&#xA;11.533333&#xA;18.866667&#xA;24.966667&#xA;&#xA;C:\ ffmpeg -i Out.mp4 -f segment -c copy -reset_timestamps 1 -map 0 "Out %1d.mp4"&#xA;ffmpeg version 2023-12-21-git-1e42a48e37-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;  libavutil      58. 36.100 / 58. 36.100&#xA;  libavcodec     60. 36.100 / 60. 36.100&#xA;  libavformat    60. 20.100 / 60. 20.100&#xA;  libavdevice    60.  4.100 / 60.  4.100&#xA;  libavfilter     9. 14.100 /  9. 14.100&#xA;  libswscale      7.  6.100 /  7.  6.100&#xA;  libswresample   4. 13.100 /  4. 13.100&#xA;  libpostproc    57.  4.100 / 57.  4.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;Out.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    title           : Short 4k video sample - 4K Ultra HD (3840x2160)&#xA;    date            : 2014:05:24 19:00:00&#xA;    encoder         : Lavf60.20.100&#xA;  Duration: 00:00:28.96, start: 0.000000, bitrate: 3181 kb/s&#xA;  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 3045 kb/s, 30 fps, 30 tbr, 15360 tbn (default)&#xA;      Metadata:&#xA;        handler_name    : VideoHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;        encoder         : Lavc60.36.100 libx264&#xA;  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)&#xA;      Metadata:&#xA;        handler_name    : SoundHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (copy)&#xA;  Stream #0:1 -> #0:1 (copy)&#xA;[segment @ 00000195bbc52940] Opening &#x27;Out 0.mp4&#x27; for writing&#xA;Output #0, segment, to &#x27;Out %1d.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    title           : Short 4k video sample - 4K Ultra HD (3840x2160)&#xA;    date            : 2014:05:24 19:00:00&#xA;    encoder         : Lavf60.20.100&#xA;  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 3045 kb/s, 30 fps, 30 tbr, 15360 tbn (default)&#xA;      Metadata:&#xA;        handler_name    : VideoHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;        encoder         : Lavc60.36.100 libx264&#xA;  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)&#xA;      Metadata:&#xA;        handler_name    : SoundHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;Press [q] to stop, [?] for help&#xA;[segment @ 00000195bbc52940] Opening &#x27;Out 1.mp4&#x27; for writing&#xA;[segment @ 00000195bbc52940] Opening &#x27;Out 2.mp4&#x27; for writing&#xA;[segment @ 00000195bbc52940] Opening &#x27;Out 3.mp4&#x27; for writing&#xA;[segment @ 00000195bbc52940] Opening &#x27;Out 4.mp4&#x27; for writing&#xA;[segment @ 00000195bbc52940] Opening &#x27;Out 5.mp4&#x27; for writing&#xA;[out#0/segment @ 00000195bc3e8cc0] video:10757kB audio:456kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown&#xA;size=N/A time=00:00:28.86 bitrate=N/A speed= 322x&#xA;

    &#xA;

  • PHP-FFMPEG Waveform is not clean, is it a bug ?

    6 février 2024, par Maxi

    I made a waveform through sample code :

    &#xA;

    $waveform = $audio->waveform(2000, 500, array(&#x27;#FFA500&#x27;));&#xA;$waveform->save(&#x27;waveform.png&#x27;);&#xA;

    &#xA;

    But result has some noise in top & bottom of edges.&#xA;How can make it better ?

    &#xA;

    PHP-FFMpeg : 23 | FFMpeg : 2023-02-27-git-891ed24f77 (Win X64) | PHP : 8.3

    &#xA;