Closed qinziqiao closed 1 month ago
Same question, have you figured it out?
Seek help. I have installed opencv and ffmpeg source code, but encountered the following problems when run "python -m pip install .":
src/mvextractor/video_cap.cpp:218:41: error: ‘AVPacket’ {aka ‘struct AVPacket’} has no member named ‘synced’ if (this->is_rtsp && packet.synced) { ^
~src/mvextractor/video_cap.cpp:222:32: error: ‘AVPacket’ {aka ‘struct AVPacket’} has no member named ‘last_rtcp_ntp_time’ ntp2tv(&packet.last_rtcp_ntp_time, &tv); ^~~~~~ src/mvextractor/video_cap.cpp:223:51: error: ‘AVPacket’ {aka ‘struct AVPacket’} has no member named ‘timestamp’ double rtp_diff = (double)(packet.timestamp - packet.last_rtcp_timestamp) / 90000.0; ^~~~~ src/mvextractor/video_cap.cpp:223:70: error: ‘AVPacket’ {aka ‘struct AVPacket’} has no member named ‘last_rtcp_timestamp’ double rtp_diff = (double)(packet.timestamp - packet.last_rtcp_timestamp) / 90000.0;I check the AVPacket struct of the "ffmpeg_build/include/libavcodec/avcodec.h" file, and found they really don't exist either in the new version (ffmpeg 5.0, ffmpeg 4.1) or the old version ( ffmpeg 3.4).
Actually, this repo provides the patch in ffmpeg_patch
I used the custom FFMPEG installer script, but that doesn't seem to install libav-format. I can install libav-format using Ubuntu's package manager, but I think that installs the unpatched version.
That's the great point @xizaoqu. Had the same issue, and execute the patch script here solved the problem, actually it just copy the patched three files into the installed path. Probably README file should update about this
The patch is installed in the Docker image here. I could add this to the readme but thought everyone could just read the Dockerfile to understand the installation procedure.
Seek help. I have installed opencv and ffmpeg source code, but encountered the following problems when run "python -m pip install .":
I check the AVPacket struct of the "ffmpeg_build/include/libavcodec/avcodec.h" file, and found they really don't exist either in the new version (ffmpeg 5.0, ffmpeg 4.1) or the old version ( ffmpeg 3.4).