Control: tags -1 confirmed patch
Hi Jan,
2016-04-25 12:43 GMT+02:00 Jan Gerber :
> Package: ffmpeg
> Version: 7:3.0.1-3
> Severity: wishlist
>
> Dear Maintainer,
>
> FFmpeg 3.0 introduced a new ocr filter that depends on libtesseract.
> Would be nice to see this enabled in Debian.
I have prepared a patch which may be enough.
It needs testing however. Sebastian, what do you think?
Maybe we could enable some other features as well.
Cheers,
Balint
From 72f545c2900bf65ea44e4f9465b08332c4b0610e Mon Sep 17 00:00:00 2001
From: Balint Reczey
Date: Tue, 6 Sep 2016 14:34:25 +0200
Subject: [PATCH] Enable OCR using Tesseract in libavfilter-extra*
Closes: 822555
---
debian/control | 54 -
debian/libavfilter-extra6.install | 1 +
debian/libavfilter-extra6.install.powerpc | 2 ++
debian/libavfilter-extra6.lintian-overrides | 9 +
debian/rules| 19 +-
5 files changed, 74 insertions(+), 11 deletions(-)
create mode 100644 debian/libavfilter-extra6.install
create mode 100644 debian/libavfilter-extra6.install.powerpc
create mode 100644 debian/libavfilter-extra6.lintian-overrides
diff --git a/debian/control b/debian/control
index e7bf9d7..2841992 100644
--- a/debian/control
+++ b/debian/control
@@ -68,6 +68,8 @@ Build-Depends:
libavc1394-dev [linux-any],
# autodetected: indev 'jack'
libjack-jackd2-dev,
+# missing dependency of libtesseract-dev #836849
+ libleptonica-dev,
# autodetected for the tiff decoder
liblzma-dev,
# --enable-libmodplug
@@ -108,6 +110,8 @@ Build-Depends:
libspeex-dev,
# --enable-libssh
libssh-gcrypt-dev,
+# --enable-libtesseract (used only in -extra flavor)
+ libtesseract-dev,
# --enable-libtheora
libtheora-dev,
# --enable-libtwolame
@@ -370,13 +374,61 @@ Description: FFmpeg library containing media filters - runtime files
.
This package contains the runtime files.
+Package: libavfilter-extra6
+Architecture: any
+Section: libs
+Priority: extra
+Multi-Arch: same
+Conflicts: libavfilter6
+Provides: libavfilter-extra
+Pre-Depends:
+ ${misc:Pre-Depends}
+Depends:
+ ${shlibs:Depends},
+ ${misc:Depends}
+Description: FFmpeg library with extra media filters - runtime files
+ FFmpeg is the leading multimedia framework, able to decode, encode, transcode,
+ mux, demux, stream, filter and play pretty much anything that humans and
+ machines have created. It supports the most obscure ancient formats up to the
+ cutting edge.
+ .
+ This library provides a generic audio/video filtering framework containing
+ several filters, sources and sinks.
+ .
+ This package replaces the libavfilter6 package and contains the
+ following additional filters:
+ .
+ * Optical Character Recognition (uses Tesseract)
+ .
+ Because this package links against libraries that are licensed under
+ Apache License 2.0, the resulting binaries are distributed under the
+ GPL version 3 or later.
+
+Package: libavfilter-extra
+Architecture: all
+Section: metapackages
+Priority: extra
+Multi-Arch: foreign
+Depends:
+ libavfilter-extra6,
+ ${misc:Depends}
+Description: FFmpeg library with extra filters (metapackage)
+ FFmpeg is the leading multimedia framework, able to decode, encode, transcode,
+ mux, demux, stream, filter and play pretty much anything that humans and
+ machines have created. It supports the most obscure ancient formats up to the
+ cutting edge.
+ .
+ This metapackage depends on the latest version of the libavfilter variant
+ that offers additional filter support. Application packages can depend
+ on it if they require or suggest this variant in a robust manner.
+
Package: libavfilter-dev
Architecture: any
Section: libdevel
Multi-Arch: same
Depends:
libavcodec-dev (= ${binary:Version}),
- libavfilter6 (= ${binary:Version}),
+ libavfilter6 (= ${binary:Version}) | libavfilter-extra6 (= ${binary:Version}),
libavformat-dev (= ${binary:Version}),
libavresample-dev (= ${binary:Version}),
libavutil-dev (= ${binary:Version}),
diff --git a/debian/libavfilter-extra6.install b/debian/libavfilter-extra6.install
new file mode 100644
index 000..1b2648c
--- /dev/null
+++ b/debian/libavfilter-extra6.install
@@ -0,0 +1 @@
+usr/lib/*/libavfilter.so.*
diff --git a/debian/libavfilter-extra6.install.powerpc b/debian/libavfilter-extra6.install.powerpc
new file mode 100644
index 000..628ec8f
--- /dev/null
+++ b/debian/libavfilter-extra6.install.powerpc
@@ -0,0 +1,2 @@
+usr/lib/*/libavfilter.so.*
+usr/lib/*/*/libavfilter.so.*
diff --git a/debian/libavfilter-extra6.lintian-overrides b/debian/libavfilter-extra6.lintian-overrides
new file mode 100644
index 000..5e6db9b
--- /dev/null
+++ b/debian/libavfilter-extra6.lintian-overrides
@@ -0,0 +1,9 @@
+# According to Debian policy [1], non position independent code is permitted
+# in a shared library on i386 and position independent code may have a
+# performance penalty, especially on i386.
+#