Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FFMpeg to 7.1 #57

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Update FFMpeg to 7.1 #57

wants to merge 13 commits into from

Conversation

mike-malburg
Copy link
Collaborator

@mike-malburg mike-malburg commented Nov 14, 2024

Description

This PR does a few things:

  1. Updates FFMPEG to 7.1
  2. Enables support additional encoders, decoders, muxers, demuxers, and hardware acceleration options
  3. Refactors portfile.cmake to hopefully be a bit more maintainable, moving forward

Additional information

I have compiled a list of all possible encoders, decoders, muxers, demuxers and hardware acceleration options for Mac and Windows, here: https://docs.google.com/spreadsheets/d/17WNJ4AV64cQ6WknwHISiAthUyi-ispRM0qWF_ZtnMrw/edit?gid=1133251722#gid=1133251722

Testing

1.) Verify only the expected encoders, decoders, muxers and demuxers are enabled (Windows)

  • Download and unzip the Windows bin artifact
  • Go into the tools/ffmpeg folder
  • Run these commands from a Powershell command prompt on Windows:
./ffmpeg.exe -encoders > win-encoders.txt
./ffmpeg.exe -decoders > win-decoders.txt
./ffmpeg.exe -muxers > win-muxers.txt
./ffmpeg.exe -demuxers > win-demuxers.txt
./ffmpeg.exe -hwaccels > win-hwaccels.txt
  • Inspect the text files and verify it matches the options in portfile.cmake for Windows
  • Verify that no hevc encoder is enabled in encoders.txt

2.) Verify only the expected encoders, decoders, muxers and demuxers are enabled (Mac)

  • Download and unzip the Mac bin artifact on a Mac machine
  • Go into the tools/ffmpeg folder
  • Run these commands from a bash shell on Mac:
./ffmpeg -encoders > mac-encoders.txt
./ffmpeg -decoders > mac-decoders.txt
./ffmpeg -muxers > mac-muxers.txt
./ffmpeg -demuxers > mac-demuxers.txt
./ffmpeg -hwaccels > mac-hwaccels.txt
  • Inspect the text files and verify it matches the options in portfile.cmake for Mac

3.) Verify you can encode to the appropriate formats (Windows)

  • Download and unzip the Windows bin artifact
  • Go into the tools/ffmpeg folder
  • Copy these scripts there: download-video.ps1, ffmpeg-test-encoding.ps1
  • Run the scripts in that order
  • Go to the encoded folder
  • Verify that X videos were created, here
  • Double-click to view each video here in Media Player

4.) Verify you can encode to the appropriate formats (Mac)

  • Download and unzip the Mac bin artifact
  • Go into the tools/ffmpeg folder
  • Copy this script there: encode-mac.ps1
  • Run this script
  • Go to the encoded folder
  • Verify that X videos were created, here
  • Double-click to view each video here in Media Player

5.) Verify you can decode the appropriate formats (Windows)

  • Download and unzip the Windows bin artifact
  • Go into the tools/ffmpeg folder
  • Copy this script there: decode-win.ps1
  • Run this script
  • Go to the decoded folder
  • Verify that X videos were created, here
  • Double-click to view each video here in Media Player

6.) Verify you can decode the appropriate formats (Mac)

  • Download and unzip the Mac bin artifact
  • Go into the tools/ffmpeg folder
  • Copy this script there: encode-mac.ps1
  • Run this script
  • Go to the decoded folder
  • Verify that X videos were created, here
  • Double-click to view each video here in Media Player

7.) Verify file versions are set (Windows)

  • Create a build off the latest commit in this repo
  • Download and unzip the Windows bin artifact
  • Go into the bin folder
  • Copy this script there: list-version-metadata.ps1
  • Run this script
  • Verify that each file output by the script has a version listed

@mike-malburg mike-malburg marked this pull request as ready for review November 18, 2024 18:37
@mike-malburg mike-malburg self-assigned this Nov 18, 2024
@mike-malburg
Copy link
Collaborator Author

mike-malburg commented Nov 19, 2024

Version info

This is where I found the version info for all of these

dll project path info found in file version note
aom.dll aom/2a92df28-ec4b9bbdc2.clean\CMakeLists.txt CMakeLists.txt 3.9.1
avcodec-61.dll ffmpeg/.1-66161e9ebe.clean libavcodec/version_major.h, libavcodec/version.h 61.19.100
avdevice-61.dll ffmpeg/.1-66161e9ebe.clean libavdevice/version_major.h, libavdevice/version.h 61.3.100
avfilter-10.dll ffmpeg/.1-66161e9ebe.clean libavfilter/version_major.h, libavfilter/version.h 10.4.100
avformat-61.dll ffmpeg/.1-66161e9ebe.clean libavformat/version_major.h, libavformat/version.h 61.7.100
avutil-59.dll ffmpeg/.1-66161e9ebe.clean libavutil/version.h 59.39.100
dav1d.dll (N/A, already has version info)
libmp3lame.dll (N/A, already has version info)
ogg.dll libogg/.3.5-1a4243fef9.clean configure.ac 1.3.5 Using this: AC_INIT([libogg],[1.3.5],[[email protected]]). Also see CHANGES in root dir, referencing 1.3.5.
opus.dll opus/.5.2-81ed242155.clean ports/opus/vcpkg.json 1.5.2 The libtool version for this and the release version are different, but I was not able to get the release version from the source code. Vcpkg says it is 1.5.2, and this seems to be consistent with recent code changes made to the project.
swresample-5.dll ffmpeg/.1-66161e9ebe.clean libswresample/version_major.h, libswresample/version.h 5.3.100
swscale-8.dll ffmpeg/.1-66161e9ebe.clean libswscale/version_major.h, libswscale/version.h 8.3.100
vorbis.dll libvorbis/.3.7-c32164610e.clean configure.ac 1.3.7 Using this: AC_INIT([libvorbis],[1.3.7],[[email protected]])
vorbisenc.dll libvorbis/.3.7-c32164610e.clean configure.ac 2.0.12 Using these: VE_LIB_CURRENT=2, VE_LIB_REVISION=12, VE_LIB_AGE=0, plus get_version_info in CMakeLists.txt ({current-age}.{age}.{revision})
vorbisfile.dll libvorbis/.3.7-c32164610e.clean configure.ac 3.3.8 Using these: VF_LIB_CURRENT=6, VF_LIB_REVISION=8, VF_LIB_AGE=3, plus get_version_info in CMakeLists.txt ({current-age}.{age}.{revision})

@mike-malburg mike-malburg force-pushed the update/ffmpeg7.1 branch 2 times, most recently from dc39ff1 to eb8d423 Compare November 20, 2024 01:05
@mike-malburg
Copy link
Collaborator Author

mike-malburg commented Nov 20, 2024

@mike-malburg mike-malburg changed the title Update/ffmpeg7.1 Update FFMpeg to 7.1 Nov 20, 2024
@mike-malburg mike-malburg marked this pull request as draft November 20, 2024 20:54
@mike-malburg mike-malburg force-pushed the update/ffmpeg7.1 branch 2 times, most recently from 431f03c to 583a2b2 Compare November 21, 2024 21:31
@mike-malburg mike-malburg force-pushed the update/ffmpeg7.1 branch 2 times, most recently from e47252c to 48e6b83 Compare December 6, 2024 15:19
@mike-malburg mike-malburg force-pushed the update/ffmpeg7.1 branch 3 times, most recently from beb1436 to 4d9e99e Compare January 10, 2025 15:07
mike-malburg and others added 10 commits January 10, 2025 16:22
- Updated vcpkgHash to b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c (FFMpeg 7.1)
- Updated features for mac and windows builds to include WEBM support-related libs, some AV1 support, the ffmpeg command-line tool, and opencl support: +dav1d,opus,vpx,vorbis,aom,ffmpeg,opencl
- Copy tools dir for Mac during pre-stage
- Add support to finalize artifacts for exes and items in other dirs
- Add ability to optionally NOT delete the prestage dir (for easier debugging)
- Only copy non-library files if they don't already exist
- Made changes to better share build flags between mac, windows, and wasm builds
- Removed some redundant items from wasm build options
- Added in specific encoders, decoders, muxers, and demuxers for Mac and Windows builds.
- Moved wasm custom part inside of <Additional custom TechSmith options>
I also added a change to fail the build if the post-build step fails (Build.psm1 change).  This will prevent us from publishing a version of ffmpeg that failed tests in the post-build stage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants