Added config parameters for frequency shift feature

This commit is contained in:
Louis Croisez
2022-10-02 19:05:54 +02:00
parent 3dfd740944
commit 88a9b63458
4 changed files with 49 additions and 12 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ if(isset($_GET['shiftfile'])) {
$fn = $pp['filename'];
$ext = $pp['extension'];
$pi = $home."/BirdSongs/Extracted/By_Date/";
$cmd = "/usr/bin/nohup /usr/bin/ffmpeg -y -i \"".$pi.$filename."\" -af \"rubberband=pitch=2500/6000\" \"".$shifted_path.$filename."\"";
$cmd = "/usr/bin/nohup /usr/bin/ffmpeg -y -i \"".$pi.$filename."\" -af \"rubberband=pitch=".$config['FREQSHIFT_LO']."/".$config['FREQSHIFT_HI']."\" \"".$shifted_path.$filename."\"";
shell_exec("mkdir -p ".$shifted_path.$dir." && echo \"".$cmd."\" > /tmp/shift.sh && chmod +x /tmp/shift.sh");
shell_exec("/tmp/shift.sh");
shell_exec("rm -f /tmp/shift.sh");