FFMPEG Problems with compiling Aleph One 1.1 on Ubuntu 13.10

Have a question, suggestion, or comment about Aleph One's features and functionality (Lua, MML, the engine itself, etc)? Post such topics here.
Post Reply
User avatar
JohannesG
Mjolnir Mark IV
Posts: 607
Joined: Jan 22nd '06, 23:52
Contact:

I recently switched to Linux full time and after hearing about Aleph One supporting the original Marathon data files (Thank you Trellama, and the rest of the devs!) I decided to set up Aleph One on my new Linux box. I am running Ubuntu 13.10 with 3.12.5-031205-generic kernel.

This is most likely trivial but I'm not the brightest one when it comes to compiling and such. Below I pasted the errors I get when running ./configure on Aleph One 1.1

Probably unimportant, decided to put it here just in case though.

Code: Select all

checking for sysctlbyname... no
Here's the thing that breaks. Seems like simple dependency problems but oddly enough I have FFMPEG (version 0.8.9-6:0.8.9-0ubuntu0.13.10.1) installed from the Ubuntu repositories. I also tried installing libavcodec53, libavformat53, libavutil51 and libswscale2 from the Ubuntu repos without luck.

Code: Select all

checking for FFMPEG... no
configure: error: Package requirements (libavcodec >= 53.35.0 libavformat >= 53.21.0 libavutil >= 51.22.0 libswscale >= 2.1.0) were not met:

No package 'libavcodec' found
No package 'libavformat' found
No package 'libavutil' found
No package 'libswscale' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables FFMPEG_CFLAGS
and FFMPEG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Thanks in advance! <3
User avatar
treellama
Vidmaster
Posts: 6110
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

Do you have the -dev versions of those packages installed?

libavcodec-dev
libavformat-dev
libavutil-dev
libswscale-dev

We need to get the wiki build instructions updated to reflect the addition of ffmpeg, sorry!

Configuration shouldn't fail if you don't have the ffmpeg libraries--it should just not compile that support in. Are you seeing it fail altogether?
User avatar
JohannesG
Mjolnir Mark IV
Posts: 607
Joined: Jan 22nd '06, 23:52
Contact:

The configuration failed and I couldn't make afterwards. (no makefile generated if I remember correctly)

I just tried installing the dev packages and now everything runs smoothly and detects FFMPEG.
User avatar
JohannesG
Mjolnir Mark IV
Posts: 607
Joined: Jan 22nd '06, 23:52
Contact:

PS: Treellama, if you need someone to help with documentation and such for the Linux builds then I am more than ready to look into it. Just let me know.
User avatar
treellama
Vidmaster
Posts: 6110
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

Thanks for the offer! In this case, it appears Hopper has already added the necessary commands for compiling under Ubuntu to the wiki.
User avatar
Hopper
Mjolnir Mark IV
Posts: 585
Joined: May 10th '09, 17:02
Contact:

If you're feeling generous, the README and INSTALL files that come with the releases haven't been touched in over 7 years, and are full of obsolete info and links. You'd have my undying gratitude if you could bring those in line with present reality, and that process would probably highlight where we need to beef up our site and/or wiki with clearer instructions.
User avatar
treellama
Vidmaster
Posts: 6110
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

^ this
User avatar
irons
Vidmaster
Posts: 2651
Joined: Mar 1st '06, 20:44
Location: (.Y.)
Contact:

I have a similar or related problem, this time during make:

Code: Select all

make[4]: Leaving directory `/home/jonirons/downloads/program/AlephOne-20140104'
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../Source_Files/CSeries -I../../Source_Files/Files -I../../Source_Files/GameWorld -I../../Source_Files/Input -I../../Source_Files/Misc -I../../Source_Files/ModelView -I../../Source_Files/Network -I../../Source_Files/Sound -I../../Source_Files/RenderMain -I../../Source_Files/RenderOther -I../../Source_Files/XML -I../../Source_Files -D__STDC_CONSTANT_MACROS -I/usr/include/libpng15    -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DSDL  -g -O2 -MT Movie.o -MD -MP -MF .deps/Movie.Tpo -c -o Movie.o Movie.cpp
Movie.cpp: In member function ‘bool Movie::Setup()’:
Movie.cpp:494:61: error: ‘AVStream’ has no member named ‘quality’
Movie.cpp: In member function ‘void Movie::EncodeVideo(bool)’:
Movie.cpp:618:21: warning: ‘int avcodec_encode_video(AVCodecContext*, uint8_t*, int, const AVFrame*)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:4272) [-Wdeprecated-declarations]
Movie.cpp:620:47: warning: ‘int avcodec_encode_video(AVCodecContext*, uint8_t*, int, const AVFrame*)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:4272) [-Wdeprecated-declarations]
make[3]: *** [Movie.o] Error 1
make[3]: Leaving directory `/home/jonirons/downloads/program/AlephOne-20140104/Source_Files/FFmpeg'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/jonirons/downloads/program/AlephOne-20140104/Source_Files'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jonirons/downloads/program/AlephOne-20140104'
make: *** [all] Error 2
A few things working against me already:
  • I'm on Gentoo (but at least I automatically have "dev" packages)
  • I'm running the latest available nvidia driver, which apparently causes all kinds of weird problems, but maybe not this one
Configure didn't complain about anything. Also, my last build of Aleph One (20130813) had no problems. I re-ran ./configure using --disable-ffmpeg and --disable-smpeg; compilation succeeded. As you know, though, I'm a huge fan of the cutscenes used in EMR, and I really need those as soon as possible.
User avatar
treellama
Vidmaster
Posts: 6110
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

What version of libav is in Gentoo stable?
User avatar
irons
Vidmaster
Posts: 2651
Joined: Mar 1st '06, 20:44
Location: (.Y.)
Contact:

v0.8.7. 100% confident that Gentoo is 10-12 years ahead of other distros in its package versions.
User avatar
treellama
Vidmaster
Posts: 6110
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

The quality member of AVStream is marked as deprecated in my avformat 0.8.9. We'll have to fix it on this end.

SMPEG should still work to play back those EMR cutscenes, though! It will probably be removed next release.
User avatar
irons
Vidmaster
Posts: 2651
Joined: Mar 1st '06, 20:44
Location: (.Y.)
Contact:

I'd file a bug, but I only do Agile development now.
User avatar
Wrkncacnter
Vidmaster
Posts: 1953
Joined: Jan 29th '06, 03:51
Contact:

I have a similar or related problem, this time during the download of the latest nightly.

I couldn't get the download to work. Please fix.
User avatar
irons
Vidmaster
Posts: 2651
Joined: Mar 1st '06, 20:44
Location: (.Y.)
Contact:

Treellama could fix this by reinstating nightly builds.
User avatar
JohannesG
Mjolnir Mark IV
Posts: 607
Joined: Jan 22nd '06, 23:52
Contact:

Hopper wrote:If you're feeling generous, the README and INSTALL files that come with the releases haven't been touched in over 7 years, and are full of obsolete info and links. You'd have my undying gratitude if you could bring those in line with present reality, and that process would probably highlight where we need to beef up our site and/or wiki with clearer instructions.
I'll take a look!
ChauSara
Spazeroid
Posts: 2
Joined: Jan 13th '14, 21:44

Going to hop in here with another compilation problem with ffmpeg on Linux, although it seems unrelated to these.

Code: Select all

Making all in FFmpeg
make[3]: Entering directory '/home/user/AlephOne-20140104/Source_Files/FFmpeg'
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../Source_Files/CSeries -I../../Source_Files/Files -I../../Source_Files/GameWorld -I../../Source_Files/Input -I../../Source_Files/Misc -I../../Source_Files/ModelView -I../../Source_Files/Network -I../../Source_Files/Sound -I../../Source_Files/RenderMain -I../../Source_Files/RenderOther -I../../Source_Files/XML -I../../Source_Files -D__STDC_CONSTANT_MACROS -I/usr/include/libpng16  -D_FORTIFY_SOURCE=2   -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DSDL -std=c99 -g -O2 -MT SDL_ffmpeg.o -MD -MP -MF .deps/SDL_ffmpeg.Tpo -c -o SDL_ffmpeg.o SDL_ffmpeg.c
SDL_ffmpeg.c: In function ‘SDL_ffmpegFree’:
SDL_ffmpeg.c:327:13: warning: ‘av_close_input_file’ is deprecated (declared at /usr/include/libavformat/avformat.h:1793) [-Wdeprecated-declarations]
             av_close_input_file( file->_ffmpeg );
             ^
SDL_ffmpeg.c: In function ‘SDL_ffmpegOpen’:
SDL_ffmpeg.c:498:66: error: ‘AVCODEC_MAX_AUDIO_FRAME_SIZE’ undeclared (first use in this function)
                     stream->sampleBuffer = ( int8_t* )av_malloc( AVCODEC_MAX_AUDIO_FRAME_SIZE * sizeof( int16_t ) );
                                                                  ^
SDL_ffmpeg.c:498:66: note: each undeclared identifier is reported only once for each function it appears in
SDL_ffmpeg.c: In function ‘SDL_ffmpegDecodeAudioFrame’:
SDL_ffmpeg.c:1965:21: error: ‘AVCODEC_MAX_AUDIO_FRAME_SIZE’ undeclared (first use in this function)
     int audioSize = AVCODEC_MAX_AUDIO_FRAME_SIZE * sizeof( int16_t );
                     ^
SDL_ffmpeg.c:2039:9: warning: ‘avcodec_decode_audio3’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3787) [-Wdeprecated-declarations]
         int len = avcodec_decode_audio3( file->audioStream->_ffmpeg->codec, ( int16_t* )file->audioStream->sampleBuffer, &audioSize, pack );
         ^
Makefile:284: recipe for target 'SDL_ffmpeg.o' failed
On an up-to-date Arch installation with this. Trying out the latest revision from the cvs doesn't seem to work either, although the problem source file hasn't been updated for a few months, so I can't imagine much difference.
User avatar
Hopper
Mjolnir Mark IV
Posts: 585
Joined: May 10th '09, 17:02
Contact:

Thanks for the report, ChauSara. Short answer is, FFmpeg's API changes a lot, and I didn't test recent enough releases before declaring it ready for 1.1.

Thanks to you too, irons. I still have no idea why it fails with that version, but I removed the problem call regardless. Anti-thanks to you and W'rk for being yourselves.

And while I'm at it, sorry about configure failing, JohannesG. I'm terrible at autoconf and must have screwed something up. Hopefully I can figure out what when I get the time.
ChauSara
Spazeroid
Posts: 2
Joined: Jan 13th '14, 21:44

Hopper wrote:Thanks for the report, ChauSara. Short answer is, FFmpeg's API changes a lot, and I didn't test recent enough releases before declaring it ready for 1.1.
Which version of FFmpeg did you test it against? I'm fine with Aleph One not being on the bleeding edge at all times, and I'll just downgrade to get it to work.
User avatar
Hopper
Mjolnir Mark IV
Posts: 585
Joined: May 10th '09, 17:02
Contact:

Mac and Windows builds use ffmpeg 0.10.x. Earlier in 2013, I'd tested through ffmpeg 1.2.x, but the late addition that broke irons' compile probably broke most newer versions.

If you're not interested in video export, FFmpeg is optional; just pass --disable-ffmpeg. The same sndfile, etc. will be used for decoding audio. You shouldn't need --disable-smpeg, which means you can still watch those wonderful cutscenes, irons.
patrick
Mjolnir Mark IV
Posts: 466
Joined: Sep 22nd '08, 17:10
Location: 末法

Hoppah wrote:you can still watch those wonderful cutscenes, irons.
{for now at least}
User avatar
irons
Vidmaster
Posts: 2651
Joined: Mar 1st '06, 20:44
Location: (.Y.)
Contact:

patrick wrote:{for now at least}
:(
Post Reply