MUZLATAN / ffmpeg_rtsp_mpp

ffmpeg 拉取rtsp h264流, 使用mpp解码, 目前在firefly 板子上跑通了
210 stars 55 forks source link

编译问题 #8

Open mask85 opened 2 years ago

mask85 commented 2 years ago

make [ 33%] Linking CXX executable mpp_test /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: libssh-gcrypt.so.4, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavformat.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: librtmp.so.1, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavformat.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: libz.so.1, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavformat.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: libmodplug.so.1, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavformat.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: libgme.so.0, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavformat.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: libbluray.so.1, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavformat.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: libgnutls.so.30, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavformat.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: libbz2.so.1.0, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavformat.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: libswresample-ffmpeg.so.1, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavcodec.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: libva.so.1, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavcodec.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: libzvbi.so.0, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavcodec.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: libxvidcore.so.4, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavcodec.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: libx265.so.79, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavcodec.so, not found (try using -rpath or -rpath-link) /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: warning: libx264.so.148, needed by /home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/libavcodec.so, not found (try using -rpath or -rpath-link)

/home/bob/文档/projects/ffmpeg_rtsp_mpp/ffm_lib/ 这个文件夹里面都有这些.so文件的,请问是咋回事呢?

KongZhiZhen0 commented 2 years ago

你好,你这个问题解决了吗? 我现在也遇到同样的报错。

zkdada commented 1 year ago

同上,已经解决,重新用自己的交叉编译链编译一遍ffmpeg

sxj731533730 commented 1 year ago

cmake_minimum_required(VERSION 3.5.1)

set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR arm)

set(tools /usr/local/cross-compile/aarch64-cc/)

set(CMAKE_C_COMPILER ${tools}/bin/aarch64-linux-gnu-gcc)

set(CMAKE_CXX_COMPILER ${tools}/bin/aarch64-linux-gnu-g++)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

project(mpp_test)

set(CMAKE_CXX_STANDARD 14)

set(CMAKE_CXX_FLAGS "-O0 -g") find_package(OpenCV REQUIRED) include_directories( /usr/include/aarch64-linux-gnu /env/platforms/aarch64/include ${CMAKE_CURRENT_LIST_DIR}/ffm_inc ${CMAKE_CURRENT_LIST_DIR}/rockchip )

link_directories( /env/platforms/aarch64/so /env/platforms/aarch64/static /usr/local/lib ${CMAKE_CURRENT_LIST_DIR}/firefly_mpplib

)

add_executable(mpp_test MppDecode.cpp MppDecode.h main.cpp)

target_link_libraries(mpp_test rockchip_mpp utils -lavformat -lavcodec -lswscale -lavutil -lz ${OpenCV_LIBS} m )

liuguohuan-xiezuo commented 1 year ago

请问用的ffmpeg是什么版本的呢,我用自己的编译器重新编译了ffmpeg的最新版本,在main函数中的相关ffmpeg的函数都报错undefined reference to

kiffoo commented 7 months ago

请问用的ffmpeg是什么版本的呢,我用自己的编译器重新编译了ffmpeg的最新版本,在main函数中的相关ffmpeg的函数都报错undefined reference to

这个项目是不是只能用ffmpeg4.0以下的版本?