diff options
author | Klaus Schmidinger <Klaus (dot) Schmidinger (at) tvdr (dot) de> | 2011-08-16 18:57:00 +0200 |
---|---|---|
committer | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2011-08-16 20:32:01 +0200 |
commit | 7df66b05874339d23c1ce35387a8d55579891a22 (patch) | |
tree | d93d4dadeefe0929817012be6786b39f916d7e72 /PLUGINS | |
parent | bd61fee1e9328aec470c319494cccb90e53302c2 (diff) | |
download | vdr-patches-7df66b05874339d23c1ce35387a8d55579891a22.tar.gz vdr-patches-7df66b05874339d23c1ce35387a8d55579891a22.tar.bz2 |
Version 1.7.20
Original announce message:
VDR developer version 1.7.20 is now available at
ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.20.tar.bz2
A 'diff' against the previous version is available at
ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.19-1.7.20.diff
MD5 checksums:
eda2911fff1715ba5b1482b20ad18188 vdr-1.7.20.tar.bz2
a8f5bcaf3294cc9fce87283a618d5ce1 vdr-1.7.19-1.7.20.diff
WARNING:
========
This is a developer version. Even though I use it in my productive
environment. I strongly recommend that you only use it under controlled
conditions and for testing and debugging.
This version contains functions to determine the "signal strength"
and "signal quality" through cDevice. If you are using a DVB card that
contains an stb0899 frontend chip (like the TT-budget S2-3200) you may
want to apply the patches from
ftp://ftp.tvdr.de/vdr/Developer/Driver-Patches
to the LinuxDVB driver source in order to receive useful results from
that frontend.
From the HISTORY file:
- Added some missing 'const' to tChannelID (reported by Sundararaj Reel).
- The isnumber() function now checks the given pointer for NULL (thanks to Holger
Dengler).
- Now checking Setup.InitialChannel for NULL before using it (reported by
Christoph Haubrich).
- cSkins::Message() now blocks calls from background threads (thanks to Michael
Eiler for reporting a crash in such a scenario).
- Fixed the return value of the svdrpsend.pl script in case of an error (thanks to
Jonas Diemer).
- Increased MAXCAIDS to 12 (thanks to Jerome Lacarriere).
- Fixed handling DiSEqC codes (thanks to Mark Hawes for reporting the bug, and
Udo Richter for suggesting the fix).
- Added a mechanism to defer timer handling in case of problems (reported by
Frank Niederwipper).
- Fixed distortions that happened when splitting recording into several files
(was a side effect of "Fixed detecting frames in case the Picture Start Code or
Access Unit Delimiter extends over TS packet boundaries" in version 1.7.19).
cRecorder::Action() now buffers TS packets in case the frame type is
not yet known when a new payload starts. This adds no overhead for channels
that broadcast the frame type within the first TS packet of a payload; it only
kicks in if that information is not in the first TS packet.
- Fixed handling the channelID in cMenuEditChanItem (thanks to Udo Richter).
- cStringList::Sort() can now be called with a boolean parameter that controls
case insensitive sorting (suggested by Sundararaj Reel).
- Now scanning new transponders before old ones, to make sure transponder changes
are recognized (thanks to Reinhard Nissl).
- Implemented static cIndexFile::IndexFileName().
- The length (as number of frames) of a recording's index file can now be determined
by a call to cIndexFile::GetLength() (suggested by Christoph Haubrich).
- Fixed some crashes in subtitle display (thanks to Rolf Ahrenberg).
- Made DELETENULL() thread safe (reported by Rolf Ahrenberg).
- The pic2mpg script of the 'pictures' plugin now generates HD images (thanks to
Andre Weidemann for his support in using convert/ffmpeg). The old SD version is
still available as pic2mpg-sd.
- Added a mutex to protect cOsd::Osds from simultaneous access from different threads
(reported by Rolf Ahrenberg).
- The cutter now sets the 'broken link' flag for MPEG2 TS recordings (thanks to
Oliver Endriss).
- Fixed language code entry for Portuguese.
- The new command line options --filesize (suggested by Marco Göbenich) and --split
can be used together with --edit to set the maximum video file size and turn on
splitting edited files at the editing marks. These options must be given before
--edit to have an effect.
- cTimeMs is no longer initialized to the current time if the value given to the
constructor is negative (avoids the "cTimeMs: using monotonic clock..." log message
before VDR's starting log message).
Diffstat (limited to 'PLUGINS')
-rw-r--r-- | PLUGINS/src/dvbhddevice/po/it_IT.po | 93 | ||||
-rw-r--r-- | PLUGINS/src/pictures/HISTORY | 10 | ||||
-rwxr-xr-x | PLUGINS/src/pictures/pic2mpg | 91 | ||||
-rwxr-xr-x | PLUGINS/src/pictures/pic2mpg-sd | 193 |
4 files changed, 324 insertions, 63 deletions
diff --git a/PLUGINS/src/dvbhddevice/po/it_IT.po b/PLUGINS/src/dvbhddevice/po/it_IT.po new file mode 100644 index 0000000..a328312 --- /dev/null +++ b/PLUGINS/src/dvbhddevice/po/it_IT.po @@ -0,0 +1,93 @@ +# VDR plugin language source file +# Copyright (C) 2011 Andreas Regel +# This file is distributed under the same license as the dvbhddevice package. +# Christoph Haubrich, 2011 +# +msgid "" +msgstr "" +"Project-Id-Version: VDR\n" +"Report-Msgid-Bugs-To: <see README>\n" +"POT-Creation-Date: 2011-05-05 20:34+0200\n" +"PO-Revision-Date: 2011-07-10 00:23+0100\n" +"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" +"Language-Team: <see README>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Italian\n" +"X-Poedit-Country: ITALY\n" +"X-Poedit-SourceCharset: utf-8\n" + +msgid "Automatic" +msgstr "Automatica" + +msgid "Letterbox 16/9" +msgstr "Letterbox 16:9" + +msgid "Letterbox 14/9" +msgstr "Letterbox 14:9" + +msgid "Pillarbox" +msgstr "Pillarbox" + +msgid "CentreCutOut" +msgstr "CentreCutOut" + +msgid "Always 16/9" +msgstr "Sempre 16:9" + +msgid "Disabled" +msgstr "Disabilitata" + +msgid "Analogue only" +msgstr "Solo analogica" + +msgid "Always" +msgstr "Sempre" + +msgid "HDMI only" +msgstr "Solo HDMI" + +msgid "Follow resolution" +msgstr "Risoluzione seguente" + +msgid "none" +msgstr "nessuna" + +msgid "Resolution" +msgstr "Risoluzione" + +msgid "TV format" +msgstr "Formato TV" + +msgid "Video Conversion" +msgstr "Conversione video" + +msgid "Analogue Video" +msgstr "Video analogico" + +msgid "Audio Delay (ms)" +msgstr "Ritardo audio (ms)" + +msgid "Audio Downmix" +msgstr "Scala Audio" + +msgid "OSD Size" +msgstr "Dimensione OSD" + +msgid "HDMI CEC" +msgstr "HDMI CEC" + +msgid "Remote Control Protocol" +msgstr "Protocollo controllo remoto" + +msgid "Remote Control Address" +msgstr "Indirizzo controllo remoto" + +msgid "High Level OSD" +msgstr "OSD alto livello" + +msgid "Allow True Color OSD" +msgstr "Permetti OSD True Color" + diff --git a/PLUGINS/src/pictures/HISTORY b/PLUGINS/src/pictures/HISTORY index 332d77c..964ab2e 100644 --- a/PLUGINS/src/pictures/HISTORY +++ b/PLUGINS/src/pictures/HISTORY @@ -45,3 +45,13 @@ VDR Plugin 'pictures' Revision History 2011-02-20: Version 0.1.0 - Fixed reallocating memory (reported by Paul Menzel). + +2011-07-23: + +- Now rotating images according to the EXIF 'Orientation' parameter. + +2011-08-14: + +- The pic2mpg script now generates HD images (thanks to Andre Weidemann for his + support in using convert/ffmpeg). The old SD version is still available as + pic2mpg-sd. diff --git a/PLUGINS/src/pictures/pic2mpg b/PLUGINS/src/pictures/pic2mpg index d317510..190ec26 100755 --- a/PLUGINS/src/pictures/pic2mpg +++ b/PLUGINS/src/pictures/pic2mpg @@ -7,62 +7,45 @@ # # See the README file for copyright information and how to reach the author. # -# $Id: pic2mpg 2.0 2008/02/29 14:34:22 kls Exp $ - -## TODO implement HDTV (1920 x 1080) +# $Id: pic2mpg 2.2 2011/08/14 13:34:15 kls Exp $ use File::Path; use File::Spec; use Getopt::Std; -use Image::Size; +use Image::ExifTool qw(:Public); $Usage = qq{ Usage: $0 [options] picture-dir mpeg-dir $0 [options] picture-file mpeg-file -Options: -a Aspect ratio 4:3 (default is 16:9) - -f Force conversion +Options: -f Force conversion -h print Help - -i Ignore unknown file types - -n NTSC (default is PAL) + -s size Screen size (WIDTHxHEIGHT, default is 1920x1080) -v num Verbose (0=none, 1=list files, 2=detailed) - -x percent X overscan in percent - -y percent Y overscan in percent }; -getopts("afhinv:x:y:") || die $Usage; +getopts("fhs:v:") || die $Usage; die $Usage if $opt_h; -$Aspect = $opt_a; $Force = $opt_f; -$Ignore = $opt_i; -$NTSC = $opt_n; +$Size = $opt_s || "1920x1080"; $Verbose = $opt_v; -$OverscanX = $opt_x; -$OverscanY = $opt_y; $ListFiles = $Verbose >= 1; $Detailed = $Verbose >= 2; -# Screen size: - -$SW = $NTSC ? 720 : 720; -$SH = $NTSC ? 480 : 576; - -$ScreenRatio = $Aspect ? 4 / 3 : 16 / 9; - -# Converter programs: - -%PNMCONV = ( - bmp => "bmptopnm", - gif => "giftopnm", - jpeg => "jpegtopnm", - jpg => "jpegtopnm", - png => "pngtopnm", - pnm => "cat", - tif => "tifftopnm", - tiff => "tifftopnm", +# Supported picture types: + +%PICTYPES = ( + bmp => 1, + gif => 1, + jpeg => 1, + jpg => 1, + png => 1, + pnm => 1, + tif => 1, + tiff => 1, ); # Command options: @@ -71,13 +54,6 @@ die "$0: missing parameter\n" unless $ARGV[0] && $ARGV[1]; die "$0: file or directory not found: $ARGV[0]\n" unless -e $ARGV[0]; die "$0: source and destination must be different\n" if $ARGV[0] eq $ARGV[1]; -$verbose1 = $Detailed ? "--verbose" : ""; -$verbose2 = $Detailed ? "-v 2" : "-v 0"; -$system1 = $NTSC ? "" : "--pal"; -$system2 = $NTSC ? "n" : "p"; -$framerate = $NTSC ? "30000:1001" : "25:1"; -$aspect = $Aspect ? "2" : "3"; - # Convert a single file: if (-f $ARGV[0]) { @@ -95,7 +71,7 @@ $MPGDIR = File::Spec->rel2abs($ARGV[1]); chdir($PICDIR) || die "$PICDIR: $!\n"; -@Pictures = `find -type f`; +@Pictures = `find -type f | sort`; chomp(@Pictures); for $pic (@Pictures) { @@ -145,29 +121,18 @@ sub ConvertFile { my ($Pict, $Mpeg) = @_; (my $Type) = lc($Pict) =~ /\.([^\.]*)$/; - if (!defined $PNMCONV{$Type}) { - return if ($Ignore); - die "unknown file type '$Type': '$Pict'\n"; - } - my ($w, $h) = imgsize($Pict); - print "image size is $w x $h\n" if ($Detailed); - if ($w / $h <= $ScreenRatio) { - $w = $h * $ScreenRatio; - } - else { - $h = $w / $ScreenRatio; - } - my $ScaleW = $SW / $w * (100 - 2 * $OverscanX) / 100; - my $ScaleH = $SH / $h * (100 - 2 * $OverscanY) / 100; + return if (!defined $PICTYPES{$Type}); + my $Exif = ImageInfo($Pict); + my $Orientation = $$Exif{"Orientation"}; + my ($Degrees) = $Orientation =~ /Rotate ([0-9]+) /; + my $Rotate = $Degrees ? "-rotate $Degrees" : ""; + print "orientation = '$Orientation' -> rotation = $Rotate\n" if ($Detailed); $Pict = EscapeMeta($Pict); $Mpeg = EscapeMeta($Mpeg); - print "$Pict -> $Mpeg\n" if $ListFiles; - 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 |" - . "mpeg2enc $verbose2 -f 3 -b 12500 -a $aspect -q 1 -n $system2 -o $Mpeg"; + print "$Pict -> $Mpeg $Rotate\n" if $ListFiles; + my $Cmd = "convert $Pict -background '#000000' $Rotate -resize $Size -gravity center -extent $Size ppm:- | " + . "ffmpeg -f image2pipe -vcodec ppm -i pipe:0 -an -vcodec libx264 -vpre baseline -s $Size -qscale 2 -f mpegts -y $Mpeg " + . ($Detailed ? "" : "2>/dev/null"); !system($Cmd) || die "$Cmd: $!\n"; $Cmd = "touch -r $Pict $Mpeg"; !system($Cmd) || die "$Cmd: $!\n"; diff --git a/PLUGINS/src/pictures/pic2mpg-sd b/PLUGINS/src/pictures/pic2mpg-sd new file mode 100755 index 0000000..6213091 --- /dev/null +++ b/PLUGINS/src/pictures/pic2mpg-sd @@ -0,0 +1,193 @@ +#!/usr/bin/perl + +# pic2mpg: Convert picture files to MPEG still frames +# +# Converts either a single picture file or all files in a +# given directory (recursively) to MPEG still frames. +# +# See the README file for copyright information and how to reach the author. +# +# $Id: pic2mpg 2.1 2011/07/23 14:23:59 kls Exp $ + +## TODO implement HDTV (1920 x 1080) + +use File::Path; +use File::Spec; +use Getopt::Std; +use Image::ExifTool qw(:Public); +use Image::Size; + +$Usage = qq{ +Usage: $0 [options] picture-dir mpeg-dir + $0 [options] picture-file mpeg-file + +Options: -a Aspect ratio 4:3 (default is 16:9) + -f Force conversion + -h print Help + -i Ignore unknown file types + -n NTSC (default is PAL) + -v num Verbose (0=none, 1=list files, 2=detailed) + -x percent X overscan in percent + -y percent Y overscan in percent +}; + +getopts("afhinv:x:y:") || die $Usage; + +die $Usage if $opt_h; + +$Aspect = $opt_a; +$Force = $opt_f; +$Ignore = $opt_i; +$NTSC = $opt_n; +$Verbose = $opt_v; +$OverscanX = $opt_x; +$OverscanY = $opt_y; + +$ListFiles = $Verbose >= 1; +$Detailed = $Verbose >= 2; + +# Screen size: + +$SW = $NTSC ? 720 : 720; +$SH = $NTSC ? 480 : 576; + +$ScreenRatio = $Aspect ? 4 / 3 : 16 / 9; + +# Converter programs: + +%PNMCONV = ( + bmp => "bmptopnm", + gif => "giftopnm", + jpeg => "jpegtopnm", + jpg => "jpegtopnm", + png => "pngtopnm", + pnm => "cat", + tif => "tifftopnm", + tiff => "tifftopnm", + ); + +# Command options: + +die "$0: missing parameter\n" unless $ARGV[0] && $ARGV[1]; +die "$0: file or directory not found: $ARGV[0]\n" unless -e $ARGV[0]; +die "$0: source and destination must be different\n" if $ARGV[0] eq $ARGV[1]; + +$verbose1 = $Detailed ? "--verbose" : ""; +$verbose2 = $Detailed ? "-v 2" : "-v 0"; +$system1 = $NTSC ? "" : "--pal"; +$system2 = $NTSC ? "n" : "p"; +$framerate = $NTSC ? "30000:1001" : "25:1"; +$aspect = $Aspect ? "2" : "3"; + +# Convert a single file: + +if (-f $ARGV[0]) { + die "$0: mixed file and directory ('$ARGV[0]' <-> '$ARGV[1]')\n" unless !-e $ARGV[1] || -f $ARGV[1]; + ConvertFile($ARGV[0], $ARGV[1]); + exit; + } + +die "$0: mixed directory and file ('$ARGV[0]' <-> '$ARGV[1]')\n" unless !-e $ARGV[1] || -d $ARGV[1]; + +$PICDIR = File::Spec->rel2abs($ARGV[0]); +$MPGDIR = File::Spec->rel2abs($ARGV[1]); + +# Convert pictures to mpegs: + +chdir($PICDIR) || die "$PICDIR: $!\n"; + +@Pictures = `find -type f`; +chomp(@Pictures); + +for $pic (@Pictures) { + my $mpg = "$MPGDIR/$pic.mpg"; + if ($Force || !-e $mpg || -M $mpg > -M $pic) { + (my $dir = $mpg) =~ s/\/[^\/]*$//; + mkpath($dir); + ConvertFile($pic, $mpg); + } + } + +# Remove mpegs without pictures: + +chdir($MPGDIR) || die "$MPGDIR: $!\n"; + +@Mpegs = `find -type f`; +chomp(@Mpegs); + +for $mpg (@Mpegs) { + my $pic = "$PICDIR/$mpg"; + $pic =~ s/\.mpg$//; + if (!-e $pic) { + print "removing $mpg\n"; + unlink($mpg); + } + } + +# Remove empty directories: + +chdir($MPGDIR) || die "$MPGDIR: $!\n"; + +for ($i = 0; $i < 10; $i++) { # dirs might become empty when removing empty subdirs + @Dirs = `find -type d -empty`; + chomp(@Dirs); + last unless @Dirs; + + for $dir (@Dirs) { + $dir = EscapeMeta($dir); + print "removing $dir\n"; + !system("rm -rf $dir") || die "$dir: $!\n"; + } + } + +# Actual file conversion: + +sub ConvertFile +{ + my ($Pict, $Mpeg) = @_; + (my $Type) = lc($Pict) =~ /\.([^\.]*)$/; + if (!defined $PNMCONV{$Type}) { + return if ($Ignore); + die "unknown file type '$Type': '$Pict'\n"; + } + my ($w, $h) = imgsize($Pict); + print "image size is $w x $h\n" if ($Detailed); + my $Exif = ImageInfo($Pict); + my $Orientation = $$Exif{"Orientation"}; + my ($Degrees) = $Orientation =~ /Rotate ([0-9]+) /; + my $Rotate = "-null"; + $Rotate = "-cw" if $Degrees eq "90"; + $Rotate = "-ccw" if $Degrees eq "270"; + $Rotate = "-r180" if $Degrees eq "180"; + print "orientation = '$Orientation' -> rotation = $Rotate\n" if ($Detailed); + ($w, $h) = ($h, $w) if ($Degrees eq "90" || $Degrees eq "270"); + if ($w / $h <= $ScreenRatio) { + $w = $h * $ScreenRatio; + } + else { + $h = $w / $ScreenRatio; + } + my $ScaleW = $SW / $w * (100 - 2 * $OverscanX) / 100; + my $ScaleH = $SH / $h * (100 - 2 * $OverscanY) / 100; + $Pict = EscapeMeta($Pict); + $Mpeg = EscapeMeta($Mpeg); + print "$Pict -> $Mpeg $Rotate\n" if $ListFiles; + my $Cmd = "$PNMCONV{$Type} $Pict 2> /dev/null |" + . "pamflip $verbose1 $Rotate |" + . "pnmscale $verbose1 --xscale=$ScaleW --yscale=$ScaleH |" + . "pnmpad $verbose1 --black --width $SW --height $SH |" + . "ppmntsc $verbose1 $system1 |" + . "ppmtoy4m $verbose2 -F $framerate -I p -S 420mpeg2 |" + . "mpeg2enc $verbose2 -f 3 -b 12500 -a $aspect -q 1 -n $system2 -o $Mpeg"; + !system($Cmd) || die "$Cmd: $!\n"; + $Cmd = "touch -r $Pict $Mpeg"; + !system($Cmd) || die "$Cmd: $!\n"; +} + +sub EscapeMeta +{ + my $META = ' !"#$%&\'()*;<>?[\\]`{|}~'; + my $s = shift; + $s =~ s/([$META])/\\$1/g; + return $s; +} |