This is not possible in pure PHP. You will need to use command line executable services or web services.
The most popular command line executable for this is ffmpeg . Here is a lesson on how to remove audio / video streams from it: ffmpeg audio / video manipulation
From this tutorial - it looks pretty simple:
ffmpeg -i mandelbrot.flv -vn -acodec copy mandelbrot.mp3
Of course, there are tons of settings to configure and fine-tune the operation.
ffmpeg -, PHP .
- , , , .