obelix
obelix

Reputation: 890

Trying to use FFMPEG in C and Ubuntu

I have been trying to use FFMPEG in gcc under Ubuntu. I've done the linking stuff required in order to make my code compile but i get the following errors:

tutorial01.c:(.text+0x37d): undefined reference to `avcodec_decode_video'
tutorial01.c:(.text+0x3c5): undefined reference to `img_convert'

The source I use is the one from the following tutorial http://dranger.com/ffmpeg/tutorial01.c

(original link: http://dranger.com/ffmpeg/tutorial01.html)

I know that the source of the turotorial is quite old. So does anyone know of any new functions that replace the ones mentioned in the error messages??

ALso are there any updated documenation oin tutorial form that i could possibly use?

Thanks in advance !!

Upvotes: 0

Views: 270

Answers (1)

alk
alk

Reputation: 70941

You seem to be missing to link the library libavcodec.

Add the linker option -lavcodec and optionally provide the library's path using the open -L*1.


*1: Please note that -L needs to proceed -l. So if libmyname.a/.so resides in /some/path/ use: -L/some/path/ -lmyname

Upvotes: 1

Related Questions