PHP itself can't do that, so you need to use a library that you can run on the server to extract the audio. FFMPEG is such a library that can do that for you.
Here is a tutorial: https://adnan-tech.com/split-video-in-multiple-parts-php-ffmpeg/
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Simple Explanation needed for MP3 extraction!
Hi, can someone please explain how one would extract a mp3 or mp4 from a video on a webpage, just a simple step by step of what one would do for direction.
PHP itself can't do that, so you need to use a library that you can run on the server to extract the audio. FFMPEG is such a library that can do that for you.
Here is a tutorial: https://adnan-tech.com/split-video-in-multiple-parts-php-ffmpeg/
Please or to participate in this conversation.