problem compiling, ffmpeg related?

Forum for questions and support relating to the 1.26.x releases only.
Locked
multiplex
Posts: 10
Joined: Thu Dec 09, 2010 2:32 pm

problem compiling, ffmpeg related?

Post by multiplex »

hello everyone.. what i expected to be a simple upgrade as turned to :oops:

i recently upgraded to 12.04 Ubuntu (prior to upgrade)

i'm upgrading 1.25 to 1.26.3 from source

i get this during make



zm_ffmpeg_camera.cpp:85: undefined reference to `avformat_close_input'
zm_ffmpeg_camera.o: In function `FfmpegCamera::PrimeCapture()':
zm_ffmpeg_camera.cpp:118: undefined reference to `avformat_open_input'
zm_ffmpeg_camera.cpp:126: undefined reference to `avformat_find_stream_info'
zm_ffmpeg_camera.cpp:157: undefined reference to `avcodec_open2'
zm_mpeg.o: In function `VideoStream::SetupCodec(int, int, int, int, int, double)':
zm_mpeg.cpp:141: undefined reference to `avformat_new_stream'
zm_mpeg.o: In function `VideoStream::SetParameters()':
zm_mpeg.cpp:198: undefined reference to `avformat_write_header'
zm_mpeg.o: In function `VideoStream::OpenStream()':
zm_mpeg.cpp:248: undefined reference to `avcodec_open2'
zm_mpeg.cpp:317: undefined reference to `avformat_write_header'
zm_mpeg.o: In function `VideoStream::SetParameters()':
zm_mpeg.cpp:198: undefined reference to `avformat_write_header'
zm_mpeg.o: In function `encode_frame':
zm_mpeg.cpp:40: undefined reference to `avcodec_encode_video2'
zm_remote_camera_rtsp.o: In function `RemoteCameraRtsp::PrimeCapture()':
zm_remote_camera_rtsp.cpp:189: undefined reference to `avcodec_open2'
zm_sdp.o: In function `SessionDescriptor::generateFormatContext() const':
zm_sdp.cpp:340: undefined reference to `avformat_new_stream'
collect2: ld returned 1 exit status
make[2]: *** [zmc] Error 1
[/quote]


This appears to be ffmpeg related, and i've tried a number of different versions as I read older versions work better on ZM? I tried current release and .10 along with the version provided by apt-get

any pointers?

Thanks!
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: problem compiling, ffmpeg related?

Post by Magic919 »

What does your configure command look like?
-
multiplex
Posts: 10
Joined: Thu Dec 09, 2010 2:32 pm

Re: problem compiling, ffmpeg related?

Post by multiplex »

./configure --with-webdir=/usr/share/zoneminder --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --with-ffmpeg=/usr/local/lib CPPFLAGS=-D__STDC_CONSTANT_MACROS

I did manage to get a little further. Looks like i needed the dev packages of a few 'libav' components. libavutil-dev, libavdevice-dev, libavcodev-dev, libavformat-dev, libswscale-dev

now im only left with

zm_mpeg.o: In function `encode_frame':
/home/ppp-admin/ZoneMinder-1.26.3/src/zm_mpeg.cpp:40: undefined reference to `avcodec_encode_video2'

figuring it might be another library needed.
multiplex
Posts: 10
Joined: Thu Dec 09, 2010 2:32 pm

Re: problem compiling, ffmpeg related?

Post by multiplex »

seems as though the compiled version of ffmpeg i had installed was fighting with the packaged version. I uninstalled ffmpeg from source and things cleared up :roll:

now i'm fighting a memory map error with zmwatch.pl - can't write to the given location

usually things go smoother for me :lol:
multiplex
Posts: 10
Joined: Thu Dec 09, 2010 2:32 pm

Re: problem compiling, ffmpeg related?

Post by multiplex »

seems as though an error occured while migrating my DB from 1.25.0 to 1.26.3.

I ended up creating a new DB from scratch and everything seems to work now. Now i'll just move over my 20 monitors by hand :(

sorry to clog up the forums
Locked