使用ffmpeg / libav

时间:2019-05-02 10:21:26

标签: c ffmpeg linker-errors libav

我有一个来源,我想在Linux上的libav库中建立和链接。 我在这里遵循了ffmpeg的编译指南:https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu 一切正常。 我构建了包含的示例,如下所示:FFmpeg: building example C codes 也可以。

现在,我想构建自己的小应用程序,在其中尝试学习如何使用libav。我当前的问题是,通过使用命令行

gcc muxing.c -g -I ../../../ffmpeg_build/include/ -L ../../../ffmpeg_build/lib/ -lavdevice -lavformat -lavfilter -lavcodec -lswresample -lswscale -lavutil -lm -lz -lpthread -lfdk-aac -lmp3lame -lx264 -lva -lX11

我到了这一点:

muxing.c: In function ‘write_audio_frame’:
muxing.c:354:5: warning: ‘avcodec_encode_audio2’ is deprecated [-Wdeprecated-declarations]
     ret = avcodec_encode_audio2(codecContext, &pkt, frame, &got_packet);
     ^~~
In file included from ../../../ffmpeg_build/include/libavformat/avformat.h:317:0,
                 from muxing.c:42:
../../../ffmpeg_build/include/libavcodec/avcodec.h:5418:5: note: declared here
 int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
     ^~~~~~~~~~~~~~~~~~~~~
muxing.c: In function ‘write_video_frame’:
muxing.c:524:5: warning: ‘avcodec_encode_video2’ is deprecated [-Wdeprecated-declarations]
     ret = avcodec_encode_video2(codecContext, &pkt, frame, &got_packet);
     ^~~
In file included from ../../../ffmpeg_build/include/libavformat/avformat.h:317:0,
                 from muxing.c:42:
../../../ffmpeg_build/include/libavcodec/avcodec.h:5457:5: note: declared here
 int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
     ^~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: ../../../ffmpeg_build/lib//libx264.a(opencl-8.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

然后我阅读了该文章,以克服此链接器错误,我必须在命令行后附加-ldl,但是我得到了:

../../../ffmpeg_build/lib//libavcodec.a(libopusdec.o): In function `libopus_flush':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:204: undefined reference to `opus_multistream_decoder_ctl'
../../../ffmpeg_build/lib//libavcodec.a(libopusdec.o): In function `libopus_decode':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:169: undefined reference to `opus_multistream_decode_float'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:165: undefined reference to `opus_multistream_decode'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:174: undefined reference to `opus_strerror'
../../../ffmpeg_build/lib//libavcodec.a(libopusdec.o): In function `libopus_decode_close':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:145: undefined reference to `opus_multistream_decoder_destroy'
../../../ffmpeg_build/lib//libavcodec.a(libopusdec.o): In function `libopus_decode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:101: undefined reference to `opus_multistream_decoder_create'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:105: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:111: undefined reference to `opus_multistream_decoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:113: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:126: undefined reference to `opus_multistream_decoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:129: undefined reference to `opus_strerror'
../../../ffmpeg_build/lib//libavcodec.a(libopusenc.o): In function `libopus_encode':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:487: undefined reference to `opus_multistream_encode'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:483: undefined reference to `opus_multistream_encode_float'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:492: undefined reference to `opus_strerror'
../../../ffmpeg_build/lib//libavcodec.a(libopusenc.o): In function `libopus_encode_close':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:530: undefined reference to `opus_multistream_encoder_destroy'
../../../ffmpeg_build/lib//libavcodec.a(libopusenc.o): In function `libopus_encode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:348: undefined reference to `opus_multistream_encoder_create'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:358: undefined reference to `opus_multistream_surround_encoder_create'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:365: undefined reference to `opus_strerror'
../../../ffmpeg_build/lib//libavcodec.a(libopusenc.o): In function `libopus_configure_encoder':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:121: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:123: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:128: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:131: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:134: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:136: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:139: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:142: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:145: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:148: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:153: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:156: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:161: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:164: undefined reference to `opus_strerror'
../../../ffmpeg_build/lib//libavcodec.a(libopusenc.o): In function `libopus_encode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:410: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:412: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:426: undefined reference to `opus_multistream_encoder_destroy'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisenc.o): In function `libvorbis_encode_frame':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:287: undefined reference to `vorbis_analysis_buffer'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:294: undefined reference to `vorbis_analysis_wrote'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:310: undefined reference to `vorbis_analysis_blockout'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:311: undefined reference to `vorbis_analysis'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:313: undefined reference to `vorbis_bitrate_addblock'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:317: undefined reference to `vorbis_bitrate_flushpacket'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:302: undefined reference to `vorbis_analysis_wrote'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisenc.o): In function `libvorbis_encode_close':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:180: undefined reference to `vorbis_analysis_wrote'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:182: undefined reference to `vorbis_block_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:183: undefined reference to `vorbis_dsp_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:184: undefined reference to `vorbis_info_clear'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisenc.o): In function `libvorbis_encode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:203: undefined reference to `vorbis_info_init'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisenc.o): In function `libvorbis_setup':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:98: undefined reference to `vorbis_encode_setup_vbr'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:107: undefined reference to `vorbis_encode_setup_managed'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:114: undefined reference to `vorbis_encode_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:121: undefined reference to `vorbis_encode_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:127: undefined reference to `vorbis_encode_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:160: undefined reference to `vorbis_encode_setup_init'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisenc.o): In function `libvorbis_encode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:208: undefined reference to `vorbis_analysis_init'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:214: undefined reference to `vorbis_block_init'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:220: undefined reference to `vorbis_comment_init'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:222: undefined reference to `vorbis_comment_add_tag'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:224: undefined reference to `vorbis_analysis_headerout'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:257: undefined reference to `vorbis_comment_clear'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `decode_frame':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:161: undefined reference to `vpx_codec_decode'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `vpx_decode':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:221: undefined reference to `vpx_codec_get_frame'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `decode_frame':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:162: undefined reference to `vpx_codec_error'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:163: undefined reference to `vpx_codec_error_detail'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:161: undefined reference to `vpx_codec_decode'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:162: undefined reference to `vpx_codec_error'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `vpx_decode':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:222: undefined reference to `vpx_codec_get_frame'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:201: undefined reference to `vpx_codec_vp9_dx_algo'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:201: undefined reference to `vpx_codec_vp8_dx_algo'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `vpx_free':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:269: undefined reference to `vpx_codec_destroy'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:271: undefined reference to `vpx_codec_destroy'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `vpx_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:53: undefined reference to `vpx_codec_version_str'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:54: undefined reference to `vpx_codec_build_config'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:56: undefined reference to `vpx_codec_dec_init_ver'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:59: undefined reference to `vpx_codec_error'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `vp8_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:278: undefined reference to `vpx_codec_vp8_dx_algo'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `vp9_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:298: undefined reference to `vpx_codec_vp9_dx_algo'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `vpx_encode':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:1118: undefined reference to `vpx_codec_encode'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:1126: undefined reference to `vpx_codec_encode'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `queue_frames':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:979: undefined reference to `vpx_codec_get_cx_data'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:981: undefined reference to `vpx_codec_get_cx_data'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `log_encoder_error':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:164: undefined reference to `vpx_codec_error'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:165: undefined reference to `vpx_codec_error_detail'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `codecctl_int':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:298: undefined reference to `vpx_codec_control_'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `vpx_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:524: undefined reference to `vpx_codec_get_caps'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:527: undefined reference to `vpx_codec_version_str'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:528: undefined reference to `vpx_codec_build_config'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:533: undefined reference to `vpx_codec_enc_config_default'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:534: undefined reference to `vpx_codec_err_to_string'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:719: undefined reference to `vpx_codec_enc_init_ver'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:727: undefined reference to `vpx_codec_enc_init_ver'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:812: undefined reference to `vpx_img_wrap'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:820: undefined reference to `vpx_img_wrap'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `vp8_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:1279: undefined reference to `vpx_codec_vp8_cx'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `vp9_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:1309: undefined reference to `vpx_codec_vp9_cx'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `codecctl_intp':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:320: undefined reference to `vpx_codec_control_'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `vpx_free':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:344: undefined reference to `vpx_codec_destroy'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:346: undefined reference to `vpx_codec_destroy'
../../../ffmpeg_build/lib//libavcodec.a(libx265.o): In function `libx265_encode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libx265.c:84: undefined reference to `x265_api_get_173'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libx265.c:86: undefined reference to `x265_api_get_173'
../../../ffmpeg_build/lib//libavcodec.a(libx265.o): In function `libx265_encode_init_csp':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libx265.c:494: undefined reference to `x265_api_get_173'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libx265.c:496: undefined reference to `x265_api_get_173'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libx265.c:498: undefined reference to `x265_api_get_173'
../../../ffmpeg_build/lib//libavcodec.a(libvpx.o): In function `ff_vp9_init_static':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpx.c:73: undefined reference to `vpx_codec_vp9_cx'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpx.c:73: undefined reference to `vpx_codec_get_caps'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisdec.o): In function `oggvorbis_decode_close':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:191: undefined reference to `vorbis_block_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:192: undefined reference to `vorbis_dsp_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:193: undefined reference to `vorbis_info_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:194: undefined reference to `vorbis_comment_clear'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisdec.o): In function `oggvorbis_decode_frame':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:169: undefined reference to `vorbis_synthesis'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:175: undefined reference to `vorbis_synthesis_pcmout'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:179: undefined reference to `vorbis_synthesis_read'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:170: undefined reference to `vorbis_synthesis_blockin'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisdec.o): In function `oggvorbis_decode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:48: undefined reference to `vorbis_info_init'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:49: undefined reference to `vorbis_comment_init'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:97: undefined reference to `vorbis_synthesis_headerin'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisdec.o): In function `oggvorbis_decode_close':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:191: undefined reference to `vorbis_block_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:192: undefined reference to `vorbis_dsp_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:193: undefined reference to `vorbis_info_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:194: undefined reference to `vorbis_comment_clear'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisdec.o): In function `oggvorbis_decode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:109: undefined reference to `vorbis_synthesis_init'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:110: undefined reference to `vorbis_block_init'
../../../ffmpeg_build/lib//libavutil.a(hwcontext_vaapi.o): In function `vaapi_device_create':
/home/ritter/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:1490: undefined reference to `vaGetDisplay'
/home/ritter/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:1514: undefined reference to `vaGetDisplayDRM'
../../../ffmpeg_build/lib//libavutil.a(hwcontext_vaapi.o): In function `vaapi_device_derive':
/home/ritter/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:1561: undefined reference to `vaGetDisplayDRM'
../../../ffmpeg_build/lib//libavutil.a(hwcontext_vdpau.o): In function `vdpau_device_create':
/home/ritter/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vdpau.c:461: undefined reference to `vdp_device_create_x11'
collect2: error: ld returned 1 exit status

那么,我该怎么做才能完全编译和链接它?

0 个答案:

没有答案