Jump to content
php.lv forumi

mp3 converter


ziedinjsh

Recommended Posts

Saistībā ar Ziediņa jautāto.

 

ffmpeg.php un fails tranzits.mp3 ir vienā vietā. Kļūdu ziņošana ir E_ALL.

 

exec('ffmpeg -i tranzits.mp3 -acodec libmp3 -ab 128k -f flv tranzits.flv', $output = array(), $status);
print_r($output); // array()
print_r($status); // 1

exec('/usr/bin/ffmpeg -i tranzits.mp3 -acodec libmp3 -ab 128k -f flv tranzits.flv', $output = array(), $status);
print_r($output); // array()
print_r($status); // 1

exec('/usr/local/cpffmpeg/bin/ffmpeg -i tranzits.mp3 -acodec libmp3 -ab 128k -f flv tranzits.flv', $output, $status);
print_r($output); // array()
print_r($status); // 1

echo exec('ls -l /usr/bin/ffmpeg'); // lrwxrwxrwx 1 root root 30 Mar 18 2009 /usr/bin/ffmpeg -> /usr/local/cpffmpeg/bin/ffmpeg
echo exec('ls -1 /usr/local/cpffmpeg/bin/ffmpeg'); // /usr/local/cpffmpeg/bin/ffmpeg

 

Flv fails neparādās. Ir kādas idejas, kas ir pa lietu? Kā vispārīgi var testēt exec ierakstītās komandas?

Kaut kur lasīju, ka "libmp3" it kā ir jāpieliek pie ffmpeg un tad viņš jāliek augšā (jānokompilē?), kā var uzzināt vai viņš ir klāt esošajam ffmpeg vai nav?

 

Tas viss notiek uz ārzemēs esoša hostinga.

Edited by Aikss
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...