Monthly Archives: May 2009

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

Reboot command in a VPS

Reboot command in a VPS

Did you ever try restarting your virtuozzo VPS by hitting the ‘reboot’ command inside the VPS? If you’ve done, you might have had troubles in having it back online automatically. ‘reboot’ command works in a different way inside a VPS unlike a dedicated server. when you issue this command, VPS is stopped and started by a different script in the hardware node which is executed  in every minute.

When you hit reboot command inside the VPS, it invokes reboot system call with argument ‘restart’, which has to be handled by BIOS in normal cases. But since its a VPS, the system call is blocked from within since the VPS shouldnt talk directly with bios, which otherwise can result in a reboot of hardware node! So internelly, the reboot command is being handled this way

1. the VPS is simply stopped when reboot command is issues from within.
2. VPS is started again using a script /etc/sysconfig/vz-scripts/vereboot which is invoked automatically using a cron job specified in  /etc/cron.d/vereboot in ever 1 or 2 minutes depending on the cron

So its a better Idea to go for VZPP to get your virtuozzo VE rebooted rather than issuing a reboot command

Tweekdeck on Ubuntu 9.04

Tweekdeck on Ubuntu 9.04

Did anyone of you try to install TweekDeck on ubuntu 9.04 and gave up
just because it did not get downloaded when you try to click on the
download link? even I did, at the first attempt :p

Well, It needs Flash and Air to be installed in the machine. You can
get Flash and Air through the following links.

FLASH

AIR

To install AIR

chmod +x AdobeAIRInstaller.bin
sudo ./AdobeAIRInstaller.bin

You might need a reboot to get the download link working.

However, you can get the current ’0.25′ version by clicking on the
‘Version 0.25 is right corner of tweetdeck.com home page!

Happy tweetting!!