Below is my build procedure:
#cd ffmpeg
#./configure --arch=x86 --target-os=linux
#make
#make install
#cd doc/examples/
#make
Then there are some error occurs. Following is the error log:
Package libswresample was not found in the pkg-config search path.
Perhaps you should add the directory containing `libswresample.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libswresample' found
Package libswresample was not found in the pkg-config search path.
Perhaps you should add the directory containing `libswresample.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libswresample' found
cc decoding_encoding.o -lm -o decoding_encoding
decoding_encoding.o: In function `video_encode_example':
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:342:
undefined reference to `avcodec_find_encoder'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:348:
undefined reference to `avcodec_alloc_context3'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:365:
undefined reference to `avcodec_open2'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:376:
undefined reference to `avcodec_alloc_frame'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:387:
undefined reference to `av_image_alloc'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:396:
undefined reference to `av_init_packet'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:420:
undefined reference to `avcodec_encode_video2'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:437:
undefined reference to `avcodec_encode_video2'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:454:
undefined reference to `avcodec_close'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:455:
undefined reference to `av_free'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:456:
undefined reference to `av_freep'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:457:
undefined reference to `av_free'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:429:
undefined reference to `av_free_packet'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:446:
undefined reference to `av_free_packet'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:362:
undefined reference to `av_opt_set'
decoding_encoding.o: In function `audio_decode_example':
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:243:
undefined reference to `av_init_packet'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:248:
undefined reference to `avcodec_find_decoder'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:254:
undefined reference to `avcodec_alloc_context3'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:257:
undefined reference to `avcodec_open2'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:286:
undefined reference to `avcodec_get_frame_defaults'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:288:
undefined reference to `avcodec_decode_audio4'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:295:
undefined reference to `av_samples_get_buffer_size'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:281:
undefined reference to `avcodec_alloc_frame'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:321:
undefined reference to `avcodec_close'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:322:
undefined reference to `av_free'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:323:
undefined reference to `av_free'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:269:
undefined reference to `av_free'
decoding_encoding.o: In function `video_decode_example':
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:489:
undefined reference to `av_init_packet'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:497:
undefined reference to `avcodec_find_decoder'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:503:
undefined reference to `avcodec_alloc_context3'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:512:
undefined reference to `avcodec_open2'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:525:
undefined reference to `avcodec_alloc_frame'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:554:
undefined reference to `avcodec_decode_video2'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:580:
undefined reference to `avcodec_decode_video2'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:595:
undefined reference to `avcodec_close'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:596:
undefined reference to `av_free'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:597:
undefined reference to `av_free'
decoding_encoding.o: In function `main':
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:606:
undefined reference to `avcodec_register_all'
decoding_encoding.o: In function `audio_encode_example':
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:117:
undefined reference to `avcodec_find_encoder'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:123:
undefined reference to `avcodec_alloc_context3'
decoding_encoding.o: In function `select_channel_layout':
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:88:
undefined reference to `av_get_channel_layout_nb_channels'
decoding_encoding.o: In function `audio_encode_example':
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:139:
undefined reference to `av_get_channel_layout_nb_channels'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:142:
undefined reference to `avcodec_open2'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:154:
undefined reference to `avcodec_alloc_frame'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:166:
undefined reference to `av_samples_get_buffer_size'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:168:
undefined reference to `av_malloc'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:175:
undefined reference to `avcodec_fill_audio_frame'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:186:
undefined reference to `av_init_packet'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:198:
undefined reference to `avcodec_encode_audio2'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:211:
undefined reference to `avcodec_encode_audio2'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:224:
undefined reference to `av_freep'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:225:
undefined reference to `av_freep'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:226:
undefined reference to `avcodec_close'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:227:
undefined reference to `av_free'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:205:
undefined reference to `av_free_packet'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:219:
undefined reference to `av_free_packet'
/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:131:
undefined reference to `av_get_sample_fmt_name'
collect2: ld returned 1 exit status
make: *** [decoding_encoding] Error 1
Can you tell me the right build procedure?
Thanks and Regards,
Stefan
------------------ Original ------------------
From: "Carl Eugen Hoyos"<[email protected]>;
Date: Wed, Sep 12, 2012 07:02 PM
To: "libav-user"<[email protected]>;
Subject: Re: [Libav-user] How to Use FFmpeg Decode Libraries
Myth <286166657@...> writes:
> I have downloaded the latest FFmepg source code.
> I faced a new question, I don't know how to build
> the test examples located in doc/examples/
$ make
?
(It seems to me you have to install FFmpeg first.)
Carl Eugen
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user