Commit e3124d41 authored by tiber-guest's avatar tiber-guest Committed by etobi

Installing the pictures plugin now with vdr-plugin-examples

SVN: trunk@7029
parent 921d0363
......@@ -310,24 +310,3 @@ yourself! The optional patches are mainly intended for people who would like to
create their own customized vdr distribution.
-- Tobias Grimm <tg@e-tobi.net>, Thu, 3 Jun 2004 02:20:00 +0100
The Pictures Plugin
--------------------
The pictures plugin requires the pictures to be already converted to mpeg files.
A separate tool called `pic2mpg' is provided to convert a directory of pictures.
This tool will use the mjpegtools package to convert the pictures to MPEG2, if
available. mjpegtools is not part of Debian, but is available at
http://mjpeg.sourceforge.net or in third party repositories like
http://debian-multimedia.org.
If mjpegtools is not available, ffmpeg will be used to convert the pictures to
MPEG1 instead.
In order to display the pictures, you must tell the plugin, where to find them.
You can do so in /etc/vdr/plugins/plugin.pictures.conf.
Please read the documentation in /usr/share/doc/vdr-plugin-pictures/README
carefully, as the pictures plugin is very restrictive about the picture
directory layout.
vdr (1.6.0-3) UNRELEASED; urgency=low
* Installing the pictures plugin now with vdr-plugin-examples
-- Tobias Grimm <tg@e-tobi.net> Sat, 14 Jun 2008 15:39:38 +0200
vdr (1.6.0-2) unstable; urgency=low
[ Tobias Grimm ]
......
......@@ -83,20 +83,3 @@ Description: Plugins for vdr to show some possible features
These plugins do not have useful features, they only demonstrate
how vdr-plugins work and what is possible to do with them.
XB-VDR-Patchlevel: ${vdr:Patchlevel}
Package: vdr-plugin-pictures
Architecture: any
Section: misc
Depends: ${shlibs:Depends}, vdr (= ${binary:Version}), ${perl:Depends},
libimage-size-perl, netpbm, mjpegtools | ffmpeg
Description: Plugin for vdr providing a very basic picture viewer
Video Disk Recorder (VDR) is a digital sat-receiver program using
Linux and DVB technologies. It allows one to record MPEG2 streams,
as well as output the stream to TV.
.
This package contains the pictures-plugin, which provides a very
basic picture viewer. It assumes, that the pictures are converted
to MPEG frames.
.
A separate tool called `pic2mpg' is provided to convert pictures.
XB-VDR-Patchlevel: ${vdr:Patchlevel}
01_pic2mpg-debian
03_cmdsubmenu
04_newplugin
06_default_svdrp_port_0
......
#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_pic2mpg-debian.dpatch by Tobias Grimm <tg@e-tobi.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: If mpeg2enc is not available, use ffmpeg to create an MPEG1
## DP: instead. (Debian does not have any MPEG2 encoders).
@DPATCH@
diff -urNad vdr-1.5.16~/PLUGINS/src/pictures/pic2mpg vdr-1.5.16/PLUGINS/src/pictures/pic2mpg
--- vdr-1.5.16~/PLUGINS/src/pictures/pic2mpg 2008-02-02 12:34:43.000000000 +0100
+++ vdr-1.5.16/PLUGINS/src/pictures/pic2mpg 2008-02-28 01:40:52.000000000 +0100
@@ -14,6 +14,7 @@
use File::Path;
use Getopt::Std;
use Image::Size;
+use File::Temp qw/ tempfile tempdir /;
$Usage = qq{
Usage: $0 [options] picture-dir mpeg-dir
@@ -164,9 +165,23 @@
my $Cmd = "$PNMCONV{$Type} $Pict 2> /dev/null |"
. "pnmscale $verbose1 --xscale=$ScaleW --yscale=$ScaleH |"
. "pnmpad $verbose1 --black --width $SW --height $SH |"
- . "ppmntsc $verbose1 $system1 |"
- . "ppmtoy4m $verbose2 -F $framerate -I p -S 420mpeg2 |"
+ . "ppmntsc $verbose1 $system1 |";
+
+ if (-e "/usr/bin/mpeg2enc") {
+ $Cmd .= "ppmtoy4m $verbose2 -F $framerate -I p -S 420mpeg2 |"
. "mpeg2enc $verbose2 -f 3 -b 12500 -a $aspect -q 1 -n $system2 -o $Mpeg";
+ }
+ else
+ {
+ my $tempdir = tempdir("/tmp/pic2mpg-XXXX");
+ $Cmd .= "ppmtojpeg >$tempdir/01.jpg;"
+ . "ln -sf $tempdir/01.jpg $tempdir/02.jpg;"
+ . "ln -sf $tempdir/01.jpg $tempdir/03.jpg;"
+ . "ln -sf $tempdir/01.jpg $tempdir/04.jpg;"
+ . "ffmpeg -i $tempdir/%2d.jpg -f mpeg1video -y -b 12500 -r $framerate $Mpeg;"
+ . "rm -rf $tempdir";
+ }
+
!system($Cmd) || die "$Cmd: $!\n";
$Cmd = "touch -r $Pict $Mpeg";
!system($Cmd) || die "$Cmd: $!\n";
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
.TH PIC2MPG "1" "March 2008" "pic2mpg " "User Commands"
.SH NAME
pic2mpg \- convert pictures to MPEG for the VDR pictures plugin
.SH SYNOPSIS
\fBpic2mpg\fR [\fIoptions\fR] \fIpicture-dir mpeg-dir\fR
\fBpic2mpg\fR [\fIoptions\fR] \fIpicture-file mpeg-file\fR
.SH DESCRIPTION
\fBpic2mpg\fR converts pictures found in a source dir to MPEG frames and writes
the MPEG files to the target dir. Instead of specifiying directories, single
files can be specified as well.
\fBpic2mpg\fR and the 'pictures' plugin require a particular directory structure
in order to work properly. Starting at some base directory
(e.g. "/path/to/pictures"), there is one directory level marking the year in
which the pictures were taken, followed by a level with a properly sortable
combination of month and description, and finally the plain picture files, as in
/path/to/pictures/YEAR/MONTH_DESCRIPTION/*.jpg
For example
/path/to/pictures/2007/06a_Vacation_in_Colorado/dsc01234.jpg
/path/to/pictures/2007/06a_Vacation_in_Colorado/dsc01235.jpg
/path/to/pictures/2007/06b_Our_cat/dsc01236.jpg
The MONTH is "01" for January through "12" for December. If there is more
than one entry for one month, it should be followed by a letter to make them
sort correctly. Note that this is just a suggestion on how to make the
directories sort in the correct chronological order. Instead of the two digit
month number, optionally followed by a letter, you can use anything else you
like. There must be an underscore between the MONTH and the DESCRIPTION part,
and any underscores within the DESCRIPTION will be converted to blanks when
displaying the description (this is done so that blanks can be avoided in
the directory names).
.PP
.SH OPTIONS
.LP
.TP
\fB\-a\fR
Aspect ratio 4:3 (default is 16:9)
.TP
\fB\-f\fR
Force conversion
.TP
\fB\-h\fR
print Help
.TP
\fB\-i\fR
Ignore unknown file types
.TP
\fB\-n\fR
NTSC (default is PAL)
.TP
\fB\-v\fR <\fInum\fP>
Verbose (0=none, 1=list files, 2=detailed)
.TP
\fB\-x\fR <\fIpercent\fP>
X overscan in percent
.TP
\fB\-y\fR <\fIpercent\fP>
Y overscan in percent
.PP
.SH "AUTHORS"
.LP
This man-page has been written by Tobias Grimm <tg@e\-tobi.net>
.PP
Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU General Public License, Version 2 any
later version published by the Free Software Foundation.
.PP
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common\-licenses/GPL-2.
.PP
.SH "SEE ALSO"
The full documentation for
.B pic2mpg
is available in /usr/share/doc/vdr-plugin-pictures/README
#
# Command line parameters for vdr-plugin-pictures
#
# For more details see /usr/share/doc/vdr-plugin-pictures/README
#
# Specify the pictures directory here:
# --dir=/mnt/pictures.MPG
......@@ -95,6 +95,9 @@ install: build patchlevel
dh_installdirs
dh_install
chmod +x $(CURDIR)/debian/vdr/usr/lib/vdr/vdr-*
for example in hello osddemo pictures servicedemo skincurses status svdrpdemo; do \
install -D PLUGINS/src/$$example/README $(CURDIR)/debian/vdr-plugin-examples/usr/share/doc/vdr-plugin-examples/README.$$example; \
done
# Build architecture-independent files here.
binary-indep: build install
......@@ -132,7 +135,7 @@ binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installdebconf -a
dh_installdocs -a -Nvdr-dbg -Nvdr-plugin-examples
dh_installdocs -a -Nvdr-dbg
dh_installexamples -a
dh_installmenu -a
# dh_installlogrotate -a
......@@ -146,7 +149,7 @@ binary-arch: build install
# dh_undocumented -a
dh_installchangelogs -pvdr HISTORY
dh_installchangelogs -pvdr-plugin-sky PLUGINS/src/sky/HISTORY
dh_installchangelogs -pvdr-plugin-pictures PLUGINS/src/pictures/HISTORY
dh_installchangelogs -pvdr-plugin-examples
dh_link -a
dh_strip -a -Xvdr-dbg
dh_compress -a
......
PLUGINS/src/pictures/pic2mpg
......@@ -5,3 +5,4 @@ PLUGINS/lib/libvdr-svcsvr.so.* usr/lib/vdr/plugins/
PLUGINS/lib/libvdr-skincurses.so.* usr/lib/vdr/plugins/
PLUGINS/lib/libvdr-status.so.* usr/lib/vdr/plugins/
PLUGINS/lib/libvdr-svdrpdemo.so.* usr/lib/vdr/plugins/
PLUGINS/lib/libvdr-pictures.so.* usr/lib/vdr/plugins/
usr/share/man/man1/vdr.1.gz usr/share/man/man1/vdr-plugin-examples.1.gz
usr/share/doc/vdr usr/share/doc/vdr-plugin-examples
PLUGINS/lib/libvdr-pictures.so.* usr/lib/vdr/plugins/
PLUGINS/src/pictures/pic2mpg usr/bin/
debian/plugin.pictures.conf etc/vdr/plugins/
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