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

feat(ffmpeg): enhance codec support and hardware encoder handling across platforms #1154

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

skrashevich
Copy link
Contributor

This Pull Request introduces significant updates to the handling and verification of encoders within our ffmpeg configuration for various operating systems. The changes aim to improve reliability and performance when deploying on diverse hardware setups. Below is a detailed outline of the modifications included:

  1. Core Configuration Updates (ffmpeg.go):

    • Integrated functionality to retrieve a comprehensive list of available encoders directly from ffmpeg using the command line. This addition ensures that our software dynamically adapicates based on the available encoders on the system.
  2. Platform-Specific Hardware Encoder Checks:

    • Darwin (hardware_darwin.go) and Unix (hardware_unix.go):
      • Added checks to verify if specific codecs are supported before attempting to use them. This preventative measure avoids runtime errors and optimizes encoder selection based on actual hardware capabilities.
  3. New Helper Modules (encoders.go and encoders_test.go):

    • Developed new modules to parse and test the encoder listings provided by ffmpeg. These tools facilitate accurate validation of encoder support, enhancing the robustness of our application.

Overall, this update ensures a more stable and optimized usage of hardware encoders, tailored to the capabilities of the host machine, thereby improving media processing efficiency and reliability.

- Introduced `helpers` package for FFmpeg encoder parsing and support checking.
- Modified hardware probing to use new encoder support functions.
- Added tests for encoder parsing and support detection.
- Introduced checkAndRun function to consolidate encoder support checks and command execution.
- Refactored ProbeAll and ProbeHardware functions for better readability and maintainability.
- Removed redundant helper imports in platform-specific files.
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.

1 participant