Installing ffmpeg

Support and queries relating to all previous versions of ZoneMinder
Locked
amp
Posts: 21
Joined: Fri Dec 09, 2005 10:53 pm
Location: Oak Ridge, TN

Installing ffmpeg

Post by amp »

Hi

I am attempting to install and make ffmpeg 0.4.8. From reading other posts on the forum, I went from ffmpeg 0.4.9-pre1 to 0.4.8.

The install went ok, but the make failed. See Error Messages. I appreciate any help. Thanks!

System specs:
zm v1.21.4
Distro: FC4
gcc: 4.0.0

Anthony

Error Messages

[root@aitsurv ffmpeg-0.4.8]# make
make -C libavcodec all
make[1]: Entering directory `/home/aitcam/downloads/ffmpeg-0.4.8/libavcodec'
gcc -g -O3 -Wall -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o common.o common.c
In file included from avcodec.h:14,
from common.c:27:
common.h:66: error: array type has incomplete element type
common.h:70: error: array type has incomplete element type
make[1]: *** [common.o] Error 1
make[1]: Leaving directory `/home/aitcam/downloads/ffmpeg-0.4.8/libavcodec'
make: *** [lib] Error 2
[root@aitsurv ffmpeg-0.4.8]#
"Truth is so obscure in these times and falsehood so established that unless you love the truth you will not know it."
Blaise Pascal
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Make sure you have removed all the files from the previous install. If the libraries or any thing is left it gets very cranky :wink:

Regards,
Corey
amp
Posts: 21
Joined: Fri Dec 09, 2005 10:53 pm
Location: Oak Ridge, TN

Post by amp »

Corey,

The error message is the same one for the frist attemp to make 0.9-pre1.

Anyway, how are the library files named or where are they located. I will surely rm them.

Thanks,
"Truth is so obscure in these times and falsehood so established that unless you love the truth you will not know it."
Blaise Pascal
illo41100
Posts: 13
Joined: Thu Dec 08, 2005 1:06 pm

Post by illo41100 »

amp wrote:Corey,

The error message is the same one for the frist attemp to make 0.9-pre1.

Anyway, how are the library files named or where are they located. I will surely rm them.

Thanks,
the problem is gcc 4!

use gcc3.5 -3.6 install ffmpeg without problem !!
amp
Posts: 21
Joined: Fri Dec 09, 2005 10:53 pm
Location: Oak Ridge, TN

Post by amp »

illo41100, Corey,
Hi,

Thanks for the tips. I have not gotten ffmpeg to make without many, many warnings / errors. Especially, when --mp3lame is used.

By the way, FC4 has gcc32. I used gcc32 to make but warning / errors were generated. See below for some of the warning / errors.

Two more things:

1. Where can I get gcc3.5 -3.6 for FC4? Will I be able to have gcc4, gcc32 and gcc3.* on FC4 without conflicts?

2. FC4 does not have xawtv. Where can I get xawtv with the necessary dependencies?

Thanks for your help!

WARNINGS / ERRORS

/home/ffmpeg/libavutil/common.h:579: warning: static declaration for `lrintf' follows non-static
gcc32 -O3 -g -Wall -Wno-switch -DHAVE_AV_CONFIG_H -I.. -I'/home/ffmpeg'/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o adpcm.o adpcm.c
In file included from /home/ffmpeg/libavutil/avutil.h:24,
from avcodec.h:14,
from adpcm.c:19:

mp3lameaudio.c:27:23: lame/lame.h: No such file or directory
mp3lameaudio.c:31: syntax error before "lame_global_flags"
mp3lameaudio.c:31: warning: no semicolon at end of struct or union
mp3lameaudio.c:35: syntax error before '}' token
mp3lameaudio.c:35: warning: type defaults to `int' in declaration of `Mp3AudioContext'
mp3lameaudio.c:35: warning: data definition has no type or storage class
mp3lameaudio.c: In function `MP3lame_encode_init':
mp3lameaudio.c:39: `s' undeclared (first use in this function)

mp3lameaudio.c:65: warning: implicit declaration of function `lame_get_framesize'
mp3lameaudio.c:73: warning: implicit declaration of function `lame_close'
mp3lameaudio.c: In function `MP3lame_encode_frame':
mp3lameaudio.c:139: `s' undeclared (first use in this function)
mp3lameaudio.c:147: warning: implicit declaration of function `lame_encode_buffer_interleaved'
mp3lameaudio.c:155: warning: implicit declaration of function `lame_encode_buffer'
mp3lameaudio.c:165: warning: implicit declaration of function `lame_encode_flush'
mp3lameaudio.c: In function `MP3lame_encode_close':
mp3lameaudio.c:201: `s' undeclared (first use in this function)
make[1]: *** [mp3lameaudio.o] Error 1
make[1]: Leaving directory `/home/ffmpeg/libavcodec'
make: *** [lib] Error 2
"Truth is so obscure in these times and falsehood so established that unless you love the truth you will not know it."
Blaise Pascal
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

The lame errors are because you don't have the lame-devel install most likely.
amp
Posts: 21
Joined: Fri Dec 09, 2005 10:53 pm
Location: Oak Ridge, TN

Post by amp »

Cordel,

Is lame-devel a rpm? I am going to look for it. Is there a recommended place to get it at?

Thanks!

Anthony
"Truth is so obscure in these times and falsehood so established that unless you love the truth you will not know it."
Blaise Pascal
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

You should get it from the same place you got lame and it should be the same version.

Regards,
Corey
amp
Posts: 21
Joined: Fri Dec 09, 2005 10:53 pm
Location: Oak Ridge, TN

Post by amp »

Cordel,

I obtained lame-devel*. Are there any other *-devel packages I should be aware of to make ffmpeg?

However, below is the error message from rpm -Uvh lame-devel*

Thanks!

warning: lame-devel-3.96.1-2.2.fc4.i386.rpm: Header V3 DSA signature: NOKEY, key ID e42d547b

error: Failed dependencies:
lame = 3.96.1 is needed by lame-devel-3.96.1-2.2.fc4.i386
"Truth is so obscure in these times and falsehood so established that unless you love the truth you will not know it."
Blaise Pascal
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Exactly as it says:
[quote=amp]error: Failed dependencies:
lame = 3.96.1 is needed by lame-devel-3.96.1-2.2.fc4.i386[/quote]

So you don't have lame installed or you have a different version.

Regards,
Corey
amp
Posts: 21
Joined: Fri Dec 09, 2005 10:53 pm
Location: Oak Ridge, TN

Post by amp »

G-day,

System specs:
zm v1.21.4
Distro: FC4
gcc: 3.2

I am using ffmpeg-0.4.8. Here is the error I am investigating after issueing the folllowing command:

# /usr/local/bin/zmu -q -d /dev/video2 -v
/usr/local/bin/zmu: error while loading shared libraries: libavformat.so.50: cannot open shared object file: No such file or directory

How do I obtain libavformat.so.50?

Thanks to a post I educated myself to ld.so.conf. I can update it with paths to the shared libraries. But I don't have libavformat.so.50.

The shared libraries are located in:
/usr/local/lib

This is what my ffmpeg ./configure looks like:

./configure --cc=gcc32 --enable-mp3lame --enable-libogg --enable-vorbis --enable-theora --enable-faad --enable-faadbin --enable-faac --enable-xvid --enable-a52 --enable-a52bin --enable-dts --enable-pp --enable-shared-pp --enable-shared --enable-gpl --enable-pthreads

#--enable-amr_nb --enable-amr_nb-fixed --enable-amr_wb --enable-amr_if2
#--enable-mingw32 --enable-sunmlib --enable-dc1394 --enable-libgsm
#--enable-x264

Back to my original questions:

How do I obtain libavformat.so.50?
Thanks!

amp
"Truth is so obscure in these times and falsehood so established that unless you love the truth you will not know it."
Blaise Pascal
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

libavformat.so should have been created when you built ffmpeg.

Corey
amp
Posts: 21
Joined: Fri Dec 09, 2005 10:53 pm
Location: Oak Ridge, TN

Post by amp »

G-day,

I need help fixing the permission problems logged in zmpkg.log and apache's error_log. Any further explanation is appreciated.

Thanks for your help!

Here is what I did to get ffmpeg and zm built
- I deleted the shared libraries in /usr/local/lib
- ./configure ffmpeg 0.4.8
- put /usr/local/lib in /etc/ld.so.conf
- ran ldconfig
- make
- make install

I pointed foxfire browser at http://localhost/zm:
- unauthentiicated console came up Stopped state
- ZM remained in Stopped state as I attempted to change the state to Start by using the drop down and typing Start in the text box.

What follows are the results of:
- zmpkg.log
- zmu -q -d /dev/video0 -v
- apache's error_log:

***********************************************************************
[root@aitsurv bin]# /usr/local/bin/zmu -q -d /dev/video0 -v
Video Capabilities
Name: BT878 video (GrandTec Multi Cap
Type: 171
Can capture
Can tune
Overlay onto frame buffer
Can clip
Scalable
Video Channels: 4
Audio Channels: 0
Maximum Width: 924
Maximum Height: 576
Minimum Width: 48
Minimum Height: 32
Window Attributes
X Offset: 0
Y Offset: 0
Width: 320
Height: 240
Picture Attributes
Palette: 4 - 24bit RGB
Colour Depth: 24
Brightness: 32768
Hue: 32768
Colour :32768
Contrast: 32768
Whiteness: 0
Channel 0 Attributes
Name: Composite0
Channel: 0
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 0 - PAL
Channel 1 Attributes
Name: Composite1
Channel: 1
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 0 - PAL
Channel 2 Attributes
Name: Composite2
Channel: 2
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 0 - PAL
Channel 3 Attributes
Name: Composite3
Channel: 3
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 0 - PAL
************************************************
[root@aitsurv bin]# cat /tmp/zmpkg.log
Command: start
Executing: /usr/local/bin/zmdc.pl check
Removing shared memory
Executing: /usr/local/bin/zmfix
/usr/local/bin/zmfix: error while loading shared libraries: /usr/lib/libpostproc.so.0: cannot restore segment prot after reloc: Permission denied
Executing: /usr/local/bin/zmdc.pl status
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/local/bin/zmdc.pl line 159.
Executing: /usr/local/bin/zmdc.pl start zmc -d /dev/video0
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/local/bin/zmdc.pl line 159.
Executing: /usr/local/bin/zmdc.pl start zmc -d /dev/video0
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/local/bin/zmdc.pl line 159.
Executing: /usr/local/bin/zmdc.pl start zmc -d /dev/video0
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/local/bin/zmdc.pl line 159.
Executing: /usr/local/bin/zmdc.pl start zmc -d /dev/video0
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/local/bin/zmdc.pl line 159.
Executing: /usr/local/bin/zmdc.pl start zmfilter.pl
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/local/bin/zmdc.pl line 159.
Executing: /usr/local/bin/zmdc.pl start zmaudit.pl -d 900 -y
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/local/bin/zmdc.pl line 159.
Executing: /usr/local/bin/zmdc.pl start zmwatch.pl
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/local/bin/zmdc.pl line 159.
Executing: /usr/local/bin/zmdc.pl start zmupdate.pl -c
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/local/bin/zmdc.pl line 159.
****************************************************************************

apache's error_log
[Fri Dec 30 01:32:53 2005] [error] [client 127.0.0.1] Premature end of script headers: zms, referer: http://localhost/zm/index.php?view=mont ... id=4&mode=
/usr/local/bin/zmu: error while loading shared libraries: /usr/lib/libpostproc.so.0: cannot restore segment prot after reloc: Permission denied
/usr/local/bin/zmu: error while loading shared libraries: /usr/lib/libpostproc.so.0: cannot restore segment prot after reloc: Permission denied
/usr/local/bin/zmu: error while loading shared libraries: /usr/lib/libpostproc.so.0: cannot restore segment prot after reloc: Permission denied
/usr/local/bin/zmu: error while loading shared libraries: /usr/lib/libpostproc.so.0: cannot restore segment prot after reloc: Permission denied
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/local/bin/zmdc.pl line 159.
Can't open log file: Permission denied at /usr/local/bin/zmdc.pl line 167.
Can't connect: Permission denied at /usr/local/bin/zmdc.pl line 159.
[root@aitsurv ~]#

------------------
System specs:
zm v1.21.4
Distro: FC4
gcc: 3.2
ffmpeg: 0.4.8
-------------------


Thanks!

Anthony
"Truth is so obscure in these times and falsehood so established that unless you love the truth you will not know it."
Blaise Pascal
RoKi
Posts: 1
Joined: Sat Jul 14, 2007 6:43 pm

Post by RoKi »

Late reply but just stumbled upon this post...

Changing SE Linux memory protection settings to allow all unconfined executables to use libraries requiring text relocation.

Best Regards
Locked