Source code for the FFmpeg program inside Just Share
====================================================

Just Share, a Windows app for sharing folders, includes a copy of FFmpeg (ffmpeg.exe). It
runs FFmpeg as a separate program to convert video for streaming, to make thumbnails, and to
read subtitle tracks.

That copy of FFmpeg is free software under the GNU General Public License, version 3 or
later (see COPYING.GPLv3). This archive is its complete corresponding source code: everything
that was compiled to make the program, and the scripts that compile it. You may use, study,
change and share all of it under that licence.

Just Share itself is a separate program and is not covered by the GPL.


What is here
------------

  sources/ffmpeg-*.tar.xz     FFmpeg, as released at https://ffmpeg.org/
  sources/x264-*.tar.gz       x264, the H.264 video encoder, from https://code.videolan.org/videolan/x264
  sources/dav1d-*.tar.xz      dav1d, the AV1 video decoder, from https://downloads.videolan.org/pub/videolan/dav1d/
  sources/zlib-ubuntu/        zlib, as packaged by Ubuntu (package libz-mingw-w64)
  build.sh                    builds ffmpeg.exe from the files above
  setup-ubuntu.sh             installs the tools build.sh needs
  BUILD-INFO.txt              versions, settings and fingerprints of the build that shipped
  THIRD-PARTY-LICENCES.txt    the licences of the libraries built into ffmpeg.exe
  SHA256SUMS                  fingerprints of every file in this archive

None of the source code has been changed. All of it is exactly as its authors published it.


How to build it
---------------

You need Ubuntu 24.04. On Windows, the copy that runs under WSL works.

  1. Unpack this archive.
  2. Once, as root:     bash setup-ubuntu.sh
  3. As yourself:       bash build.sh

build.sh checks every source file against its fingerprint, compiles x264, dav1d and FFmpeg
for 64-bit Windows, and leaves ffmpeg.exe in ~/justshare-ffmpeg/out. It uses the files in
sources/ and downloads nothing.

The compiler and the Windows runtime code it adds come from Ubuntu's packages, which
BUILD-INFO.txt lists with their versions. Their source code is available from Ubuntu
(apt-get source gcc-mingw-w64 mingw-w64 binutils-mingw-w64).

A program built this way does the same job as the one in Just Share but won't be identical
byte for byte, because compilers record details such as file paths.


To use your own build with Just Share, you would have to replace tools\ffmpeg.exe inside the
installed app, which Windows doesn't allow for Store apps. You can run the ffmpeg.exe you
build on its own, as you would any other copy of FFmpeg.

FFmpeg is a trademark of Fabrice Bellard, originator of the FFmpeg project. Just Share is
not affiliated with or endorsed by the FFmpeg project.
