mysql - MP3 conversion using Cron? -
i have created php script moves wav files user has uploaded via ftp temporary directory. having problems running lame.exe when accessed via exec have decided run locally on vps , store source file names , destination names in table (for example called cronmp3).
i stuck go next. have queue files ready in mysql table, not sure how call them , process them, or put in cron file moving files not problem after conversion, able that.
to honest, mysql isn't great queues. recommend adding redis stack. in php using predis:
// when file uploaded // add whatever mysql // $mysqli->... // connect redis $redis = new predis\client(); // add $file encodequeue $redis->call('lpush', 'encodequeue', $file);
then in cronjob:
#!/bin/bash file=`redis-cli lpop encodequeue` lame $file -options > output... whatever
Comments
Post a Comment