BotBlake / hwatest

A CPU and Hardware Acceleration (GPU) tester for Jellyfin
GNU General Public License v3.0
1 stars 1 forks source link

Download/re-use of JellyfinFFMPEG (via URL) #8

Open BotBlake opened 9 months ago

BotBlake commented 9 months ago

Check JellyfinFFMPEG installation and download if necessary:

Since the server provides the Jellyfin FFMPEG binary source to be used within the "ffmpeg_source" element, some preparations should already be made to download FFMPEG and validate an already installed version. The implementation of the WebAPI is not part of this requirement. Only the download of a JellyfinFFMPEG binary and the reuse of already installed versions.

Here the "Version requested by the server" is replaced by a hardcoded dictionary so that the web communication can be integrated here at a later date. This dictionary should not be used by the download method, but should be loaded into a "url" variable beforehand.

versions = {
    platform : "download_url"
}
url = versions["windows"]

(Only example variable names and example code. This is not part of the specification )

Planned download method procedure:

  1. Installation Path in variable (hardcoded for now)
  2. Check if FFMPEG is already installed
  3. --> Check version of the installed binary
  4. Download the required version (if necessary)
  5. Perform hash validation against the version requested by the server
BotBlake commented 8 months ago

Update

This requirement has now been implemented and is already in use in the "Auto-Install" branch. Since verifying the installed version turned out to be more difficult than expected, I have agreed to the compromise that the archive remains local, which, should a faulty ffmpeg executable occur, is checked and unpacked again. In this way, at least the repeated download of the FFMPEG archive can be avoided. This has also already been implemented as #10