// Audio compress $inputAudio = public_path('/audio/myaudio.mp3'); $outputAudio = public_path('/output/outputAudio.mp3'); exec("ffmpeg -i $inputAudio -ab 64 $outputAudio"); // Video compress $inputVideo = public_path('/audio/myvideo.mp4'); $outputVideo = public_path('/output/outputVideo.mp4'); exec("ffmpeg -i $inputVideo -vf scale=1280:-1 -c:v libx264 -preset veryslow -crf 24 $outputVideo");
↧
Answer by aakash rajput for How to compress mp3 file in php
↧