FFMPEG common errors

FFMPEG common errors

I am not writing about the installation of ffmpeg or ffmpeg-php and related binaries as there are plenty of tutorials out there in internet, but there are a few errors on which you often end up while installing ffmpeg. I’m scribbling down the errors which I’ve come across while installing ffmpeg.A couple of fixes for all errors, alteast one of it should fix the issue

Error

‘make’ fails with the following error

In file included from libavdevice/v4l.c:33:
/usr/include/linux/videodev.h:56: error: syntax error before “ulong”
/usr/include/linux/videodev.h:72: error: syntax error before ‘}’ token
libavdevice/v4l.c: In function `grab_read_header’:
libavdevice/v4l.c:75: error: storage size of ‘tuner’ isn’t known
libavdevice/v4l.c:133: error: invalid application of `sizeof’ to incomplete type `video_tuner’
libavdevice/v4l.c:140: error: invalid application of `sizeof’ to incomplete type `video_tuner’
libavdevice/v4l.c:75: warning: unused variable `tuner’

fix:

1)Uppgrade the linux and headers to 2.6.25 or higher (which is going to break your head and so no to it imo) or disable V4L and V4L2 during configuration. I dont think you’ll need V4L and V4L2 for your applications,so start over again after running the following commands in your ffmpeg source directory

make
make distclean
./configure –enable-libmp3lame –enable-libvorbis –disable-mmx –enable-shared –disable-demuxer=v4l –disable-demuxer=v4l2

2) edit the file /usr/include/linux/videodev.h using your favourate editor and go to line 56, replace the line as shown below

ulong rangelow, rangehigh; /* Tuner range */

change it to

unsigned long rangelow, rangehigh; /* Tuner range */

Error

checking for ffmpeg headers… configure: error: ffmpeg headers not found. Make sure you’ve built ffmpeg as shared libs using the –enable-shared option

1) install ffmpeg-devel, go get the stuff for your distro from google.
I downloaded rpm for centos4 from here http://cesium.di.uminho.pt/pub/centos/4.6/umdi/i386/RPMS/

2)Simply create a ffmpeg folder in /usr/local/include/ and run the following to copy all the header files

cp /usr/local/include/libavcodec/* /usr/local/include/ffmpeg
cp /usr/local/include/libavdevice/* /usr/local/include/ffmpeg
cp /usr/local/include/libavformat/* /usr/local/include/ffmpeg
cp /usr/local/include/libavutil/* /usr/local/include/ffmpeg
cp /usr/local/include/libswscale/* /usr/local/include/ffmpeg

Error

ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory

1) do ldconfig
2) find / -name ‘libavdevice.so.*’

once the find returns its path, export it using the following command

export LD_LIBRARY_PATH=<path>

Say for example if find returns the following path

/usr/local/src/ffmpeg/libavdevice/libavdevice.so.52
/usr/local/lib/libavdevice.so.52
/usr/local/lib/libavdevice.so.52.1.0

the export command would be

export LD_LIBRARY_PATH=/usr/local/lib/

Error

make: *** [ffmpeg_frame.lo] Error 1

1)Execute the following in the ffmpeg-php folder.
cp ffmpeg_frame.loT ffmpeg_frame.lo

Error

PHP Warning: PHP Startup: Unable to load dynamic
library ‘/usr/lib/php/modules/ffmpeg.so’ – /usr/lib/php/modules/ffmpeg.so: undefined symbol: >>le_ffmpeg_frame in Unknown on line 0

ffmpeg may be installed in /usr/bin or /usr/local/bin, php might be checking for the stuff in the wrong location

2 Responses »

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>