1.8.6 won't compile with ‘AVCodecContext’ has no member...

The place to discuss linux version of MakeMKV
Post Reply
patgul
Posts: 5
Joined: Tue Nov 12, 2013 7:29 pm

1.8.6 won't compile with ‘AVCodecContext’ has no member...

Post by patgul »

Hi,

i'm running debian testing with packages from deb-multimedia.org:

libavcodec-dev:amd64 10:1.2.4-dmo3
libavcodec54:amd64 10:1.2.4-dmo3

However, make for oss is failing with:

Code: Select all

?  makemkv-oss-1.8.6  make -f makefile.linux                                                                                            
mkdir -p out
gcc -Os -D_GNU_SOURCE -D_linux_ -D_REENTRANT -shared -Wl,-z,defs -oout/libmakemkv.so.1.full -Ilibebml/inc -DEBML_NO_READ -DEBML_STRICT_API -Ilibmatroska/inc \
	-Ilibmakemkv/inc -Isstring/inc -Imakemkvgui/inc -Ilibabi/inc -Ilibffabi/inc \
	libebml/src/EbmlBinary.cpp libebml/src/EbmlContexts.cpp libebml/src/EbmlCrc32.cpp libebml/src/EbmlDate.cpp libebml/src/EbmlDummy.cpp libebml/src/EbmlElement.cpp libebml/src/EbmlFloat.cpp libebml/src/EbmlHead.cpp libebml/src/EbmlMaster.cpp libebml/src/EbmlSInteger.cpp libebml/src/EbmlString.cpp libebml/src/EbmlSubHead.cpp libebml/src/EbmlUInteger.cpp libebml/src/EbmlUnicodeString.cpp libebml/src/EbmlVersion.cpp libebml/src/EbmlVoid.cpp libebml/src/IOCallback.cpp libebml/src/MemIOCallback.cpp  libmatroska/src/FileKax.cpp libmatroska/src/KaxAttached.cpp libmatroska/src/KaxAttachments.cpp libmatroska/src/KaxBlock.cpp libmatroska/src/KaxBlockData.cpp libmatroska/src/KaxChapters.cpp libmatroska/src/KaxCluster.cpp libmatroska/src/KaxClusterData.cpp libmatroska/src/KaxContentEncoding.cpp libmatroska/src/KaxContexts.cpp libmatroska/src/KaxCues.cpp libmatroska/src/KaxCuesData.cpp libmatroska/src/KaxInfo.cpp libmatroska/src/KaxInfoData.cpp libmatroska/src/KaxSeekHead.cpp libmatroska/src/KaxSegment.cpp libmatroska/src/KaxTag.cpp libmatroska/src/KaxTags.cpp libmatroska/src/KaxTrackAudio.cpp libmatroska/src/KaxTrackEntryData.cpp libmatroska/src/KaxTracks.cpp libmatroska/src/KaxTrackVideo.cpp libmatroska/src/KaxVersion.cpp libmakemkv/src/ebmlwrite.cpp libmakemkv/src/libmkv.cpp libmakemkv/src/version.cpp libmakemkv/src/world.cpp  sstring/src/sstring.cpp \
	libabi/src/ossl_aes.c libabi/src/ossl_sha.c libabi/src/ossl_ec.c libabi/src/zlib.c libabi/src/xpat.c libabi/pssl/ec_key.c libabi/pssl/ec_lib.c libabi/pssl/ec_cvt.c libabi/pssl/ec_mult.c libabi/pssl/ecp_mont.c libabi/pssl/ecp_smpl.c libabi/pssl/ecs_ossl.c libabi/pssl/ecs_sign.c libabi/pssl/ecs_vrf.c libabi/src/httplinux.cpp makemkvgui/src/api_linux.cpp libabi/src/sys_linux.c makemkvgui/src/spawn_posix.cpp libffabi/src/ffabi.c libffabi/src/mlp.c libffabi/src/log.c libffabi/src/audio_convert.c \
	-DHAVE_BUILDINFO_H -Itmp \
	-fPIC -Xlinker -dy -Xlinker --version-script=libmakemkv/src/libmakemkv.vers \
	-Xlinker -soname=libmakemkv.so.1 -lc -lstdc++ -lcrypto -lz -lexpat -lavcodec -lavutil -lm
libffabi/src/ffabi.c: In function ‘ffm_audio_decode_init’:
libffabi/src/ffabi.c:166:15: error: ‘AVCodecContext’ has no member named ‘refcounted_frames’
     ctx->avctx->refcounted_frames = 1;
               ^
libffabi/src/ffabi.c: In function ‘ffm_audio_encode_init’:
libffabi/src/ffabi.c:321:15: error: ‘AVCodecContext’ has no member named ‘refcounted_frames’
     ctx->avctx->refcounted_frames = 1;
               ^
make: *** [out/libmakemkv.so.1.full] Error 1
I'm stuck with this, any help is appreciated!

Regards
belegdol
Posts: 26
Joined: Mon Mar 05, 2012 5:30 pm

Re: 1.8.6 won't compile with ‘AVCodecContext’ has no member.

Post by belegdol »

All I can tell you is that you need fairly recent ffmpeg, 2.1.0 works.
patgul
Posts: 5
Joined: Tue Nov 12, 2013 7:29 pm

Re: 1.8.6 won't compile with ‘AVCodecContext’ has no member.

Post by patgul »

Thanks for the tip. So it seems that i have to build ffmpeg 2 by myself, i'll try it tomorrow...
mike admin
Posts: 4075
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Re: 1.8.6 won't compile with ‘AVCodecContext’ has no member.

Post by mike admin »

patgul wrote:I'm stuck with this, any help is appreciated!Regards
It should work. Can you figure out what kind of libavcodec.h do you have is it from libav or from ffmpeg? What is the version (cat libavcodec/version.h)?
ylood
Posts: 2
Joined: Wed Nov 13, 2013 1:43 pm

Re: 1.8.6 won't compile with ‘AVCodecContext’ has no member.

Post by ylood »

Hello,

I have the same problem with CentOS 6 and ffmpeg-devel from the ATrpms.net repo: ffmpeg-devel-1.2.3-59.el6.x86_64

The libavcodec/version.h :

#define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MINOR 92
#define LIBAVCODEC_VERSION_MICRO 100
Romansh
Posts: 873
Joined: Sat Jan 22, 2011 7:09 pm

Re: 1.8.6 won't compile with ‘AVCodecContext’ has no member.

Post by Romansh »

mike admin wrote:
patgul wrote:I'm stuck with this, any help is appreciated!Regards
It should work. Can you figure out what kind of libavcodec.h do you have is it from libav or from ffmpeg? What is the version (cat libavcodec/version.h)?
FWIW, refcounting is very recent (only FFmpeg 2.0 or later, and not yet in any Libav release).
patgul
Posts: 5
Joined: Tue Nov 12, 2013 7:29 pm

Re: 1.8.6 won't compile with ‘AVCodecContext’ has no member.

Post by patgul »

Hi, it's from ffmpeg and version.h gives the same on my side:

Code: Select all

#define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MINOR 92
#define LIBAVCODEC_VERSION_MICRO 100
Regards

-- EDIT --

Just tried it with a fresh debian jessie VM, it gives the same error. Although libavcodec in this case is from libav...
barney_1
Posts: 2
Joined: Wed Nov 13, 2013 10:40 pm

Re: 1.8.6 won't compile with ‘AVCodecContext’ has no member.

Post by barney_1 »

I also cannot get 1.8.6 to compile.

I've tried it with both the git version and version 2.1 of FFMEG:

Code: Select all

ffmpeg -version
ffmpeg version 2.1
built on Nov 12 2013 23:10:15 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/home/barney/ffmpeg_build --extra-cflags=-I/home/barney/ffmpeg_build/include --extra-ldflags=-L/home/barney/ffmpeg_build/lib --bindir=/home/barney/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
libavutil      52. 48.100 / 52. 48.100
libavcodec     55. 39.100 / 55. 39.100
libavformat    55. 19.104 / 55. 19.104
libavdevice    55.  5.100 / 55.  5.100
libavfilter     3. 90.100 /  3. 90.100
libswscale      2.  5.101 /  2.  5.101
libswresample   0. 17.104 /  0. 17.104
libpostproc    52.  3.100 / 52.  3.100
But it bombs out with the same AVCodecContext error:

Code: Select all

make -f makefile.linux
mkdir -p out
gcc -Os -D_GNU_SOURCE -D_linux_ -D_REENTRANT -shared -Wl,-z,defs -oout/libmakemkv.so.1.full -Ilibebml/inc -DEBML_NO_READ -DEBML_STRICT_API -Ilibmatroska/inc \
	-Ilibmakemkv/inc -Isstring/inc -Imakemkvgui/inc -Ilibabi/inc -Ilibffabi/inc \
	libebml/src/EbmlBinary.cpp libebml/src/EbmlContexts.cpp libebml/src/EbmlCrc32.cpp libebml/src/EbmlDate.cpp libebml/src/EbmlDummy.cpp libebml/src/EbmlElement.cpp libebml/src/EbmlFloat.cpp libebml/src/EbmlHead.cpp libebml/src/EbmlMaster.cpp libebml/src/EbmlSInteger.cpp libebml/src/EbmlString.cpp libebml/src/EbmlSubHead.cpp libebml/src/EbmlUInteger.cpp libebml/src/EbmlUnicodeString.cpp libebml/src/EbmlVersion.cpp libebml/src/EbmlVoid.cpp libebml/src/IOCallback.cpp libebml/src/MemIOCallback.cpp  libmatroska/src/FileKax.cpp libmatroska/src/KaxAttached.cpp libmatroska/src/KaxAttachments.cpp libmatroska/src/KaxBlock.cpp libmatroska/src/KaxBlockData.cpp libmatroska/src/KaxChapters.cpp libmatroska/src/KaxCluster.cpp libmatroska/src/KaxClusterData.cpp libmatroska/src/KaxContentEncoding.cpp libmatroska/src/KaxContexts.cpp libmatroska/src/KaxCues.cpp libmatroska/src/KaxCuesData.cpp libmatroska/src/KaxInfo.cpp libmatroska/src/KaxInfoData.cpp libmatroska/src/KaxSeekHead.cpp libmatroska/src/KaxSegment.cpp libmatroska/src/KaxTag.cpp libmatroska/src/KaxTags.cpp libmatroska/src/KaxTrackAudio.cpp libmatroska/src/KaxTrackEntryData.cpp libmatroska/src/KaxTracks.cpp libmatroska/src/KaxTrackVideo.cpp libmatroska/src/KaxVersion.cpp libmakemkv/src/ebmlwrite.cpp libmakemkv/src/libmkv.cpp libmakemkv/src/version.cpp libmakemkv/src/world.cpp  sstring/src/sstring.cpp \
	libabi/src/ossl_aes.c libabi/src/ossl_sha.c libabi/src/ossl_ec.c libabi/src/zlib.c libabi/src/xpat.c libabi/pssl/ec_key.c libabi/pssl/ec_lib.c libabi/pssl/ec_cvt.c libabi/pssl/ec_mult.c libabi/pssl/ecp_mont.c libabi/pssl/ecp_smpl.c libabi/pssl/ecs_ossl.c libabi/pssl/ecs_sign.c libabi/pssl/ecs_vrf.c libabi/src/httplinux.cpp makemkvgui/src/api_linux.cpp libabi/src/sys_linux.c makemkvgui/src/spawn_posix.cpp libffabi/src/ffabi.c libffabi/src/mlp.c libffabi/src/log.c libffabi/src/audio_convert.c \
	-DHAVE_BUILDINFO_H -Itmp \
	-fPIC -Xlinker -dy -Xlinker --version-script=libmakemkv/src/libmakemkv.vers \
	-Xlinker -soname=libmakemkv.so.1 -lc -lstdc++ -lcrypto -lz -lexpat -lavcodec -lavutil -lm
libffabi/src/ffabi.c: In function ‘ffm_audio_decode_init’:
libffabi/src/ffabi.c:166:15: error: ‘AVCodecContext’ has no member named ‘refcounted_frames’
libffabi/src/ffabi.c: In function ‘ffm_audio_encode_init’:
libffabi/src/ffabi.c:321:15: error: ‘AVCodecContext’ has no member named ‘refcounted_frames’
make: *** [out/libmakemkv.so.1.full] Error 1
I'm guessing there's a "-dev" package missing but I can't figure out what it would be. Anyone else have some guesses?

Thanks!
pusalieth

Re: 1.8.6 won't compile with ‘AVCodecContext’ has no member.

Post by pusalieth »

Hey I to had this problem and was able to install it using a shotgun approach, here is a list of things done.

Added ffmpeg PPA: ppa:jon-severinsson/ffmpeg
sudo apt-get update; sudo apt-get autoclean; sudo apt-get -y autoremove; sudo apt-get -y dist-upgrade;
sudo apt-get install libavutil-extra-51
sudo apt-get install build-essential libc6-dev libssl-dev libexpat1-dev libavcodec-dev libgl1-mesa-dev libqt4-dev

And it worked, let me know if you had any problems and maybe I have packages you don't

Running Mint 64 Cinnamon
barney_1
Posts: 2
Joined: Wed Nov 13, 2013 10:40 pm

Re: 1.8.6 won't compile with ‘AVCodecContext’ has no member.

Post by barney_1 »

thanks pusalieth, that fixed it for me.

I did have to uninstall the bleeding edge libav I compiled as a previous attempt to get this build to happen (sudo make uninstall).

If anyone is wondering, here's the ffmpeg info after installing from that ppa:

Code: Select all

ffmpeg -version
ffmpeg version N-38577-g5231eec
patgul
Posts: 5
Joined: Tue Nov 12, 2013 7:29 pm

Re: 1.8.6 won't compile with ‘AVCodecContext’ has no member.

Post by patgul »

Hi,

a ppa won't help me as i'm on debian. And since i'm too lazy to mess around with ffmpeg compilation i just bought a key to use it with 1.8.5 (and spend the rest of the time with the kids)...

Nonetheless i am interested in a fix.

And Jon's ppa says it is sporting version 0.10.9, how can that succeed if a version >2.0 is needed?
pusalieth

Re: 1.8.6 won't compile with ‘AVCodecContext’ has no member.

Post by pusalieth »

A ppa will work with Debian, just add the repository, Ubuntu and Mint are debian based. sudo add-apt-repository "insert deb repository here" "version here". The versian of Debian is relatable to the version of Ubuntu, such as Debian 7 is quantal. If you have an older version of Debian follow the examples below.

Examples;
Debain 7
(add repository)
add-apt-repository 'deb http://ppa.launchpad.net/jon-severinsson/ffmpeg/ubuntu quantal main'
Older versions
(signing key)
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CFCA9579
(add repository to sources list)
echo 'deb http://ppa.launchpad.net/jon-severinsson/ffmpeg/ubuntu quantal main' >> /etc/apt/sources.list

And depending on whether you use the 16-bit audio encoding or 24-bit, you may have to compile a newer version, but this should give your system all the base packages.
Post Reply