I am working on a php script that will blend two audio files into one using ffmpeg's amix feature and $ variables. It is set to automatically trim the final output's duration to the first inputs duration. (as seen with duration=first)
When I run this script it is not creating mixtest.mp3
mix.php:
<?php
$input1 = 'original.mp3'; // Original Track
$input2 = 'tagoverlay.mp3'; // Audio Tag Overlay
$output = 'mixtest.mp3';
shell_exec('ffmpeg -i ' . $input1 . ' -i ' . $input2 . ' -filter_complex amix=inputs=2:duration=first:dropout_transition=3 ' . $output . '');
echo 'Done';
?>
I am already using ffmpeg on server to convert wav's to mp3 and it works great. I have also seen sox can do this as well with -m, which I have installed and tried, for some reason it is not exporting the mixtest.mp3.