Page 1 of 1

Scons FFMPEG Compile Errors

Posted: Sat Jul 29, 2006 4:22 am
by JA-forreal
Hello, I have been trying to do an scons compile of Blender with ffmpeg support in Ubuntu Dapper. I compiled ffmpeg fresh from the svn sources. I get this error message:

Code: Select all

Linking program ==> 'blender'
/usr/lib/libavformat.a(dc1394.o): In function `dc1394_read_header': undefined reference to `dc1394_create_handle'
/usr/lib/libavformat.a(dc1394.o): In function `dc1394_read_header': undefined reference to `dc1394_get_camera_nodes'
/usr/lib/libavformat.a(dc1394.o): In function `dc1394_read_header': undefined reference to `dc1394_dma_setup_capture'
/usr/lib/libavformat.a(dc1394.o): In function `dc1394_read_header': undefined reference to `dc1394_destroy_handle'
/usr/lib/libavformat.a(dc1394.o): In function `dc1394_read_header': undefined reference to `dc1394_start_iso_transmission'
/usr/lib/libavformat.a(dc1394.o): In function `dc1394_read_header': undefined reference to `dc1394_dma_unlisten'
/usr/lib/libavformat.a(dc1394.o): In function `dc1394_read_header': undefined reference to `dc1394_dma_release_camera'
/usr/lib/libavformat.a(dc1394.o): In function `dc1394_read_packet': undefined reference to `dc1394_dma_done_with_buffer'
/usr/lib/libavformat.a(dc1394.o): In function `dc1394_read_packet': undefined reference to `dc1394_dma_single_capture'
/usr/lib/libavformat.a(dc1394.o): In function `dc1394_close': undefined reference to `dc1394_stop_iso_transmission'
/usr/lib/libavformat.a(dc1394.o): In function `dc1394_close': undefined reference to `dc1394_dma_unlisten'
/usr/lib/libavformat.a(dc1394.o): In function `dc1394_close': undefined reference to `dc1394_dma_release_camera'
/usr/lib/libavformat.a(dc1394.o): In function `dc1394_close': undefined reference to `dc1394_destroy_handle'
/usr/lib/libavformat.a(ogg.o): In function `ogg_write_header': undefined reference to `ogg_stream_init'
/usr/lib/libavformat.a(ogg.o): In function `ogg_write_header': undefined reference to `ogg_stream_packetin'
/usr/lib/libavformat.a(ogg.o): In function `ogg_write_packet': undefined reference to `ogg_stream_packetin'
/usr/lib/libavformat.a(ogg.o): In function `ogg_write_packet': undefined reference to `ogg_stream_pageout'
/usr/lib/libavformat.a(ogg.o): In function `ogg_write_packet': undefined reference to `ogg_stream_flush'
/usr/lib/libavformat.a(ogg.o): In function `ogg_write_trailer': undefined reference to `ogg_stream_flush'
/usr/lib/libavformat.a(ogg.o): In function `ogg_write_trailer': undefined reference to `ogg_stream_clear'
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_init': undefined reference to `dts_init'
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_frame': undefined reference to `dts_frame'
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_frame': undefined reference to `dts_blocks_num'
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_frame': undefined reference to `dts_block'
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_frame': undefined reference to `dts_samples'
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_frame': undefined reference to `dts_blocks_num'
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_frame': undefined reference to `dts_syncinfo'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_init': undefined reference to `vorbis_info_init'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_init': undefined reference to `vorbis_encode_init_vbr'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_init': undefined reference to `vorbis_analysis_init'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_init': undefined reference to `vorbis_block_init'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_init': undefined reference to `vorbis_comment_init'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_init': undefined reference to `vorbis_comment_add_tag'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_init': undefined reference to `vorbis_analysis_headerout'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_init': undefined reference to `vorbis_comment_clear'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_init': undefined reference to `vorbis_encode_init'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_frame': undefined reference to `vorbis_analysis_buffer'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_frame': undefined reference to `vorbis_analysis_wrote'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_frame': undefined reference to `vorbis_analysis_blockout'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_frame': undefined reference to `vorbis_analysis'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_frame': undefined reference to `vorbis_bitrate_addblock'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_frame': undefined reference to `vorbis_bitrate_flushpacket'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_frame': undefined reference to `vorbis_bitrate_flushpacket'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_frame': undefined reference to `vorbis_analysis_blockout'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_close': undefined reference to `vorbis_analysis_wrote'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_close': undefined reference to `vorbis_block_clear'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_close': undefined reference to `vorbis_dsp_clear'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_encode_close': undefined reference to `vorbis_info_clear'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_decode_init': undefined reference to `vorbis_info_init'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_decode_init': undefined reference to `vorbis_comment_init'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_decode_init': undefined reference to `vorbis_synthesis_headerin'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_decode_init': undefined reference to `vorbis_synthesis_init'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_decode_init': undefined reference to `vorbis_block_init'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_decode_frame': undefined reference to `vorbis_synthesis'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_decode_frame': undefined reference to `vorbis_synthesis_pcmout'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_decode_frame': undefined reference to `vorbis_synthesis_read'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_decode_frame': undefined reference to `vorbis_synthesis_pcmout'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_decode_frame': undefined reference to `vorbis_synthesis_blockin'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_decode_close': undefined reference to `vorbis_info_clear'
/usr/lib/libavcodec.a(oggvorbis.o): In function `oggvorbis_decode_close': undefined reference to `vorbis_comment_clear'
/usr/lib/libavcodec.a(oggtheora.o): In function `Theora_decode_frame': undefined reference to `theora_decode_packetin'
/usr/lib/libavcodec.a(oggtheora.o): In function `Theora_decode_frame': undefined reference to `theora_decode_YUVout'
/usr/lib/libavcodec.a(oggtheora.o): In function `Theora_decode_end': undefined reference to `theora_info_clear'
/usr/lib/libavcodec.a(oggtheora.o): In function `Theora_decode_end': undefined reference to `theora_comment_clear'
/usr/lib/libavcodec.a(oggtheora.o): In function `Theora_decode_init': undefined reference to `theora_info_init'
/usr/lib/libavcodec.a(oggtheora.o): In function `Theora_decode_init': undefined reference to `theora_decode_header'
/usr/lib/libavcodec.a(oggtheora.o): In function `Theora_decode_init': undefined reference to `theora_decode_init'
/usr/lib/libavcodec.a(libgsm.o): In function `libgsm_init': undefined reference to `gsm_create'
/usr/lib/libavcodec.a(libgsm.o): In function `libgsm_close': undefined reference to `gsm_destroy'
/usr/lib/libavcodec.a(libgsm.o): In function `libgsm_encode_frame': undefined reference to `gsm_encode'
/usr/lib/libavcodec.a(libgsm.o): In function `libgsm_decode_frame': undefined reference to `gsm_decode'
collect2: ld returned 1 exit status
scons: *** [/home/adb/build/linux2/bin/blender] Error 1
scons: building terminated because of errors.

Posted: Sat Jul 29, 2006 3:17 pm
by SirDude
You need to link in extra libraries for your version of ffmpeg. See
the following post for details:
http://www.blender.org/forum/viewtopic. ... ght=vorbis

Posted: Sat Jul 29, 2006 11:46 pm
by JA-forreal
SirDude wrote:You need to link in extra libraries for your version of ffmpeg. See
the following post for details:
http://www.blender.org/forum/viewtopic. ... ght=vorbis
Thanks! I will try this. In any case, Blender builds fine for me now on Ubuntu even without ffmpeg support.

Posted: Sun Jul 30, 2006 5:35 am
by JA-forreal
Well I compiled ffmpeg, linked all of the lib's and I still get the same build errors.I edited the config.py like you suggested. I guess it's no ffmpeg for me in the nightly builds.

Posted: Sun Jul 30, 2006 6:07 pm
by Elby
I succeeded in compiling Blender with FFmpeg on Ubuntu by changing theses lines in config/linux2-config.py :

Code: Select all

# enable ffmpeg  support
WITH_BF_FFMPEG = 'true'  # -DWITH_FFMPEG
BF_FFMPEG = '/usr'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='$(BF_FFMPEG)/lib'
BF_FFMPEG_LIB = 'avformat avcodec avutil libgsm libtheora libogg libdc1394_control libdts libvorbis libvorbisenc'
The line 'BF_FFMPEG_LIB =...' contains extra libraries installed with apt.

Hope it helps.

Posted: Tue Aug 01, 2006 12:20 am
by JA-forreal
Thanks for posting this info. I'll install the lib's that worked in your case. Hopefully I can get ffmpeg working in my next build.

BTW, did you just use the error message to find out what lib's you needed? Or did you know what lib's you would need for ffmpeg before hand? :?:

Posted: Wed Aug 02, 2006 3:53 am
by JA-forreal
Elby wrote:I succeeded in compiling Blender with FFmpeg on Ubuntu by changing theses lines in config/linux2-config.py :

Code: Select all

# enable ffmpeg  support
WITH_BF_FFMPEG = 'true'  # -DWITH_FFMPEG
BF_FFMPEG = '/usr'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='$(BF_FFMPEG)/lib'
BF_FFMPEG_LIB = 'avformat avcodec avutil libgsm libtheora libogg libdc1394_control libdts libvorbis libvorbisenc'
The line 'BF_FFMPEG_LIB =...' contains extra libraries installed with apt.

Hope it helps.
When I compiled FFmpeg I wasn't aware that it setup all of the needed lib's. In any case it builds ok after adding those lib links. I got a fresh FFMPEG build. Thanks a lot!