LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Need help installing ffmpeg, pls (https://www.linuxquestions.org/questions/linux-server-73/need-help-installing-ffmpeg-pls-821038/)

l3kris 07-20-2010 12:05 PM

Need help installing ffmpeg, pls
 
I have a Qnap NAS (TS-219). It's ARM-based but that's about what I know about it. I have picked up a little linux along the way but I've mainly relied on ipkg for my needs.

I'm running Gallery 3 on the webserver and would like it to show videos also. Using ipkg I installed ffmpeg (0.svn20080409-2). However, when trying to install ffmpeg-php I ran into problems.

Apparently, there is no ipkg for ffmpeg-php so I tried to compile it myself.

The error I'm getting is this:
Code:

[/share/MD0_DATA/Public/ffmpeg-php-0.6.0] # phpize
Configuring for:
PHP Api Version:        20041225
Zend Module Api No:      20060613
Zend Extension Api No:  220060519
[/share/MD0_DATA/Public/ffmpeg-php-0.6.0] # ./configure
checking for grep that handles long lines and -e... /opt/bin/grep
checking for egrep... /opt/bin/grep -E
checking for a sed that does not truncate output... /bin/sed
expr: syntax error
./configure: line 2545: test: =: unary operator expected
checking for cc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for icc... no
checking for suncc... no
checking whether gcc and cc understand -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... armv5tel-unknown-linux-gnu
checking host system type... armv5tel-unknown-linux-gnu
checking target system type... armv5tel-unknown-linux-gnu
checking for PHP prefix... /opt
checking for PHP includes... -I/opt/include/php -I/opt/include/php/main -I/opt/include/php/TSRM -I/opt/include/php/Zend -I/opt/include/php/ext -I/opt/include/php/ext/date/lib
checking for PHP extension directory... /opt/lib/php/extensions
checking for PHP installed headers prefix... /opt/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking for ffmpeg support... yes, shared
checking whether to force gd support in ffmpeg-php... no
checking for ffmpeg headers...
configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option

What I don't really understand is that - if I understand it correctly - then ffmpeg is already shared (checking for ffmpeg support... yes, shared)...
Can anybody help, pls?

I've tried to ipkg remove ffmpeg and instead compile ffmpeg myself, but being a genuine linux newbie I've had no succes so far...
Code:

[/share/MD0_DATA/Public/ffmpeg-0.6] # ./configure
mktemp: invalid option -- u
BusyBox v1.01 (2010.06.29-03:35+0000) multi-call binary

Usage: mktemp [-dq] TEMPLATE

Creates a temporary file with its name based on TEMPLATE.
TEMPLATE is any name with six `Xs' (i.e., /tmp/temp.XXXXXX).

Options:
        -d              Make a directory instead of a file
        -q              Fail silently if an error occurs

Unable to create temporary file in /tmp.


falmdavis 07-20-2010 12:27 PM

Quote:

ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option
What this error message means it that configure can not find the header files, which are the the .h files that describe ffmpeg. Sometimes, these type of header files are in what is called a development library, often named "-dev" or "-devel" in repositories.

You can download ffmpeg and try to build it yourself, however, it can be a daunting task as you will need many dependencies to work with the various video and audio formats. These are called "codecs". I've built ffmpeg this way, and it was a bit tedious.

http://packman.links2linux.org/package/ffmpeg

In this link, you can see some of the dependencies and the devel package for Suse.

http://ffmpeg.mplayerhq.hu/

This is the ffmpeg site to download the source code.

bathory 07-20-2010 12:30 PM

Hi,

ffmpeg-php needs ffmpeg built with the "--enable-shared" option.
I don't know why mktemp complains (maybe busybox mktemp is different from the gnu mktemp). Looking at the configure script
Quote:

if ! check_cmd type mktemp; then
# simple replacement for missing mktemp
# NOT SAFE FOR GENERAL USE
mktemp(){
echo "${2%XXX*}.${HOSTNAME}.${UID}.$$"
}
fi
it looks like you can move mktemp to a different place not in PATH, so configure can use it's own replacement.

l3kris 07-28-2010 05:26 AM

Thanks for your replies. I've been away for some days but I'll try the mktemp approach. I'll return with the results...


All times are GMT -5. The time now is 06:23 PM.