yausername / youtubedl-android

youtube-dl for android
GNU General Public License v3.0
998 stars 180 forks source link

Update the FFmpeg build to the latest version #183

Closed JunkFood02 closed 2 years ago

JunkFood02 commented 2 years ago

I'm attempting to update the FFmpeg build version to v5.1.

According to the termux community, the support of API 23- is ended as well as the package updates. The issue below suggests that the outdated FFmpeg build has already caused the discontinuity with the yt-dlp.

xibr commented 2 years ago

Updating ffmpeg means giving up support for Android 5 and 6 and also it will increase app size, as you can see here.

I have found the following packages to be sufficient for youtube-dl to work.

Maybe the same with ffmpeg!

Maybe in another branch.

JunkFood02 commented 2 years ago

Updating ffmpeg means giving up support for Android 5 and 6 and also it will increase app size, as you can see here.

Yes, I found the size of the libffmpeg.zip.so increase to around 30MB after building the FFmpeg and remove many abundant .so libraries on my own. Still not clear about how can we optimize this

xibr commented 2 years ago

Yes, I found the size of the libffmpeg.zip.so increase to around 30MB after building the FFmpeg and remove many abundant .so libraries on my own. Still not clear about how can we optimize this

I will take a look and see what I can do.

from yt-dlp readme

Note: There are some regressions in newer ffmpeg versions that causes various issues when used alongside yt-dlp. Since ffmpeg is such an important dependency, we provide custom builds with patches for these issues at yt-dlp/FFmpeg-Builds. See the readme for details on the specific issues solved by these builds

Is the error related to this?

JunkFood02 commented 2 years ago

Is the error related to this?

I don't think so. According to the readme, most of the patches were merged into the FFmpeg v5.1.

Maybe the FFmpeg/aria2c binaries can be packaged and released in different repos/libraries from this, having independent version codes, since we make little changes to them.

xibr commented 2 years ago

Ok, I updated ffmpeg from 4.2.1 to 5.1 so far it works fine, tested on Android 5 and 9, Please check if it works fine with

implementation 'com.github.xibr.youtubedl-android:library:eacd0074af'
implementation 'com.github.xibr.youtubedl-android:ffmpeg:eacd0074af'

xibr:update-ffmpeg

JunkFood02 commented 2 years ago

It works like a charm!

![Screenshot_20220907-155742](https://user-images.githubusercontent.com/69683722/188823017-3a4bda40-c7a2-4e2d-9bee-76e1c5236975.png)
xibr commented 2 years ago

Let's make sure everything is working fine so it doesn't cause us any issues after merging.

There is an idea in my mind about aria2c don't know if it will work but I will give it a try, it will reduce the size of the current aria2c.