GithubHelp home page GithubHelp logo

shaka-project / static-ffmpeg-binaries Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 9.0 138 KB

Static binaries of FFmpeg, for multiple OS & CPU combinations, built from source in a GitHub Actions workflow.

Home Page: https://github.com/joeyparrish/static-ffmpeg-binaries/releases

License: Apache License 2.0

Shell 69.40% JavaScript 30.60%
ffmpeg shaka-streamer static-binaries static-binary ffprobe shaka shaka-packager

static-ffmpeg-binaries's Introduction

static-ffmpeg-binaries

Static binaries of FFmpeg, for multiple OS & CPU combinations, built from source in a GitHub Actions workflow.

To download binaries, visit the releases page.

License

The GitHub Actions workflows and other scripts in this repo are covered by the Apache license. Please see the workflow source, API client source, version script source, and see the Apache license for license details.

The resulting FFmpeg binaries are built using GPL libraries, and are therefore published under the GPL license. Please see the releases page for binaries, and see FFmpeg's GPL license for license details.

How are they built?

FFmpeg and its key dependencies are all built from source and linked statically. Each run of the GitHub Actions workflow logs the MD5 sums of the binaries, and it places the MD5 sums into the release notes. You can see how they were built, and you can verify that they haven't been tampered with. The sums in the workflow logs, release notes, and the binaries should all match. You can read the details in the workflow source.

No third-party GitHub Actions have been used in this workflow, to protect against supply-chain attacks.

Triggering a build

Update the version numbers as needed in the version file, then create a tag on the new commit. Full builds will be triggered, and binaries will be attached to a release on the new tag.

Tag names

Tag names should follow the form of $FFMPEG_VERSION-$WORKFLOW_RELEASE_NUMBER. For example, the first time we release a build based on FFmpeg n4.4, the tag should be "n4.4-1". If we need to update the dependencies, or change the configuration, or make any other changes to the workflow that don't change the FFmpeg version, the next release would be "n4.4-2". When FFmpeg n4.5 is released upstream, we could update to that and then tag "n4.5-1".

Local builds

You can do these steps on your actual device, or on a virtual device or container to avoid polluting your system.

  1. Set up a build environment (packages, tools, etc) similar to what is done in the workflow source for your OS.
  2. If you are using Linux or macOS, run export SUDO=sudo.
  3. If you are using Linux, run export RUNNER_OS=Linux.
  4. If you are using macOS, run export RUNNER_OS=macOS.
  5. If you are using Linux, run export RUNNER_OS=Windows.
  6. Create a build folder. For example, mkdir -p build. It does not need to be in the git working directory.
  7. Change into that build directory.
  8. Create a symlink to the repo root called repo-src to emulate the structure used by the workflow. For example, if build is inside the repo, use ln -s ../ repo-src.
  9. Run the build scripts in [build-scripts][] in numerical order.

static-ffmpeg-binaries's People

Contributors

dependabot[bot] avatar joeyparrish avatar mariocynicys avatar shaka-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

static-ffmpeg-binaries's Issues

FFmpeg missing TLS support

We can compile ffmpeg with openssl(Apache 2.0 License) mbedtls(GPL) enabled so the static binary can be fed from an https input source, right now it only works with http.

/home/omar/.local/lib/python3.8/site-packages/streamer_binaries/ffprobe-linux-x64 https://storage.googleapis.com/shaka-streamer-assets/sample-inputs/Sintel.2010.720p.mkv -select_streams v:0 -show_entries stream=index -of compact=p=0:nk=1
ffprobe version n4.4 Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --pkg-config-flags=--static --disable-ffplay --enable-libvpx --enable-libaom --enable-libx264 --enable-libx265 --enable-libmp3lame --enable-libopus --enable-runtime-cpudetect --enable-gpl --enable-version3 --enable-static --enable-nvenc --enable-vdpau
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
https protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled.
https://storage.googleapis.com/shaka-streamer-assets/sample-inputs/Sintel.2010.720p.mkv: Protocol not found

FFmpeg & FFprobe binarys segfault on Linux

System information:

OS: Arch Linux x86_64
Kernel: 6.4.3-arch1-1

The output of running ffprobe on vid.mp4:

$ /home/mario/.local/share/virtualenvs/shaka-F3LkE8tS/lib/python3.11/site-packages/streamer_binaries/ffprobe-linux-x64 vid.mp4
ffprobe version n4.4 Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --pkg-config-flags=--static --disable-ffplay --enable-libvpx --enable-libaom --enable-libx264 --enable-libx265 --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-runtime-cpudetect --enable-gpl --enable-version3 --enable-static --enable-nvenc --enable-vdpau
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
zsh: segmentation fault (core dumped)   vid.mp4

Tried multiple other videos and facing the same issue.

No workflow to test PRs

Since it is very difficult to test workflows locally, and this repo is entirely workflow-based, we should split the release workflow and create a test workflow, as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.