FFmpeg: Difference between revisions

Jat (talk | contribs)
Changed argument from withOpenGL to withOpengl due to error unexpected argument 'withOpenGL' ... Did you mean one of withOpenal, withOpencl or withOpengl?
m Remove old build overrides (OpenGL), add Nvidia informations, clarify which options can be used to enable functionalities, give a list of disabled-per-default options as per the build informations.
Line 8: Line 8:


=== More codecs ===
=== More codecs ===
Adding more functionality to ffmpeg is possible, but it will require compiling on your local system.
Adding more functionality to FFmpeg is possible, but it will require compiling on your local system.


The Fraunhofer FDK AAC audio codec is said to give superior compression and audio quality to other AAC codecs. To install
Enabling unfree dependencies allow use of Nvidia features, the FDK AAC decoder, and a lot more. Review build informations to check which flags are enabled by this option:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 18: Line 18:
</syntaxhighlight>
</syntaxhighlight>


It is possible to add support for more than one feature at a time. To add FDK AAC AND OpenGL rendering support
It is possible to add support for more than one feature at a time. Here are some options disabled by default:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">environment.systemPackages = [
environment.systemPackages = [
   (pkgs.ffmpeg-full.override {  
   (pkgs.ffmpeg-full.override { withUnfree = true; withOpengl = true; })
    withUnfree = false; # Allow unfree dependencies (for Nvidia features notably)
  ];
    withMetal = false; # Use Metal API on Mac. Unfree and requires manual downloading of files
</syntaxhighlight>
    withMfx = false; # Hardware acceleration via the deprecated intel-media-sdk/libmfx. Use oneVPL instead (enabled by default) from Intel's oneAPI.
Using the pattern shown in previous examples, we can set the following options as true (enabled):
    withTensorflow = false; # Tensorflow dnn backend support (Increases closure size by ~390 MiB)
    withSmallBuild = false; # Prefer binary size to performance.
    withDebug = false; # Build using debug options
  })
];</syntaxhighlight>For more options and overrides, check out the FFmpeg build informations :
 
https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/libraries/ffmpeg/generic.nix


<code>
withUnfree # Currently only FDK AAC Codec
withOpengl # OpenGL rendering support
withRmtp  # RMTP support
withTensorflow # Tensorflow dnn backend support
</code>
=== Speeding up install ===
=== Speeding up install ===
It's possible to speed up the install. After compiling is finished, a series of generic checks are run. To skip these checks, we need to set doCheck to false. Here is an example of adding FDK AAC support, and skipping post build checks.
It's possible to speed up the install. After compiling is finished, a series of generic checks are run. To skip these checks, we need to set doCheck to false. Here is an example of adding FDK AAC support, and skipping post build checks.
Line 41: Line 41:


=== FFmpeg build information ===
=== FFmpeg build information ===
https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/libraries/ffmpeg/generic.nix
[[Category:Audio]]
[[Category:Audio]]
[[Category:Video]]
[[Category:Video]]