Jump to content

FFmpeg: Difference between revisions

From NixOS Wiki
M3vtfbp (talk | contribs)
Created page with "Building Ffmpeg with extra functionality. To install the maximum amount of functionality offered by Nix binary repositories, you may install ffmpeg like the following. environment.systemPackages = [ pkgs.ffmpeg-full ]; === 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 environme..."
Tags: Mobile edit Mobile web edit
 
Jat (talk | contribs)
Changed argument from withOpenGL to withOpengl due to error unexpected argument 'withOpenGL' ... Did you mean one of withOpenal, withOpencl or withOpengl?
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Building Ffmpeg with extra functionality. To install the maximum amount of functionality offered by Nix binary repositories, you may install ffmpeg like the following.
Building FFmpeg with extra functionality. To install the maximum amount of functionality offered by Nix binary repositories, you may install ffmpeg like the following.


<syntaxhighlight lang="nix">
environment.systemPackages = [
  pkgs.ffmpeg-full
];
</syntaxhighlight>


  environment.systemPackages = [
=== More codecs ===
    pkgs.ffmpeg-full
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
The Fraunhofer FDK AAC audio codec is said to give superior compression and audio quality to other AAC codecs. To install


  environment.systemPackages = [
<syntaxhighlight lang="nix">
    (pkgs.ffmpeg-full.override { withUnfree = true; })
environment.systemPackages = [
  ];
  (pkgs.ffmpeg-full.override { withUnfree = true; })
];
</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. To add FDK AAC AND OpenGL rendering support
 
<syntaxhighlight lang="nix">
  environment.systemPackages = [
environment.systemPackages = [
    (pkgs.ffmpeg-full.override { withUnfree = true; withOpenGL = true; })
  (pkgs.ffmpeg-full.override { withUnfree = true; withOpengl = true; })
   ];
   ];
</syntaxhighlight>
Using the pattern shown in previous examples, we can set the following options as true (enabled):


Using the pattern shown in previous examples, it is possible options to set the following options as true (enabled):
<code>
withUnfree # Currently only FDK AAC Codec
withOpengl # OpenGL rendering support
withRmtp  # RMTP support
withTensorflow # Tensorflow dnn backend support
</code>
=== 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.
<syntaxhighlight lang="nix">
environment.systemPackages = [
  ((pkgs.ffmpeg-full.override { withUnfree = true; }).overrideAttrs (_: { doCheck = false; }))
];
</syntaxhighlight>


  withUnfree # Currently only FDK AAC Codec
=== FFmpeg build information ===
  withOpenGL # OpenGL rendering support
https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/libraries/ffmpeg/generic.nix
  withRmtp  # RMTP support
  withTensorflow # Tensorflow dnn backend support


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 doChecks to false. Here is an example of adding FDK AAC support, and skipping post build checks.
[[Category:Audio]]
 
[[Category:Video]]
  environment.systemPackages = [
    ((pkgs.ffmpeg-full.override { withUnfree = true; }).overrideAttrs (_: { doCheck = false; }))
  ];

Latest revision as of 16:30, 12 January 2025

Building FFmpeg with extra functionality. To install the maximum amount of functionality offered by Nix binary repositories, you may install ffmpeg like the following.

environment.systemPackages = [
  pkgs.ffmpeg-full
];

More codecs

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

environment.systemPackages = [
  (pkgs.ffmpeg-full.override { withUnfree = true; })
];

It is possible to add support for more than one feature at a time. To add FDK AAC AND OpenGL rendering support

environment.systemPackages = [
  (pkgs.ffmpeg-full.override { withUnfree = true; withOpengl = true; })
  ];

Using the pattern shown in previous examples, we can set the following options as true (enabled):

withUnfree # Currently only FDK AAC Codec withOpengl # OpenGL rendering support withRmtp # RMTP support withTensorflow # Tensorflow dnn backend support

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.

environment.systemPackages = [
  ((pkgs.ffmpeg-full.override { withUnfree = true; }).overrideAttrs (_: { doCheck = false; }))
];

FFmpeg build information

https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/libraries/ffmpeg/generic.nix