I'm new to the ffmpeg development.
I've got my ffmpeg via ffmpeg.mplayerhq.hu/download.html using
`git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg`
My OS is Win7. I'm using Cygwin to help me work under a Unix-like environment.
I'm using tutorial code from http://dranger.com/ffmpeg/ffmpeg.html. My current code is Tutorial01.
So I've got my gcc, ffmpeg and code together. Working directory is /ffmpegDemo,
code: /ffmpegDemo/tutorial01.c
ffmpeg: /ffmpegDemo/ffmpeg
And I use command gcc-I ffmpeg -o t01 tutorial01.c to compile my code.
(cygwin doesn't support "copy", here're just some major message:)
libavutil/avconfig.h: No such file or directory
...
error: 'CODEC_TYPE_VIDEO' undeclared
...
and others are just warnings.
Indeed, there's no avconfig.h under ffmpeg/libavutil. I've looked for 'CODEC_TYPE_VIDEO', here's this reference: http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/avcodec_8h.html says that 'CODEC_TYPE_VIDEO' is defined in libavcodec/avcodec.h. I've checked avcodec.h and didn't find any.
I was very confused about this error and confused about all the "configure" and "make" things that I saw while searching for answer. Am I doing it wrong? Did I miss some steps? Hope that I could find an answer here.
Thanks.
Did you try to compile it with the the command provided by tutorial?
gcc -o tutorial01 tutorial01.c -lavutil -lavformat -lavcodec -lz -lavutil -lm
There are lots of API changes in FFMpeg and the tutorial hasn't been updated for a while. But I believe at least tutorial01 should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With