yt-dlp / FFmpeg-Builds

FFmpeg Builds for yt-dlp
MIT License
707 stars 58 forks source link

stable download URL and version? #31

Closed hayguen closed 2 years ago

hayguen commented 2 years ago

In https://github.com/hayguen/clipgrab, i've added explicit check for available version of yt-dlp on github, by parsing __version__ line of https://raw.githubusercontent.com/yt-dlp/yt-dlp/master/yt_dlp/version.py

It's simple to compare against the output of yt-dlp --version and allow an update by retrieving e.g. https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp for Linux.

Despite reading issue https://github.com/yt-dlp/FFmpeg-Builds/issues/10, i'm still confused howto find out the right URL for stable releases, cause those contain the version in the filename, as in https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-n5.1-latest-linux64-gpl-5.1.tar.xz and the Links at https://github.com/yt-dlp/FFmpeg-Builds#downloads do only provide the latest non-stable master downloads.

Can someone give me a hint, how to automatically determine the latest stable online version and the corresponding URLs?

In addition, it should be possible the retrieve the same version string or just the iso-date running sort of ffmpeg --version-date.

pukkandan commented 2 years ago

Use GitHub API https://api.github.com/repos/yt-dlp/FFmpeg-Builds/releases/latest

hayguen commented 2 years ago

@pukkandan very interesting. thank you!

thus, i should be able to check the name and the browser_download_url of the assets list, filtering out names containing master and find the right platform/architecture. but, the created and updated fields look useless!?

how would i compare with the output of the installed local binary?, when ffmpeg -version outputs:

ffmpeg version N-108893-g17987b371b-20221029 Copyright (c) 2000-2022 the FFmpeg developers

but name is

ffmpeg-n5.1-latest-linux64-gpl-5.1.tar.xz

there's no '5.1' in 'N-108893-g17987b371b-20221029' or vice versa!

hmmmm, '17987b371b' looks to be a commit/sha-id. would be great, if this would be part of the download name!

but the above commit/sha-id is really new: https://github.com/FFmpeg/FFmpeg/commit/17987b371bf8ebc284950115a7e2987baa2f2685 why is that commit contained in a stable build?

it should be possible to detect/avoid download, just cause of an automatic rebuild without any change.

pukkandan commented 2 years ago

You will have to ask these upstream. We only add the patches to the builds - not modify the build system or versioning

hayguen commented 2 years ago

@pukkandan : thanks again for fast reply.

sorry, i've to ask again, cause now realizing https://github.com/BtbN/FFmpeg-Builds should i aske there? or, somewhere at https://ffmpeg.org/ ?

pukkandan commented 2 years ago

I meant BtBN, but I cannot know if they will further redirect you to ffmpeg. Somewhat related: https://github.com/BtbN/FFmpeg-Builds/issues/199

hayguen commented 2 years ago

@pukkandan Thank You

hayguen commented 2 years ago

see https://github.com/BtbN/FFmpeg-Builds/issues/210 for the result