Score:1

ffmpeg not working in php shell_exec

rs flag

I am new to ubuntu and currently working with apache on localhost. I've recently installed ffmpeg using sudo apt install ffmpeg. ffmpeg is working fine in terminal but when I use it in my php script I get the following output from ffmpeg:

/opt/lampstack-8.0.6-0/common/lib/libuuid.so.1: no version information available (required by /lib/x86_64-linux-gnu/libfontconfig.so.1) ffmpeg: symbol lookup error: /lib/x86_64-linux-gnu/libcairo.so.2: undefined symbol: FT_Get_Var_Design_Coordinates

I am using ffmpeg like below in my PHP script:

echo shell_exec('ffmpeg 2>&1');
FedKad avatar
cn flag
Did you try to use the full path in the PHP script? See `whereis ffmpeg` output.
Grewal Grewal avatar
rs flag
Yeah i also tried /usr/bin/ffmpeg
Grewal Grewal avatar
rs flag
which ffmpeg also outputs /usr/bin/ffmpeg
HuHa avatar
es flag
Please edit your question and add the output of `ldd $(which ffmpeg)`, formatted as _code_, i.e. with a line consisting of 3 backticks ``` before and after. My ffmpeg loads libuuid from `/lib/x86_64-linux-gnu/libuuid.so.1`; that path `/opt/lampstack-8.0.6-0/common/lib/libuuid.so.1` is suspicious. Do you have a custom `$LD_LIBRARY_PATH` in your Apache2 setup so it tries to load shared libs from `/opt/lampstack...`?
Grewal Grewal avatar
rs flag
adding ```export LD_LIBRARY_PATH="/lib/x86_64-linux-gnu/"``` worked for me. Thanks For Your Reply Sir. Apache was Setting Up The $LD_LIBRARY_PATH
Score:0
cn flag

I got the same issue. In my case, my problem were the directory's permissions, I mean, the directory where I wanted to save my video did not have the write permissions....that's all.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.