xtoffmpeg.c:61:29: error: ffmpeg/avdevice.h: No such file or directory
xtoffmpeg.c: In function 'xvc_ffmpeg_save_frame':
xtoffmpeg.c:1436: warning: implicit declaration of function 'avdevice_register_all'
xtoffmpeg.c:1768: error: incompatible type for argument 1 of 'url_fclose'
xtoffmpeg.c: In function 'xvc_ffmpeg_clean':
xtoffmpeg.c:1833: error: incompatible type for argument 1 of 'url_fclose'
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I've investigated a bit, and I found this behaviour
case 1:
./configure --prefix=/usr --enable-libtheora --with-x
This works fine
case 2:
sh autogen.sh
./configure --prefix=/usr --enable-libtheora --with-x
This fails
$ ./configure --prefix=/usr --enable-libtheora --with-x
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
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 dependency style of gcc... gcc3
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for msgfmt... /usr/bin/msgfmt
checking for perl... /usr/bin/perl
checking for XML::Parser... ok
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking for a sed that does not truncate output... /usr/bin/sed
checking for bc... /usr/bin/bc
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for scrollkeeper-config... /usr/bin/scrollkeeper-config
checking for docbook2x-man... no
configure: Couldn't find docbook2x-man to generate current man pages. Will try db2x_docbook2man.
checking for db2x_docbook2man... no
configure: Couldn't find neither docbook2x-man nor db2x_docbook2man to generate current man pages. Will install pre-generated ones if present.
checking for xml2po... no
configure: Couldn't find xml2po to translate current man pages. Will install pre-generated ones if present.
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for ngettext in libc... yes
checking for dgettext in libc... yes
checking for bind_textdomain_codeset... yes
checking for msgfmt... (cached) /usr/bin/msgfmt
checking for dcgettext... yes
checking if msgfmt accepts -c... yes
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... (cached) /usr/bin/xgettext
checking for catalogs to be installed... de en it es
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for PACKAGE... yes
checking for XmuClientWindow in -lXmu... yes
checking for XFixesGetCursorImage in -lXfixes... yes
checking for XDamageSubtract in -lXdamage... yes
checking for pow in -lm... yes
checking for lame_init in -lmp3lame... yes
checking for ogg_sync_init in -logg... yes
checking for theora_encode_init in -ltheora... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
make-ing prerequisite ffmpeg libraries
Unknown option "--enable-libogg".
See ./configure --help for available options.
checking for av_rescale in -lavutil... (static?) ... yes
checking for sws_scale in -lswscale... (static?) ... no
checking for sws_scale in -lswscale... no
checking for avcodec_encode_video in -lavcodec... (static?) ... yes
checking for av_write_header in -lavformat... (static?) ... yes
checking for avdevice_register_all in -lavdevice... (static?) ... no
checking for avdevice_register_all in -lavdevice... no
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for stdint.h... (cached) yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking stat.h usability... no
checking stat.h presence... no
checking for stat.h... no
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether gcc needs -traditional... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for fdatasync... yes
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for munmap... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strstr... yes
checking for getopt_long... yes
configure: creating ./config.status
config.status: creating doc/Makefile
config.status: creating doc/xvidcap/Makefile
config.status: creating doc/xvidcap/C/Makefile
config.status: creating doc/xvidcap/de/Makefile
config.status: creating doc/xvidcap/it/Makefile
config.status: creating doc/xvidcap/es/Makefile
config.status: creating doc/man/Makefile
config.status: creating doc/man/C/Makefile
config.status: creating doc/man/de/Makefile
config.status: creating doc/man/it/Makefile
config.status: creating doc/man/es/Makefile
config.status: creating po/Makefile.in
config.status: creating debian/Makefile
config.status: creating src/Makefile
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing intltool commands
config.status: executing default-1 commands
config.status: executing po/stamp-it commands
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmmm,
there's two things here:
1. xvidcap's configure passes an incorrect argument to ffmpeg's configure (the libogg stuff). Ahem, I'm afraid you can see how often I use that feature.
2. even though no completely working ffmpeg was detected, xvidcap tries to use ffmpeg.
Both should be fixed in current SVN. Can you try that?
Karl.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been able to compile xvidcap 1.1.7 from sourceforge.net with some modifications.
My system is: SuSe 11.0 X86_64 with the newest ffmpeg installed.
Following patches are required:
-in src directory: in files codecs.c main.c xtoffmpeg.c
replace ffmpeg/avcodec.h with ffmpeg/libavcodec/avcodec.h
ffmpeg/avformat.h with ffmpeg/libavformat/avformat.h
ffmpeg/avdevice.h with ffmpeg/libavdevice/avdevice.h
ffmpeg/swscale.h with ffmpeg/libswscale/swscale.h
ffmpeg/fifo.h with ffmpeg/libavutil/fifo.h
-in ffmpeg/libavcodec directory: in file avcodec.h
add at the very beginning of the existing file:
#ifndef AVCODEC_AVCODEC_H
#define AVCODEC_AVCODEC_H
#endif
-in src directory: in Makefile
add the following file at the very end of LIBS
/home/myhome/xvidcap-1.1.7/ffmpeg/libavcodec/libavcodec.a
NOTE: replace /home/myhome with the exact location of the
directory of the source files for xvidcap-1.1.7 source.
Reasons for the patches:
(1) Although I have the newest ffmpeg installed in my system,
the included files for the embeded ffmpeg in xvid-1.1.7 must
be used because the current code of xvid-1.1.7 contains many
obsolete functions. In particular the function av_free_static
has been removed from ffmpeg but is in the xvid-1.1.7 code.
(2) In the current source code of xvid-1.1.7 at sourceforge.net
the location of the include files is incorrect. Consequently,
the files codecs.c main.c and xtoffmpeg.c must be changed.
(3) In my system, the avcodec.h contains the keyword AVCODEC_AVCODEC_H. Define this in the avcodec.h of the embeded
ffmpeg will prevent two different avcodec.h files being used
simultaneously.
(4) Although I am using the ffmpeg libraries of my system,
the libavcodec.a of the embeded ffmpeg must be searched last
to pick up obsolete functions such as av_free_static.
17 December 2008
I am not logged in, hopefully, this post will appear on the forum as it may be useful.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, it is quite common for some version of xvidcap to not work with more recent versions of ffmpeg.
Therefore, my first question is: Why don't you just use the version embedded? Is there a problem with that for you?
Reg. (2): What do you mean, the location for included files is incorrect? <ffmpeg/avcodec.h> should find it in /usr/include/ffmpeg/avcodec.h or /...xvidcap-source/ffmpeg/avcodec.h whatever configure determines.
Reg. (3): If the embedded avcodec.h has all the symbols you need, why do you use the new ffmpeg?
Reg. (4): If you actually have successfully built libavcodec.a with xvidcap, why do you need the other ffmpeg? And how does using the other ffmpeg help you build xvidcap, if you apparently have also built the version embedded?
Karl.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is in response to your queries to my previous posting.
I built the xvidcap-1.1.7 source code from sourceforge.net and followed the instruction in the INSTALL file of the source code, ie: configure and make. The make comand created some errors and I used the output of the compiler to correct the mistakes. This is the main basis of the patches I posted in this forum.
The main mistake is that the include files for the ffmpeg are located at xvidcap-source/ffmpeg/libavcodec/avcodec.h in the sourceforge.net package (please note that they are not in the xvid-souce/ffmpeg/avcodec.h etc). Consequently, the included statements in the xvidcap-source/src must be amended. I have re-downloaded a source copy from sourceforge.net and confirmed that the included files are at
xvidcap-source/ffmpeg/libavcodec/avcodec.h . (Similarly,
in the ffmpeg installed in my system, the included files are
located at /usr/include/libavcodec/avcodec.h or /usr/include/libavformat/libavformat.h ).
To sum-up, in both the embedded ffmpeg and the installed ffmpeg in my system, there are subdirectories in the ffmpeg directory. Please check whether your system is the same.
The configure does not automatically amend the codecs.c , main.c and xtoffmpeg.c files for the exact location of the include files.
After I amended the source codes to the correct location for the
include files, I recompiled the xvid-1.1.7 source tree successfully except for the final loader report which stated that it could not find the function av_free_static. I searched through the installed ffmpeg in my system and found that the function av_free_static was declared by the most recent ffmpeg as deprecated and removed. I found two solutions for the problem: either to comment out the call av_free_static or to include the static library of the embedded ffmpeg as the last library to be searched by the gcc loader. Either solutions worked fine.
I used the compiled xvidcap-1.1.7 for the last two weeks to capture outputs from openGL programs successfully with 100% capture rate. It is a significant improvement from version 1.1.6 with much lower capture rate.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is all due to an API change in ffmpeg. I've checked out a recent version and found that it now stores its include files as /usr/include/libavcodec/avcodec.h /usr/include/libavutil/avutil.h etc. where originally they were all below /usr/include/ffmpeg.
So, before I upgrade xvidcap to a new version of ffmpeg, I'd be interested in your original problem with the bundled version.
Karl.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, xvidcap fails to compile with this error:
xtoffmpeg.c:61:29: error: ffmpeg/avdevice.h: No such file or directory
xtoffmpeg.c: In function 'xvc_ffmpeg_save_frame':
xtoffmpeg.c:1436: warning: implicit declaration of function 'avdevice_register_all'
xtoffmpeg.c:1768: error: incompatible type for argument 1 of 'url_fclose'
xtoffmpeg.c: In function 'xvc_ffmpeg_clean':
xtoffmpeg.c:1833: error: incompatible type for argument 1 of 'url_fclose'
Hi,
I'd suppose you are not building against the included version of ffmpeg.
Please provide your exact configure options and output of configure.
Karl.
Hi, I've investigated a bit, and I found this behaviour
case 1:
./configure --prefix=/usr --enable-libtheora --with-x
This works fine
case 2:
sh autogen.sh
./configure --prefix=/usr --enable-libtheora --with-x
This fails
$ ./configure --prefix=/usr --enable-libtheora --with-x
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
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 dependency style of gcc... gcc3
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for msgfmt... /usr/bin/msgfmt
checking for perl... /usr/bin/perl
checking for XML::Parser... ok
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking for a sed that does not truncate output... /usr/bin/sed
checking for bc... /usr/bin/bc
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for scrollkeeper-config... /usr/bin/scrollkeeper-config
checking for docbook2x-man... no
configure: Couldn't find docbook2x-man to generate current man pages. Will try db2x_docbook2man.
checking for db2x_docbook2man... no
configure: Couldn't find neither docbook2x-man nor db2x_docbook2man to generate current man pages. Will install pre-generated ones if present.
checking for xml2po... no
configure: Couldn't find xml2po to translate current man pages. Will install pre-generated ones if present.
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for ngettext in libc... yes
checking for dgettext in libc... yes
checking for bind_textdomain_codeset... yes
checking for msgfmt... (cached) /usr/bin/msgfmt
checking for dcgettext... yes
checking if msgfmt accepts -c... yes
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... (cached) /usr/bin/xgettext
checking for catalogs to be installed... de en it es
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for PACKAGE... yes
checking for XmuClientWindow in -lXmu... yes
checking for XFixesGetCursorImage in -lXfixes... yes
checking for XDamageSubtract in -lXdamage... yes
checking for pow in -lm... yes
checking for lame_init in -lmp3lame... yes
checking for ogg_sync_init in -logg... yes
checking for theora_encode_init in -ltheora... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
make-ing prerequisite ffmpeg libraries
Unknown option "--enable-libogg".
See ./configure --help for available options.
checking for av_rescale in -lavutil... (static?) ... yes
checking for sws_scale in -lswscale... (static?) ... no
checking for sws_scale in -lswscale... no
checking for avcodec_encode_video in -lavcodec... (static?) ... yes
checking for av_write_header in -lavformat... (static?) ... yes
checking for avdevice_register_all in -lavdevice... (static?) ... no
checking for avdevice_register_all in -lavdevice... no
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for stdint.h... (cached) yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking stat.h usability... no
checking stat.h presence... no
checking for stat.h... no
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether gcc needs -traditional... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for fdatasync... yes
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for munmap... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strstr... yes
checking for getopt_long... yes
configure: creating ./config.status
config.status: creating doc/Makefile
config.status: creating doc/xvidcap/Makefile
config.status: creating doc/xvidcap/C/Makefile
config.status: creating doc/xvidcap/de/Makefile
config.status: creating doc/xvidcap/it/Makefile
config.status: creating doc/xvidcap/es/Makefile
config.status: creating doc/man/Makefile
config.status: creating doc/man/C/Makefile
config.status: creating doc/man/de/Makefile
config.status: creating doc/man/it/Makefile
config.status: creating doc/man/es/Makefile
config.status: creating po/Makefile.in
config.status: creating debian/Makefile
config.status: creating src/Makefile
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing intltool commands
config.status: executing default-1 commands
config.status: executing po/stamp-it commands
Hmmm,
there's two things here:
1. xvidcap's configure passes an incorrect argument to ffmpeg's configure (the libogg stuff). Ahem, I'm afraid you can see how often I use that feature.
2. even though no completely working ffmpeg was detected, xvidcap tries to use ffmpeg.
Both should be fixed in current SVN. Can you try that?
Karl.
I have been able to compile xvidcap 1.1.7 from sourceforge.net with some modifications.
My system is: SuSe 11.0 X86_64 with the newest ffmpeg installed.
Following patches are required:
-in src directory: in files codecs.c main.c xtoffmpeg.c
replace ffmpeg/avcodec.h with ffmpeg/libavcodec/avcodec.h
ffmpeg/avformat.h with ffmpeg/libavformat/avformat.h
ffmpeg/avdevice.h with ffmpeg/libavdevice/avdevice.h
ffmpeg/swscale.h with ffmpeg/libswscale/swscale.h
ffmpeg/fifo.h with ffmpeg/libavutil/fifo.h
-in ffmpeg/libavcodec directory: in file avcodec.h
add at the very beginning of the existing file:
#ifndef AVCODEC_AVCODEC_H
#define AVCODEC_AVCODEC_H
#endif
-in src directory: in Makefile
add the following file at the very end of LIBS
/home/myhome/xvidcap-1.1.7/ffmpeg/libavcodec/libavcodec.a
NOTE: replace /home/myhome with the exact location of the
directory of the source files for xvidcap-1.1.7 source.
Reasons for the patches:
(1) Although I have the newest ffmpeg installed in my system,
the included files for the embeded ffmpeg in xvid-1.1.7 must
be used because the current code of xvid-1.1.7 contains many
obsolete functions. In particular the function av_free_static
has been removed from ffmpeg but is in the xvid-1.1.7 code.
(2) In the current source code of xvid-1.1.7 at sourceforge.net
the location of the include files is incorrect. Consequently,
the files codecs.c main.c and xtoffmpeg.c must be changed.
(3) In my system, the avcodec.h contains the keyword AVCODEC_AVCODEC_H. Define this in the avcodec.h of the embeded
ffmpeg will prevent two different avcodec.h files being used
simultaneously.
(4) Although I am using the ffmpeg libraries of my system,
the libavcodec.a of the embeded ffmpeg must be searched last
to pick up obsolete functions such as av_free_static.
17 December 2008
I am not logged in, hopefully, this post will appear on the forum as it may be useful.
Well, it is quite common for some version of xvidcap to not work with more recent versions of ffmpeg.
Therefore, my first question is: Why don't you just use the version embedded? Is there a problem with that for you?
Reg. (2): What do you mean, the location for included files is incorrect? <ffmpeg/avcodec.h> should find it in /usr/include/ffmpeg/avcodec.h or /...xvidcap-source/ffmpeg/avcodec.h whatever configure determines.
Reg. (3): If the embedded avcodec.h has all the symbols you need, why do you use the new ffmpeg?
Reg. (4): If you actually have successfully built libavcodec.a with xvidcap, why do you need the other ffmpeg? And how does using the other ffmpeg help you build xvidcap, if you apparently have also built the version embedded?
Karl.
Response to Karl,
Dear Karl,
This is in response to your queries to my previous posting.
I built the xvidcap-1.1.7 source code from sourceforge.net and followed the instruction in the INSTALL file of the source code, ie: configure and make. The make comand created some errors and I used the output of the compiler to correct the mistakes. This is the main basis of the patches I posted in this forum.
The main mistake is that the include files for the ffmpeg are located at xvidcap-source/ffmpeg/libavcodec/avcodec.h in the sourceforge.net package (please note that they are not in the xvid-souce/ffmpeg/avcodec.h etc). Consequently, the included statements in the xvidcap-source/src must be amended. I have re-downloaded a source copy from sourceforge.net and confirmed that the included files are at
xvidcap-source/ffmpeg/libavcodec/avcodec.h . (Similarly,
in the ffmpeg installed in my system, the included files are
located at /usr/include/libavcodec/avcodec.h or /usr/include/libavformat/libavformat.h ).
To sum-up, in both the embedded ffmpeg and the installed ffmpeg in my system, there are subdirectories in the ffmpeg directory. Please check whether your system is the same.
The configure does not automatically amend the codecs.c , main.c and xtoffmpeg.c files for the exact location of the include files.
After I amended the source codes to the correct location for the
include files, I recompiled the xvid-1.1.7 source tree successfully except for the final loader report which stated that it could not find the function av_free_static. I searched through the installed ffmpeg in my system and found that the function av_free_static was declared by the most recent ffmpeg as deprecated and removed. I found two solutions for the problem: either to comment out the call av_free_static or to include the static library of the embedded ffmpeg as the last library to be searched by the gcc loader. Either solutions worked fine.
I used the compiled xvidcap-1.1.7 for the last two weeks to capture outputs from openGL programs successfully with 100% capture rate. It is a significant improvement from version 1.1.6 with much lower capture rate.
This is all due to an API change in ffmpeg. I've checked out a recent version and found that it now stores its include files as /usr/include/libavcodec/avcodec.h /usr/include/libavutil/avutil.h etc. where originally they were all below /usr/include/ffmpeg.
So, before I upgrade xvidcap to a new version of ffmpeg, I'd be interested in your original problem with the bundled version.
Karl.