Commit b339dccb authored by Marton Balint's avatar Marton Balint Committed by Michael Niedermayer

lavc: add teletext decoder using libzvbi

Based on a patch by Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>.
http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2012-December/136677.html

The original patch was rebased by Tudor SUCIU <tudor.suciu@gmail.com>.

Lots of additional features and fixes are made by me.

Fixes ticket #2086.

Changes since last version:
- change default page to all pages
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent cf942994
...@@ -15,6 +15,7 @@ version <next> ...@@ -15,6 +15,7 @@ version <next>
data read from an input file data read from an input file
- incomplete Voxware MetaSound decoder - incomplete Voxware MetaSound decoder
- read EXIF metadata from JPEG - read EXIF metadata from JPEG
- DVB teletext decoder
version 2.0: version 2.0:
......
...@@ -242,6 +242,7 @@ External library support: ...@@ -242,6 +242,7 @@ External library support:
--enable-libxvid enable Xvid encoding via xvidcore, --enable-libxvid enable Xvid encoding via xvidcore,
native MPEG-4/Xvid encoder exists [no] native MPEG-4/Xvid encoder exists [no]
--enable-libzmq enable message passing via libzmq [no] --enable-libzmq enable message passing via libzmq [no]
--enable-libzvbi enable teletext support via libzvbi [no]
--enable-openal enable OpenAL 1.1 capture support [no] --enable-openal enable OpenAL 1.1 capture support [no]
--enable-opencl enable OpenCL code --enable-opencl enable OpenCL code
--enable-openssl enable openssl [no] --enable-openssl enable openssl [no]
...@@ -1205,6 +1206,7 @@ EXTERNAL_LIBRARY_LIST=" ...@@ -1205,6 +1206,7 @@ EXTERNAL_LIBRARY_LIST="
libxavs libxavs
libxvid libxvid
libzmq libzmq
libzvbi
openal openal
opencl opencl
openssl openssl
...@@ -2044,6 +2046,7 @@ libxavs_encoder_deps="libxavs" ...@@ -2044,6 +2046,7 @@ libxavs_encoder_deps="libxavs"
libxvid_encoder_deps="libxvid" libxvid_encoder_deps="libxvid"
libutvideo_decoder_deps="libutvideo" libutvideo_decoder_deps="libutvideo"
libutvideo_encoder_deps="libutvideo" libutvideo_encoder_deps="libutvideo"
libzvbi_teletext_decoder_deps="libzvbi"
# demuxers / muxers # demuxers / muxers
ac3_demuxer_select="ac3_parser" ac3_demuxer_select="ac3_parser"
...@@ -3767,6 +3770,7 @@ die_license_disabled gpl libvidstab ...@@ -3767,6 +3770,7 @@ die_license_disabled gpl libvidstab
die_license_disabled gpl libx264 die_license_disabled gpl libx264
die_license_disabled gpl libxavs die_license_disabled gpl libxavs
die_license_disabled gpl libxvid die_license_disabled gpl libxvid
die_license_disabled gpl libzvbi
die_license_disabled gpl x11grab die_license_disabled gpl x11grab
die_license_disabled nonfree libaacplus die_license_disabled nonfree libaacplus
...@@ -4245,6 +4249,7 @@ enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 & ...@@ -4245,6 +4249,7 @@ enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 &
enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
enabled libzmq && require_pkg_config libzmq zmq.h zmq_ctx_new enabled libzmq && require_pkg_config libzmq zmq.h zmq_ctx_new
enabled libzvbi && require libzvbi libzvbi.h vbi_decoder_new -lzvbi
enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do
check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } || check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } ||
die "ERROR: openal not found"; } && die "ERROR: openal not found"; } &&
...@@ -4635,6 +4640,7 @@ echo "threading support ${thread_type-no}" ...@@ -4635,6 +4640,7 @@ echo "threading support ${thread_type-no}"
echo "safe bitstream reader ${safe_bitstream_reader-no}" echo "safe bitstream reader ${safe_bitstream_reader-no}"
echo "SDL support ${sdl-no}" echo "SDL support ${sdl-no}"
echo "opencl enabled ${opencl-no}" echo "opencl enabled ${opencl-no}"
echo "libzvbi enabled ${libzvbi-no}"
echo "texi2html enabled ${texi2html-no}" echo "texi2html enabled ${texi2html-no}"
echo "perl enabled ${perl-no}" echo "perl enabled ${perl-no}"
echo "pod2man enabled ${pod2man-no}" echo "pod2man enabled ${pod2man-no}"
......
...@@ -158,4 +158,45 @@ ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1, ...@@ -158,4 +158,45 @@ ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b}. 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b}.
@end table @end table
@section libzvbi-teletext
Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
subtitles. Requires the presence of the libzvbi headers and library during
configuration. You need to explicitly configure the build with
@code{--enable-libzvbi}.
@subsection Options
@table @option
@item txt_page
List of teletext page numbers to decode. You may use the special * string to
match all pages. Pages that do not match the specified list are dropped.
Default value is *.
@item txt_chop_top
Discards the top teletext line. Default value is 1.
@item txt_format
Specifies the format of the decoded subtitles. The teletext decoder is capable
of decoding the teletext pages to bitmaps or to simple text, you should use
"bitmap" for teletext pages, because certain graphics and colors cannot be
expressed in simple text. You might use "text" for teletext based subtitles if
your application can handle simple text based subtitles. Default value is
bitmap.
@item txt_left
X offset of generated bitmaps, default is 0.
@item txt_top
Y offset of generated bitmaps, default is 0.
@item txt_chop_spaces
Chops leading and trailing spaces and removes empty lines from the generated
text. This option is useful for teletext based subtitles where empty spaces may
be present at the start or at the end of the lines or empty lines may be
present between the subtitle lines because of double-sized teletext charactes.
Default value is 1.
@item txt_duration
Sets the display duration of the decoded teletext pages or subtitles in
miliseconds. Default value is 30000 which is 30 seconds.
@item txt_transparent
Force transparent background of the generated teletext bitmaps. Default value
is 0 which means an opaque (black) background.
@end table
@c man end SUBTILES DECODERS @c man end SUBTILES DECODERS
...@@ -133,6 +133,20 @@ Go to @url{https://github.com/dekkers/libilbc} and follow the instructions for ...@@ -133,6 +133,20 @@ Go to @url{https://github.com/dekkers/libilbc} and follow the instructions for
installing the library. Then pass @code{--enable-libilbc} to configure to installing the library. Then pass @code{--enable-libilbc} to configure to
enable it. enable it.
@section libzvbi
libzvbi is a VBI decoding library which can be used by FFmpeg to decode DVB
teletext pages and DVB teletext subtitles.
Go to @url{http://sourceforge.net/projects/zapping/} and follow the instructions for
installing the library. Then pass @code{--enable-libzvbi} to configure to
enable it.
@float NOTE
libzvbi is licensed under the GNU General Public License Version 2 or later
(see @url{http://www.gnu.org/licenses/old-licenses/gpl-2.0.html} for details),
you must upgrade FFmpeg's license to GPL in order to use it.
@end float
@chapter Supported File Formats, Codecs or Features @chapter Supported File Formats, Codecs or Features
...@@ -947,6 +961,7 @@ performance on systems without hardware floating point support). ...@@ -947,6 +961,7 @@ performance on systems without hardware floating point support).
@item 3GPP Timed Text @tab @tab @tab X @tab X @item 3GPP Timed Text @tab @tab @tab X @tab X
@item AQTitle @tab @tab X @tab @tab X @item AQTitle @tab @tab X @tab @tab X
@item DVB @tab X @tab X @tab X @tab X @item DVB @tab X @tab X @tab X @tab X
@item DVB teletext @tab @tab X @tab @tab E
@item DVD @tab X @tab X @tab X @tab X @item DVD @tab X @tab X @tab X @tab X
@item JACOsub @tab X @tab X @tab @tab X @item JACOsub @tab X @tab X @tab @tab X
@item MicroDVD @tab X @tab X @tab @tab X @item MicroDVD @tab X @tab X @tab @tab X
...@@ -969,6 +984,8 @@ performance on systems without hardware floating point support). ...@@ -969,6 +984,8 @@ performance on systems without hardware floating point support).
@code{X} means that the feature is supported. @code{X} means that the feature is supported.
@code{E} means that support is provided through an external library.
@section Network Protocols @section Network Protocols
@multitable @columnfractions .4 .1 @multitable @columnfractions .4 .1
......
...@@ -727,6 +727,7 @@ OBJS-$(CONFIG_LIBWAVPACK_ENCODER) += libwavpackenc.o ...@@ -727,6 +727,7 @@ OBJS-$(CONFIG_LIBWAVPACK_ENCODER) += libwavpackenc.o
OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o
OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o
OBJS-$(CONFIG_LIBXVID_ENCODER) += libxvid.o OBJS-$(CONFIG_LIBXVID_ENCODER) += libxvid.o
OBJS-$(CONFIG_LIBZVBI_TELETEXT_DECODER) += libzvbi-teletextdec.o
# parsers # parsers
OBJS-$(CONFIG_AAC_PARSER) += aac_parser.o aac_ac3_parser.o \ OBJS-$(CONFIG_AAC_PARSER) += aac_parser.o aac_ac3_parser.o \
......
...@@ -505,6 +505,7 @@ void avcodec_register_all(void) ...@@ -505,6 +505,7 @@ void avcodec_register_all(void)
REGISTER_ENCODER(LIBX264RGB, libx264rgb); REGISTER_ENCODER(LIBX264RGB, libx264rgb);
REGISTER_ENCODER(LIBXAVS, libxavs); REGISTER_ENCODER(LIBXAVS, libxavs);
REGISTER_ENCODER(LIBXVID, libxvid); REGISTER_ENCODER(LIBXVID, libxvid);
REGISTER_DECODER(LIBZVBI_TELETEXT, libzvbi_teletext);
REGISTER_ENCODER(LIBAACPLUS, libaacplus); REGISTER_ENCODER(LIBAACPLUS, libaacplus);
/* text */ /* text */
......
This diff is collapsed.
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "libavutil/avutil.h" #include "libavutil/avutil.h"
#define LIBAVCODEC_VERSION_MAJOR 55 #define LIBAVCODEC_VERSION_MAJOR 55
#define LIBAVCODEC_VERSION_MINOR 30 #define LIBAVCODEC_VERSION_MINOR 31
#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment