bilibili / ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
GNU General Public License v2.0
32.54k stars 8.13k forks source link

how to upgrade ffmpeg from ff3.4--ijk0.8.7--20180103--001 to to FFmpeg4.4 #5269

Closed zhouwg closed 3 years ago

zhouwg commented 3 years ago

Required Info
Host Operating System & Version {Ubuntu 20.04.2}
Kernel Version (Linux Only) (5.x)
Branch { latest k0.8.8 }
Android Studio Version 4.2.1
NDK Version NDK-r14b
Xcode Version 12.5
Language {C }
Section { FFmpeg}

Issue Description

upgrade ffmpeg from ff3.4--ijk0.8.7--20180103--001 to to FFmpeg4.4(which is latest FFmpeg release)

How to upgrade

Only in android/contrib/ffmpeg-x86/libavutil: dns_cache.c Only in android/contrib/ffmpeg-x86/libavutil: dns_cache.h Only in android/contrib/ffmpeg-x86/libavformat: ijkutils.c Only in android/contrib/ffmpeg-x86/libavutil: application.c Only in android/contrib/ffmpeg-x86/libavutil: application.h

diff android/contrib/ffmpeg-x86/libavutil/Makefile /tmp/ffmpeg-x86/libavutil/Makefile diff android/contrib/ffmpeg-x86/libavformat/Makefile /tmp/ffmpeg-x86/libavformat/Makefile diff android/contrib/ffmpeg-x86/libavformat/http.c /tmp/ffmpeg-x86/libavformat/http.c diff android/contrib/ffmpeg-x86/libavformat/tcp.c /tmp/ffmpeg-x86/libavformat/tcp.c diff android/contrib/ffmpeg-x86/libavformat/protocols.c /tmp/ffmpeg-x86/libavformat/protocols.c

comment following line in ijkmedia/ijkplayer/ijkavformat/allformats.c

IJK_REGISTER_PROTOCOL(async);

there is conflict between ijkimp_ff_async_protocol and ff_asyncprotocol,it will bring segment fault when memcpy(&ff##x##_protocol, protocol, protocol_size) (which located in libavformat/ijkutils.c) was called

Defect

Android NDK r14b is required for target Android but no official technical support is provided in the future

SivanLiu commented 3 years ago

升级到FFmpeg4.4这个编译成功了吗?

zhouwg commented 3 years ago

是可以的,请参考https://github.com/zhouwg/kantv/tree/dev-baseon-latest-k0.8.8

SivanLiu commented 3 years ago

是可以的,请参考https://github.com/zhouwg/kantv/tree/dev-baseon-latest-k0.8.8

谢谢,我试试看

zhouwg commented 3 years ago

是可以的,请参考https://github.com/zhouwg/kantv/tree/dev-baseon-latest-k0.8.8

谢谢,我试试看

不客气,这个分支在原始的ijkplayer 0.8.8上做了一些 bugfix与功能增强https://github.com/zhouwg/kantv/blob/dev-baseon-latest-k0.8.8/NEWS.md,希望对开源社区有点用