ffmpeg version 3.0.7-0ubuntu0.16.10.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.2.0 (Ubuntu 6.2.0-5ubuntu12) 20161005
configuration: --prefix=/usr --extra-version=0ubuntu0.16.10.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libx264
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
z 0_hello_world.c
0_hello_world.c: In function ‘main’:
0_hello_world.c:84:3: error: unknown type name ‘AVCodecParameters’
AVCodecParameters *pCodecParameters = NULL;
^~~~~~~~~~~~~~~~~
0_hello_world.c:90:5: error: unknown type name ‘AVCodecParameters’
AVCodecParameters *pLocalCodecParameters = NULL;
^~~~~~~~~~~~~~~~~
0_hello_world.c:91:55: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’; did you mean ‘codec’?
pLocalCodecParameters = pFormatContext->streams[i]->codecpar;
^~
0_hello_world.c:103:61: error: request for member ‘codec_id’ in something not a structure or union
pLocalCodec = avcodec_find_decoder(pLocalCodecParameters->codec_id);
^~
0_hello_world.c:111:30: error: request for member ‘codec_type’ in something not a structure or union
if (pLocalCodecParameters->codec_type == AVMEDIA_TYPE_VIDEO) {
^~
0_hello_world.c:116:71: error: request for member ‘width’ in something not a structure or union
logging("Video Codec: resolution %d x %d", pLocalCodecParameters->width, pLocalCodecParameters->height);
^~
0_hello_world.c:116:101: error: request for member ‘height’ in something not a structure or union
logging("Video Codec: resolution %d x %d", pLocalCodecParameters->width, pLocalCodecParameters->height);
^~
0_hello_world.c:117:37: error: request for member ‘codec_type’ in something not a structure or union
} else if (pLocalCodecParameters->codec_type == AVMEDIA_TYPE_AUDIO) {
^~
0_hello_world.c:118:80: error: request for member ‘channels’ in something not a structure or union
logging("Audio Codec: %d channels, sample rate %d", pLocalCodecParameters->channels, pLocalCodecParameters->sample_rate);
^~
0_hello_world.c:118:113: error: request for member ‘sample_rate’ in something not a structure or union
logging("Audio Codec: %d channels, sample rate %d", pLocalCodecParameters->channels, pLocalCodecParameters->sample_rate);
^~
0_hello_world.c:122:104: error: request for member ‘bit_rate’ in something not a structure or union
logging("\tCodec %s ID %d bit_rate %lld", pLocalCodec->long_name, pLocalCodec->id, pCodecParameters->bit_rate);
^~
0_hello_world.c:134:7: warning: implicit declaration of function ‘avcodec_parameters_to_context’ [-Wimplicit-function-declaration]
if (avcodec_parameters_to_context(pCodecContext, pCodecParameters) < 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0_hello_world.c: In function ‘decode_packet’:
0_hello_world.c:207:18: warning: implicit declaration of function ‘avcodec_send_packet’ [-Wimplicit-function-declaration]
int response = avcodec_send_packet(pCodecContext, pPacket);
^~~~~~~~~~~~~~~~~~~
0_hello_world.c:218:16: warning: implicit declaration of function ‘avcodec_receive_frame’ [-Wimplicit-function-declaration]
response = avcodec_receive_frame(pCodecContext, pFrame);
^~~~~~~~~~~~~~~~~~~~~
@leandromoreira
emmm i just ’ sudo apt-get install libavresample-dev ’ now all of make process is right . 6666
I just stumbled across this issue due to not having
pkg-config
installed. My Makefile contained:The solution was:
this is in ubuntu
also I annotated the code
and i change make file
when all of that change, and it also has some warrings, this warings is because libchromaprint.so.0 , i fix it by build the latest https://github.com/acoustid/chromaprint.
but now it can works in ubuntu , may i should build ffmpeg ? i dont know.
thank u i will try