From c6a2a1f8851bc3896a824219dfc5545a642fba45 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 18 Jul 2012 13:34:22 +0200 Subject: [PATCH 1/4] ffmpeg: Update to latest version 0.11.1. This is needed in order to enable x11grab, as it isn't included in 0.10. --- pkgs/development/libraries/ffmpeg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/default.nix b/pkgs/development/libraries/ffmpeg/default.nix index 3b5e28a2ee7f..9b90d56d4d90 100644 --- a/pkgs/development/libraries/ffmpeg/default.nix +++ b/pkgs/development/libraries/ffmpeg/default.nix @@ -21,11 +21,11 @@ assert vdpauSupport -> libvdpau != null; assert faacSupport -> faac != null; stdenv.mkDerivation rec { - name = "ffmpeg-0.10"; + name = "ffmpeg-0.11.1"; src = fetchurl { url = "http://www.ffmpeg.org/releases/${name}.tar.bz2"; - sha256 = "1ybzw6d5axr807141izvm2yf4pa0hc1zcywj89nsn3qsdnknlna3"; + sha256 = "b01ddfb6352c84810879988f43172c5f7be555697edb929625845c7bb953fa96"; }; # `--enable-gpl' (as well as the `postproc' and `swscale') mean that From 05831d3a668361b2948c0185eceb6d7c579c851a Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 18 Jul 2012 13:35:16 +0200 Subject: [PATCH 2/4] ffmpeg: Add option to enable x11grab support. This is especially useful if you want to do screencasts and other sorts of things like that. --- pkgs/development/libraries/ffmpeg/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/default.nix b/pkgs/development/libraries/ffmpeg/default.nix index 9b90d56d4d90..41768c4e313f 100644 --- a/pkgs/development/libraries/ffmpeg/default.nix +++ b/pkgs/development/libraries/ffmpeg/default.nix @@ -9,6 +9,7 @@ , vdpauSupport ? true, libvdpau ? null , faacSupport ? false, faac ? null , dc1394Support ? false, libdc1394 ? null +, x11grabSupport ? false, libXext ? null, libXfixes ? null }: assert speexSupport -> speex != null; @@ -19,6 +20,7 @@ assert x264Support -> x264 != null; assert xvidSupport -> xvidcore != null; assert vdpauSupport -> libvdpau != null; assert faacSupport -> faac != null; +assert x11grabSupport -> libXext != null && libXfixes != null; stdenv.mkDerivation rec { name = "ffmpeg-0.11.1"; @@ -48,7 +50,8 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional xvidSupport "--enable-libxvid" ++ stdenv.lib.optional vdpauSupport "--enable-vdpau" ++ stdenv.lib.optional faacSupport "--enable-libfaac --enable-nonfree" - ++ stdenv.lib.optional dc1394Support "--enable-libdc1394"; + ++ stdenv.lib.optional dc1394Support "--enable-libdc1394" + ++ stdenv.lib.optional x11grabSupport "--enable-x11grab"; buildInputs = [ pkgconfig lame yasm zlib bzip2 ] ++ stdenv.lib.optional mp3Support lame @@ -60,7 +63,8 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional xvidSupport xvidcore ++ stdenv.lib.optional vdpauSupport libvdpau ++ stdenv.lib.optional faacSupport faac - ++ stdenv.lib.optional dc1394Support libdc1394; + ++ stdenv.lib.optional dc1394Support libdc1394 + ++ stdenv.lib.optionals x11grabSupport [ libXext libXfixes ]; enableParallelBuilding = true; From d9f08cf6f26337efd5a3a4142c38a0963aba31c4 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 18 Jul 2012 17:27:24 +0200 Subject: [PATCH 3/4] ffmpeg: Add alsaLib to dependencies. As @cillianderoiste pointed out, it makes sense to have this in, not only to record audio while grabbing the display. This is not optional in this case, as it isn't a compile time option either. And on the other hand, having ffmpeg running with OSS doesn't appear reasonable to me, as ffmpeg will fall back to OSS if alsa isn't available anyway. --- pkgs/development/libraries/ffmpeg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/default.nix b/pkgs/development/libraries/ffmpeg/default.nix index 41768c4e313f..ee88fd0145cc 100644 --- a/pkgs/development/libraries/ffmpeg/default.nix +++ b/pkgs/development/libraries/ffmpeg/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, yasm, zlib, bzip2 +{ stdenv, fetchurl, pkgconfig, yasm, zlib, bzip2, alsaLib , mp3Support ? true, lame ? null , speexSupport ? true, speex ? null , theoraSupport ? true, libtheora ? null @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional dc1394Support "--enable-libdc1394" ++ stdenv.lib.optional x11grabSupport "--enable-x11grab"; - buildInputs = [ pkgconfig lame yasm zlib bzip2 ] + buildInputs = [ pkgconfig lame yasm zlib bzip2 alsaLib ] ++ stdenv.lib.optional mp3Support lame ++ stdenv.lib.optional speexSupport speex ++ stdenv.lib.optional theoraSupport libtheora From fe42f8add91b1616de94f878351f3dd5b44dbcdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= Date: Thu, 19 Jul 2012 04:37:33 +0200 Subject: [PATCH 4/4] ffmpeg: Add optional Jack audio support. The author of this commit is @cillianderoiste because he made the patch and I'm just committing it. This change adds support for Jack audio "while we're at it", see discussion at pull request #54. --- pkgs/development/libraries/ffmpeg/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/ffmpeg/default.nix b/pkgs/development/libraries/ffmpeg/default.nix index ee88fd0145cc..53868950598a 100644 --- a/pkgs/development/libraries/ffmpeg/default.nix +++ b/pkgs/development/libraries/ffmpeg/default.nix @@ -1,4 +1,5 @@ { stdenv, fetchurl, pkgconfig, yasm, zlib, bzip2, alsaLib +, jackSupport ? false, jackaudio ? null , mp3Support ? true, lame ? null , speexSupport ? true, speex ? null , theoraSupport ? true, libtheora ? null @@ -12,6 +13,7 @@ , x11grabSupport ? false, libXext ? null, libXfixes ? null }: +assert jackSupport -> jackaudio != null; assert speexSupport -> speex != null; assert theoraSupport -> libtheora != null; assert vorbisSupport -> libvorbis != null; @@ -54,6 +56,7 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional x11grabSupport "--enable-x11grab"; buildInputs = [ pkgconfig lame yasm zlib bzip2 alsaLib ] + ++ stdenv.lib.optional jackSupport jackaudio ++ stdenv.lib.optional mp3Support lame ++ stdenv.lib.optional speexSupport speex ++ stdenv.lib.optional theoraSupport libtheora