When ffmpeg converts audio, the command line execution is normal, but the code does not work.
吉祥天宝
吉祥天宝 2019-03-29 12:09:32
0
4
1425

ffmpeg converts audio, the command line execution is normal, but the code does not work. In windows10, the environment variables are also set, and the command string generated by the code can be executed directly with cmd without any problem. In the code, $str = shell_exec($cmdstr); returns null

吉祥天宝
吉祥天宝

reply all(1)
懒觉先生

11111sszs on

  • reply Found the reason. Although ffmpeg.exe is set in the system environment variable, I don’t know why it cannot be found. This is the current solution: You need to add the cd command to enter the mmfpeg path. If it is not behind a drive letter, you need && e:, shell_exec(" cd 'mmfpeg path' && e: && ffmpeg -i aaa.wav aaa.mp3")
    吉祥天宝 author 2019-03-29 16:11:18
  • reply Hello, I encountered the same problem as you. I used your method but it didn’t work. Can you help me? shell_exec(" cd 'E:/XiangMu/jiaoyu/public' && E: && ffmpeg -i ./ceshi/15535626721777.amr ./ceshi/bb.mp3"); This works well for me in the cmd command but not in PHP. My personal contact information is 18345346462. WeChat synchronization. Thank you.
    小超 author 2019-03-30 13:12:47
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template