[vdr] [Patch] add support for drive speed to vdr-dvd

2007-11-11 Thread Sebastian Kemper
Hello all,

here's a proposal for speed control for vdr-dvd. It uses SG_IO and 
GPCMD_SET_STREAMING so there's no need for VDR to run as root. The user 
needs rw permissions on the drive, though. When the plug-in is 
terminated the drive will be set to its initial speed (vacuum cleaner 
mode).
The code is heavily based on mplayer (thank you). I tested it with 
vdr-1.4.6 and a vdr-dvd snapshot on a NEC ND-3500 and it works just 
fine. The user can set the speed between 1x and 4x - I figure that's 
enough - in the OSD plug-in setup. If set to 0 the patch won't kick in. 
In case the users sets it to zero _while_ he/she is watching a dvd the 
speed will still be reset because of a DvdSetSpeedActive flag.

Kernel and headers have to support the commands for the patch to work 
but the plug-in should compile and work even on older kernels.

All feedback is very welcome.

Regards
Sebastian
diff -Nur dvd.old/i18n.c dvd/i18n.c
--- dvd.old/i18n.c	2007-09-16 18:36:41.0 +0200
+++ dvd/i18n.c	2007-11-10 14:43:11.0 +0100
@@ -280,6 +280,32 @@
 #endif
 },
 {
+ Setup.DVD$DVD-ROM Speed,
+DVD-ROM-Geschwindigkeit,  // Deutsch
+DVD-ROM Speed,// Slovenski
+DVD-ROM Speed,// Italiano
+DVD-ROM Speed,// Nederlands
+DVD-ROM Speed,// Português
+DVD-ROM Speed,// Français
+DVD-ROM Speed,// Norsk
+DVD-ROM Speed,// suomi
+DVD-ROM Speed,// Polski
+DVD-ROM Speed,// Español
+DVD-ROM Speed,// ÅëëçíéêÜ (Greek)
+DVD-ROM Speed,// Svenska
+DVD-ROM Speed,// Romaneste
+DVD-ROM Speed,// Magyar
+DVD-ROM Speed,// Català
+DVD-ROM Speed,// ÀãááÚØÙ (Russian)
+DVD-ROM Speed,// Hrvatski (Croatian)
+DVD-ROM Speed,// Eesti
+DVD-ROM Speed,// Dansk
+DVD-ROM Speed,// Czech
+#if VDRVERSNUM = 10502
+DVD-ROM Speed // Türkçe
+#endif
+},
+{
 Setup.DVD$Gain (analog),
 Verstärkung (analog), // Deutsch
 Ojaèanje (analogno),  // Slovenski
diff -Nur dvd.old/player-dvd.c dvd/player-dvd.c
--- dvd.old/player-dvd.c	2007-09-17 21:04:43.0 +0200
+++ dvd/player-dvd.c	2007-11-10 17:40:57.0 +0100
@@ -35,6 +35,11 @@
 #include control-dvd.h
 #include dvd.h
 
+/* Needed for DvdSetSpeed() */
+#include linux/cdrom.h
+#include scsi/sg.h
+#include sys/ioctl.h
+
 /**
  * this was weak's solution of a forced
  * SPU only stream choice,
@@ -252,6 +257,7 @@
 bool cDvdPlayer::HasBitStreamOut = false;
 bool cDvdPlayer::HasSoftDeviceOut = false;
 bool cDvdPlayer::SoftDeviceOutActive = false;
+bool cDvdPlayer::DvdSetSpeedActive = false;
 
 const int cDvdPlayer::MaxAudioTracks= 0x20;
 const int cDvdPlayer::AudioTrackMask= 0x1F;
@@ -565,6 +571,93 @@
 #endif
 }
 
+/* This function was ripped off of mplayer without remorse ;-) */
+void cDvdPlayer::DvdSetSpeed(const char *device, int speed)
+{
+#if defined(SG_IO)  defined(GPCMD_SET_STREAMING)
+  int fd;
+  unsigned char buffer[28];
+  unsigned char cmd[16];
+  unsigned char sense[16];
+  struct sg_io_hdr sghdr;
+  struct stat st;
+
+  memset(sghdr, 0, sizeof(sghdr));
+  memset(buffer, 0, sizeof(buffer));
+  memset(sense, 0, sizeof(sense));
+  memset(cmd, 0, sizeof(cmd));
+  memset(st, 0, sizeof(st));
+
+  if (stat(device, st) == -1) {
+esyslog(ERROR: dvd-plugin: DVD device %s doesn't exist, device);
+return;
+  }
+
+  if (!S_ISBLK(st.st_mode)) {
+esyslog(ERROR: dvd-plugin: DVD device %s is not a block device, device);
+return;
+  }
+
+  if ((fd = open(device, O_RDWR | O_NONBLOCK)) == -1) {
+esyslog(ERROR: dvd-plugin: Failed to open DVD device %s O_RDWR | O_NONBLOCK, device);
+return;
+  }
+
+  if (speed  100  speed  0) { /* speed times 1350KB/s (DVD single speed) */
+speed *= 1350;
+  }
+
+  switch (speed) {
+  case 0: /* don't touch speed setting */
+close(fd);
+return;
+  case -1: /* restore default value */
+speed = 0;
+buffer[0] = 4; /* restore default */
+isyslog(dvd-plugin: Restoring initial DVD drive speed);
+break;
+  default: /* limit to speed KB/s */
+isyslog(dvd-plugin: Limiting speed to %d KB/s, speed);
+break;
+  }
+
+  sghdr.interface_id = 'S';
+  

[vdr] demuxing subtitles with projectx

2007-11-11 Thread Davide Cavalca
Hello everybody,
I've recorded some shows (with subtitles) with vdr 1.5.10, I wanted to
demux the recordings with projectx but it looks like it has some
problems coping with the new subtitles; the error is suppic unknown
cmd: 44, a full log follows:

 session infos 

domenica 11 novembre 2007  10.50.56 CET
ProjectX 0.90.4.00 (30.03.2006)

- working with collection 0

- save normal log file
- write all video data
- write all other data
- patch c.d.flagged infos of pictures
- add sequence end code
- set resolution in SDE
- PVA: strictly specs. for audio streams
- VOB: determine diff. Cell timelines
- TS: ignore scrambled packets
- TS: enhanced search for open packets
- TS: join file segments (of Dreambox®)
- TS: generate PMT stream dependent
- get only enclosed PES/TS packets
- concatenate different recordings
- ensure 1st PES-packet start with video
- generate PCR/SCR from PTS

- write output files to:
'C:\Temp\DA_BRUCIARE\Registrazioni\Doctor_Who\FICTION_-_45\2007-10-20.18.55.50.99.rec'
- 2 cutpoint(s) defined ( (0) use BytePos. for cuts )

- Input File 0:
'C:\Temp\DA_BRUCIARE\Registrazioni\Doctor_Who\FICTION_-_45\2007-10-20.18.55.50.99.rec\001.vdr'
 

(2.097.333.244 bytes)
- Filetype is PES (incl. MPEG Video)
- demux
! missing startcode @ 218537190
! found startcode @ 218538278
- found PES-ID 0xE0 (MPEG Video) @ 218538278
- found PES-ID 0xC0 (MPEG Audio) @ 218544422
- cut-in @ GOP# 7 / new vframe 0 / new Timecode 00:00:00.000 (220865764)
- video basics: 720*576 @ 25fps @ 0.6735 (4:3) @ 1500bps, vbvBuffer 112
- starting export of video data @ GOP# 7
! dropping useless B-Frames @ GOP# 7 / new Timecode 00:00:00.000
- found PES-ID 0xBD (private stream 1) (SubID 0x25) @ 229272805
- found PES-ID 0xBD (private stream 1) (SubID 0x23) @ 229334265
- found PES-ID 0xBD (private stream 1) (SubID 0x21) @ 229351426
- found PES-ID 0xBD (private stream 1) (SubID 0x20) @ 229358347
- found PES-ID 0xBD (private stream 1) @ 229406199
- found PES-ID 0xBD (private stream 1) (SubID 0x26) @ 232178735
! dropping GOP# 4586 @ orig.PTS 12:25:33.428 (4026008537), errorcode: 24
! Pics exp/cnt 12/11, inGOP PTS diff. 0ms, new Timecode 00:36:37.840
! PTS difference of 43200 (00:00:00.480) to last exported GOP detected
! dropping useless B-Frames @ GOP# 4587 / new Timecode 00:36:37.840
- cut-out @ GOP# 5395 (1747800629)

- Video: fr/ ct/ 1p/ cg/ og/ dg - 64640/ 15/ 0/ 5387/ 0/ 1
- Video length: 64640 frames @ 00:43:05.600
- GOP summary: min. 20, max. 24 fields; contains interlaced frames
- avg. nom. bitrate 4396807bps (min/max: 3484400/5476800)
- set first sequenceheader bitrate to 5476800bps
--- new File:
C:\Temp\DA_BRUCIARE\Registrazioni\Doctor_Who\FICTION_-_45\2007-10-20.18.55.50.99.rec\001.m2v

-- MPEG Audio (0xC0)
- check CRC of AC-3 / MPEG-Audio L1,2
- delete CRC in MPEG-Audio Layer1,2
- add frames
Audio PTS: first packet 11:48:51.718, last packet 12:32:04.798
Video PTS: start 1.GOP 11:48:55.588, end last GOP 12:32:01.748
- adjusting audio at video-timeline
- src_audio: MPEG-1, Layer2, 48000Hz, dual, 256kbps, CRC @ 00:00:00.000
! 2 frame(s) (48ms) inserted @ 00:35:04.728
! 2 frame(s) (48ms) inserted @ 00:35:40.248
! 2 frame(s) (48ms) inserted @ 00:35:43.008
! 2 frame(s) (48ms) inserted @ 00:35:44.088
! 2 frame(s) (48ms) inserted @ 00:35:45.048
! 2 frame(s) (48ms) inserted @ 00:36:37.728
audio frames: wri/pre/skip/ins/add 107733/0/0/12/0 @ 00:43:05.592 done...
--- new File:
'C:\Temp\DA_BRUCIARE\Registrazioni\Doctor_Who\FICTION_-_45\2007-10-20.18.55.50.99.rec\001.mp2'

-- Subpicture (SubID 0x25)
- selected DVB subpicture color model: (0) 4 colors ; fixed to page id:

- export format: sup
- temp. file: 001.sp (670820 bytes)
!  4 PTSs discarded in stream
Subpicture PTS: first packet 11:49:11.978, last packet 12:32:02.372
Video PTS: start 1.GOP 11:48:55.588, end last GOP 12:32:01.748
- adjusting subpicture at video-timeline
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! suppic unknown cmd: 44
! 

Re: [vdr] vdr-1.5.11 subtitling problems

2007-11-11 Thread Jose Alberto Reguero
El Sábado, 10 de Noviembre de 2007, Reinhard Nissl escribió:
 Hi,

 Reinhard Nissl schrieb:
  Though, a cleaner solution would be to fix the result buffer to allow
  retrieving any packet as soon as it is completely available in the
  buffer (final subtitle packets are about 100 bytes in size).
 
  That sounds like the right thing to do.
  Can you suggest a patch for this?
 
  I hope to get something ready till tomorrow 12:00.

 See attachment. Tested in transfer mode with audio packets only (=
 radio), as there is no broadcast running which would provide subtitles.

 Bye.

This patch fix problems with pvrinput radio an CRepacker.
Thanks.
Jose Alberto

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an I-frame?

2007-11-11 Thread Klaus Schmidinger
On 11/01/07 13:21, Stefan Huelswitt wrote:
 On 01 Nov 2007 Klaus Schmidinger [EMAIL PROTECTED] wrote:
 
 I'm looking for a method to convert a JPEG image to an
 MPEG-2 I-frame that can be displayed through VDR's
 cDevice::StillPicture() function. The conversion should
 be done by a (sequence of) shell command(s).
 
 May be something like this:
 
 #!/bin/bash
 #
 # requires: ...topnm, pnmscale, pnmcomp, ppmntsc, ppmtoy4m, mpeg2enc
 #
 ...

When I display a picture generated with this script through a call
to DeviceStillPicture(), the display looks very nice for a short while,
and after that slanted lines get jagged. It appears as if the two
interlaced half-pictures are first sent in turn, and finally only
one of them is displayed continuously.

Calling DeviceStillPicture() repeatedly in a loop results in the
display jumping between nice and jagged.

So I thought about sending the picture file to the device through
cPlayer::PlayPes() in a continuous loop. For that purpose I have
added a call to 'mplex' to the script, as can be seen in the attachment.

When I display such a still file on a FF DVB card by calling cPlayer::PlayPes()
in a continuous loop, the image on the tv screen looks like it is
displaying both interlaced half-pictures in turn, but it is jumpy (as if
the time between displaying the two half pictures is too long).


Does anybody have an idea how this could be improved, so that
I get a smooth display, with slanted lines not jagged (just as if
a still picture was shown in a normal movie)?

Klaus

#!/bin/bash
#
# requires: ...topnm, pnmscale, pnmcomp, ppmntsc, ppmtoy4m, mpeg2enc
#

# video format. pal or ntsc
FORMAT=pal

# target image width/height (taking into account visible screen area)
if [ $FORMAT = ntsc ]; then
  TW=600
  TH=420
else
  TW=632
  TH=512
fi

TMP1=/tmp/image_convert.$$.pnm
TMP2=/tmp/image_convert.$$.m2v
IMG=$1
MPG=$2

DIR=`dirname $MPG`
if [ ! -d $DIR ]; then
  mkdir -p $DIR
fi
#
# get the file type and set the according converter to PNM
#
FILE_TYPE=`file -i -L -b $IMG 2/dev/null | cut -f2 -d/`
case $FILE_TYPE in
  jpg | jpeg)
  TO_PNM=jpegtopnm
  ;;
  tiff)
  TO_PNM=tifftopnm
  ;;
  bmp | x-bmp)
  TO_PNM=bmptoppm
  ;;
  png | x-png)
  TO_PNM=pngtopnm
  ;;
  Netpbm | pnm | x-portable-pixmap)
  TO_PNM=cat
  ;;
  gif)
  TO_PNM=giftopnm
  ;;
  *)
  echo filetype '$FILE_TYPE' is not supported
  exit 1
  ;;
esac
#
# 'chroma subsampling mode' mjpegtools = 1.8.0
#
SUBSAMPLINGMODE=
if ppmtoy4m -h | egrep -q '420mpeg2'; then
SUBSAMPLINGMODE=-S 420mpeg2
fi
#
# extract the image size  compute scale value
#
LANG=C # get the decimal point right
$TO_PNM $IMG $TMP1 2/dev/null
S=`pnmfile $TMP1 | awk '{ printf %d %d ,$4,$6 }'`
S=`echo $S $TW $TH | awk '{ sw=$3/$1; sh=$4/$2; s=(swsh)?sw:sh; printf 
%.4f\n,(s1)?1.0:s; }'`
#
# now run the conversion
#
if [ $FORMAT = ntsc ]; then
  pnmscale $S $TMP1 | \
pnmpad -black -width 704 -height 480 | \
ppmntsc | \
ppmtoy4m -v 0 -n 1 -r -F 3:1001 $SUBSAMPLINGMODE | \
mpeg2enc -f 7 -T 90 -F 4 -nn -a 2 -v 0 -o $TMP2
else
  pnmscale $S $TMP1 | \
pnmpad -black -width 704 -height 576 | \
ppmntsc --pal | \
ppmtoy4m -v 0 -n 1 -r -F 25:1 $SUBSAMPLINGMODE | \
mpeg2enc -f 7 -T 90 -F 3 -np -a 2 -v 0 -o $TMP2
fi
mplex -f 7 -o $MPG $TMP2
#
# cleanup
#
rm $TMP1 $TMP2
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] demuxing subtitles with projectx

2007-11-11 Thread Davide Cavalca
Davide Cavalca ha scritto:
 Hello everybody,
 I've recorded some shows (with subtitles) with vdr 1.5.10, I wanted to
 demux the recordings with projectx but it looks like it has some
 problems coping with the new subtitles; the error is suppic unknown
 cmd: 44

Just tried with the last ProjectX CVS and the problem is still there, 
it's also mentioned at
http://www.vdr-portal.de/board/thread.php?threadid=69771page=2 (scroll 
to half the page for another log)

Davide Cavalca
davide125(at)tiscali.it


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an I-frame?

2007-11-11 Thread Klaus Schmidinger
On 11/11/07 15:20, Reinhard Nissl wrote:
 Hi,
 
 Klaus Schmidinger schrieb:
 
 When I display a picture generated with this script through a call
 to DeviceStillPicture(), the display looks very nice for a short while,
 and after that slanted lines get jagged. It appears as if the two
 interlaced half-pictures are first sent in turn, and finally only
 one of them is displayed continuously.

 Calling DeviceStillPicture() repeatedly in a loop results in the
 display jumping between nice and jagged.

 So I thought about sending the picture file to the device through
 cPlayer::PlayPes() in a continuous loop. For that purpose I have
 added a call to 'mplex' to the script, as can be seen in the attachment.

 When I display such a still file on a FF DVB card by calling 
 cPlayer::PlayPes()
 in a continuous loop, the image on the tv screen looks like it is
 displaying both interlaced half-pictures in turn, but it is jumpy (as if
 the time between displaying the two half pictures is too long).


 Does anybody have an idea how this could be improved, so that
 I get a smooth display, with slanted lines not jagged (just as if
 a still picture was shown in a normal movie)?
 
 How does the attached PES file look like? In vdr-xine, I send it just
 once and it looks OK in xine.
 
 When it looks ok, I'll have to search for the commands which created it ;-)
 
 I think, I had specified an option to create progressive frames.

After running your file through

  mplex -f 7 -o test.mpg noSignal.mpg

and displaying test.mpg trough cPlayer::PlayPes() I get a pefectly
smooth display.

Would be great if you could find the commands that created this one.

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an I-frame?

2007-11-11 Thread Klaus Schmidinger
On 11/11/07 15:30, Klaus Schmidinger wrote:
 On 11/11/07 15:20, Reinhard Nissl wrote:
 Hi,

 Klaus Schmidinger schrieb:

 When I display a picture generated with this script through a call
 to DeviceStillPicture(), the display looks very nice for a short while,
 and after that slanted lines get jagged. It appears as if the two
 interlaced half-pictures are first sent in turn, and finally only
 one of them is displayed continuously.

 Calling DeviceStillPicture() repeatedly in a loop results in the
 display jumping between nice and jagged.

 So I thought about sending the picture file to the device through
 cPlayer::PlayPes() in a continuous loop. For that purpose I have
 added a call to 'mplex' to the script, as can be seen in the attachment.

 When I display such a still file on a FF DVB card by calling 
 cPlayer::PlayPes()
 in a continuous loop, the image on the tv screen looks like it is
 displaying both interlaced half-pictures in turn, but it is jumpy (as if
 the time between displaying the two half pictures is too long).


 Does anybody have an idea how this could be improved, so that
 I get a smooth display, with slanted lines not jagged (just as if
 a still picture was shown in a normal movie)?
 How does the attached PES file look like? In vdr-xine, I send it just
 once and it looks OK in xine.

 When it looks ok, I'll have to search for the commands which created it ;-)

 I think, I had specified an option to create progressive frames.
 
 After running your file through
 
   mplex -f 7 -o test.mpg noSignal.mpg
 
 and displaying test.mpg trough cPlayer::PlayPes() I get a pefectly
 smooth display.
 
 Would be great if you could find the commands that created this one.

One more thing: the 'file' command reports

  MPEG sequence, v2, [EMAIL PROTECTED] interlaced Y'CbCr 4:2:0 video, 4CIF PAL, 
4:3, 25 fps

on a file created with the posted script (before the mplex call),
while for your noSignal.mpg it reports

  MPEG sequence, v2, [EMAIL PROTECTED] interlaced Y'CbCr 4:2:0 video, CCIR/ITU 
PAL 625, 4:3, 25 fps

Maybe this indicates where the problem might be?

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an I-frame?

2007-11-11 Thread Reinhard Nissl
Hi,

Klaus Schmidinger schrieb:

 How does the attached PES file look like? In vdr-xine, I send it just
 once and it looks OK in xine.

 When it looks ok, I'll have to search for the commands which created it ;-)

 I think, I had specified an option to create progressive frames.

 After running your file through

   mplex -f 7 -o test.mpg noSignal.mpg

You're right. That's why it nolonger has the extension .pes ;-)

 and displaying test.mpg trough cPlayer::PlayPes() I get a pefectly
 smooth display.

 Would be great if you could find the commands that created this one.

See attachment. This is what file says about my input file:

noSignal.png: PNG image data, 720 x 576, 8-bit/color RGB, non-interlaced

 One more thing: the 'file' command reports
 
   MPEG sequence, v2, [EMAIL PROTECTED] interlaced Y'CbCr 4:2:0 video, 4CIF 
 PAL, 4:3, 25 fps
 
 on a file created with the posted script (before the mplex call),
 while for your noSignal.mpg it reports
 
   MPEG sequence, v2, [EMAIL PROTECTED] interlaced Y'CbCr 4:2:0 video, 
 CCIR/ITU PAL 625, 4:3, 25 fps
 
 Maybe this indicates where the problem might be?

Don't think so.

Bye.
-- 
Dipl.-Inform. (FH) Reinhard Nissl
mailto:[EMAIL PROTECTED]


mkNoSignal.sh
Description: application/shellscript
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an I-frame?

2007-11-11 Thread Klaus Schmidinger
On 11/11/07 15:45, Reinhard Nissl wrote:
 Hi,
 
 Klaus Schmidinger schrieb:
 
 How does the attached PES file look like? In vdr-xine, I send it just
 once and it looks OK in xine.

 When it looks ok, I'll have to search for the commands which created it ;-)

 I think, I had specified an option to create progressive frames.
 After running your file through

   mplex -f 7 -o test.mpg noSignal.mpg
 
 You're right. That's why it nolonger has the extension .pes ;-)
 
 and displaying test.mpg trough cPlayer::PlayPes() I get a pefectly
 smooth display.

 Would be great if you could find the commands that created this one.
 
 See attachment. This is what file says about my input file:
 
 noSignal.png: PNG image data, 720 x 576, 8-bit/color RGB, non-interlaced
 
 One more thing: the 'file' command reports

   MPEG sequence, v2, [EMAIL PROTECTED] interlaced Y'CbCr 4:2:0 video, 4CIF 
 PAL, 4:3, 25 fps

 on a file created with the posted script (before the mplex call),
 while for your noSignal.mpg it reports

   MPEG sequence, v2, [EMAIL PROTECTED] interlaced Y'CbCr 4:2:0 video, 
 CCIR/ITU PAL 625, 4:3, 25 fps

 Maybe this indicates where the problem might be?
 
 Don't think so.

Looks like it is the file size.
I have now changed the line

  mpeg2enc -f 7 -T 90 -F 3 -np -a 2 -v 0 -o $TMP2

to

  mpeg2enc -f 7 -T 40 -F 3 -np -a 2 -v 0 -o $TMP2

so that the resulting file is about the same size as yours, and now
my images also are smooth. However, this most likely means that the
picture resolution is now reduced.

Maybe sending a large I-frame continuously causes trouble in the FF DVB cards.



Is there a way to generate a sequence of one (large) I-frame, followed
by some number of P-frames, which indicate that there is no change in
the image data? Like creating an MPEG sequence from a set of still
images, where all stills are the same.

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an I-frame?

2007-11-11 Thread Reinhard Nissl
Hi,

Klaus Schmidinger schrieb:

 Looks like it is the file size.
 I have now changed the line
 
   mpeg2enc -f 7 -T 90 -F 3 -np -a 2 -v 0 -o $TMP2
 
 to
 
   mpeg2enc -f 7 -T 40 -F 3 -np -a 2 -v 0 -o $TMP2
 
 so that the resulting file is about the same size as yours, and now
 my images also are smooth. However, this most likely means that the
 picture resolution is now reduced.
 
 Maybe sending a large I-frame continuously causes trouble in the FF DVB cards.
 
 Is there a way to generate a sequence of one (large) I-frame, followed
 by some number of P-frames, which indicate that there is no change in
 the image data? Like creating an MPEG sequence from a set of still
 images, where all stills are the same.

Hhm, if you set -n 3 for ppmtoy4m, mpeg2enc should detect, that there
are no changes.

Bye.
-- 
Dipl.-Inform. (FH) Reinhard Nissl
mailto:[EMAIL PROTECTED]

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an I-frame?

2007-11-11 Thread Klaus Schmidinger
On 11/11/07 16:05, Reinhard Nissl wrote:
 Hi,
 
 Klaus Schmidinger schrieb:
 
 Looks like it is the file size.
 I have now changed the line

   mpeg2enc -f 7 -T 90 -F 3 -np -a 2 -v 0 -o $TMP2

 to

   mpeg2enc -f 7 -T 40 -F 3 -np -a 2 -v 0 -o $TMP2

 so that the resulting file is about the same size as yours, and now
 my images also are smooth. However, this most likely means that the
 picture resolution is now reduced.

 Maybe sending a large I-frame continuously causes trouble in the FF DVB 
 cards.

 Is there a way to generate a sequence of one (large) I-frame, followed
 by some number of P-frames, which indicate that there is no change in
 the image data? Like creating an MPEG sequence from a set of still
 images, where all stills are the same.
 
 Hhm, if you set -n 3 for ppmtoy4m, mpeg2enc should detect, that there
 are no changes.

The command sequence I use now looks like this:

  pnmscale $S $TMP1 | \
  pnmpad -black -width 704 -height 576 | \
  ppmntsc --pal | \
  ppmtoy4m -F 25:1 -A 4:3 -I p -r -S 420mpeg2 -v 2 -n 3 | \
  mpeg2enc -f 7 -a 2 -q 1 -n p -I 0 -T 120 -R 2 -g 10 -G 12 -o $TMP2
  mplex -f 7 -o $MPG $TMP2

and results in a file with three I-frames:

   INFO: [mplex] VIDEO_STATISTICS: e1
   INFO: [mplex] Video Stream length:  316949 bytes
   INFO: [mplex] Sequence headers:3
   INFO: [mplex] Sequence ends   :2
   INFO: [mplex] No. Pictures:3
   INFO: [mplex] No. Groups  :3
   INFO: [mplex] No. I Frames:3 avg. size105649 bytes
   INFO: [mplex] No. P Frames:0 avg. size 0 bytes
   INFO: [mplex] No. B Frames:0 avg. size 0 bytes

So it's a step forward, but we need to make this one I- and two (or more)
P-frames.

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an I-frame?

2007-11-11 Thread Reinhard Nissl
Hi,

Klaus Schmidinger schrieb:

 Hhm, if you set -n 3 for ppmtoy4m, mpeg2enc should detect, that there
 are no changes.
 
 The command sequence I use now looks like this:
 
   pnmscale $S $TMP1 | \
   pnmpad -black -width 704 -height 576 | \
   ppmntsc --pal | \
   ppmtoy4m -F 25:1 -A 4:3 -I p -r -S 420mpeg2 -v 2 -n 3 | \
   mpeg2enc -f 7 -a 2 -q 1 -n p -I 0 -T 120 -R 2 -g 10 -G 12 -o $TMP2
   mplex -f 7 -o $MPG $TMP2
 
 and results in a file with three I-frames:
 
INFO: [mplex] VIDEO_STATISTICS: e1
INFO: [mplex] Video Stream length:  316949 bytes
INFO: [mplex] Sequence headers:3
INFO: [mplex] Sequence ends   :2
INFO: [mplex] No. Pictures:3
INFO: [mplex] No. Groups  :3
INFO: [mplex] No. I Frames:3 avg. size105649 bytes
INFO: [mplex] No. P Frames:0 avg. size 0 bytes
INFO: [mplex] No. B Frames:0 avg. size 0 bytes
 
 So it's a step forward, but we need to make this one I- and two (or more)
 P-frames.

Try these options:

mpeg2enc -f 8 -a 2 -q 1 -n p -I 0 -T 120 -R 0 -g 10 -G 12 -o noSignal.mpg

But I still think that there is no need to repeat anything. Sending a
progressive I-frame as still image should be sufficient, no matter what
size the file has. Don't know whether the DVB-API has some limitations
regarding image size of still frames.

Bye.
-- 
Dipl.-Inform. (FH) Reinhard Nissl
mailto:[EMAIL PROTECTED]

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an I-frame?

2007-11-11 Thread Klaus Schmidinger
On 11/11/07 16:54, Reinhard Nissl wrote:
 Hi,
 
 Klaus Schmidinger schrieb:
 
 Hhm, if you set -n 3 for ppmtoy4m, mpeg2enc should detect, that there
 are no changes.
 The command sequence I use now looks like this:

   pnmscale $S $TMP1 | \
   pnmpad -black -width 704 -height 576 | \
   ppmntsc --pal | \
   ppmtoy4m -F 25:1 -A 4:3 -I p -r -S 420mpeg2 -v 2 -n 3 | \
   mpeg2enc -f 7 -a 2 -q 1 -n p -I 0 -T 120 -R 2 -g 10 -G 12 -o $TMP2
   mplex -f 7 -o $MPG $TMP2

 and results in a file with three I-frames:

INFO: [mplex] VIDEO_STATISTICS: e1
INFO: [mplex] Video Stream length:  316949 bytes
INFO: [mplex] Sequence headers:3
INFO: [mplex] Sequence ends   :2
INFO: [mplex] No. Pictures:3
INFO: [mplex] No. Groups  :3
INFO: [mplex] No. I Frames:3 avg. size105649 bytes
INFO: [mplex] No. P Frames:0 avg. size 0 bytes
INFO: [mplex] No. B Frames:0 avg. size 0 bytes

 So it's a step forward, but we need to make this one I- and two (or more)
 P-frames.
 
 Try these options:
 
 mpeg2enc -f 8 -a 2 -q 1 -n p -I 0 -T 120 -R 0 -g 10 -G 12 -o noSignal.mpg

Doing this (with both -f8 and -f7) didn't show anything when
sent via DeviceStillPicture(). I then ran it through mplex
and sent it via PlayPes(), and then I got a picture, but again it was
jagged.

 But I still think that there is no need to repeat anything. Sending a
 progressive I-frame as still image should be sufficient, no matter what
 size the file has. Don't know whether the DVB-API has some limitations
 regarding image size of still frames.

From all I saw today, it only works if the file is not much larger than 40KB,
and if I send it continuously. If I send it only once (even if it has only
40KB) it is jagged.

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an I-frame?

2007-11-11 Thread Reinhard Nissl
Hi,

Klaus Schmidinger schrieb:

 But I still think that there is no need to repeat anything. Sending a
 progressive I-frame as still image should be sufficient, no matter what
 size the file has. Don't know whether the DVB-API has some limitations
 regarding image size of still frames.
 
 From all I saw today, it only works if the file is not much larger than 40KB,
 and if I send it continuously. If I send it only once (even if it has only
 40KB) it is jagged.

Do you get the same jagged images when editing cutting marks? Most
likely such an I frame isn't larger than 40 KB.

Bye.
-- 
Dipl.-Inform. (FH) Reinhard Nissl
mailto:[EMAIL PROTECTED]

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an I-frame?

2007-11-11 Thread Klaus Schmidinger
On 11/11/07 17:29, Reinhard Nissl wrote:
 Hi,
 
 Klaus Schmidinger schrieb:
 
 But I still think that there is no need to repeat anything. Sending a
 progressive I-frame as still image should be sufficient, no matter what
 size the file has. Don't know whether the DVB-API has some limitations
 regarding image size of still frames.
 From all I saw today, it only works if the file is not much larger than 40KB,
 and if I send it continuously. If I send it only once (even if it has only
 40KB) it is jagged.
 
 Do you get the same jagged images when editing cutting marks? Most
 likely such an I frame isn't larger than 40 KB.

Yes, they are smooth for a brief moment, and then get jagged.

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [Announce] vdr-fritzbox-0.0.9

2007-11-11 Thread Joachim Wilke
Dear Fritz!Box- and VDR-Users,

a new version of the Fritz!Box Plugin is available at
http://joachim-wilke.de/index.htm?alias=vdr-fritz

- - -

The Fritz!Box Plugin connects to your Fritz!Box to inform you about
incoming calls. The plugin can automatically mute or pause VDR when a
call comes in.

Via VDR's main menu you can browse your Fritz!Box phone book, the call
lists and initiate calls out of all lists.

- - -

The last changes are:
2007-11-11: Version 0.0.9
- added cHttpClient for handling HTTP requests; removing end of file detection
  in caller classes
- improved cCallList parser to work around lines starting with '#'
  (as found in current Fritz!Box Labor Firmware version)
- call list now works with Fritz!Box Beta-Firmware 29.04.44-9163
  (reported by Ryker [20])
- this may fix problems with firmware CH/A FRITZ!Box Fon WLAN 7140
Version 39.04.43 too
  (reported by Joe [19])
- Fritz!Box phonebook supports new Fritz!Box Beta-Firmware 29.04.44-9163
  (only one number per name is supported for now)
- all communication to the Fritz!Box Webinterface is now protected
with a mutex to
  avoid conflicts of concurrent request from different threads
- retry delay on communication failures is now increased up to one hour
  to avoid flooding the syslog
- added missing translation in i18n.c to support still-popular old
versions of vdr
  (reported by Torsten [17])
- some firmware version do not sort the telephone book, the plugin now sorts the
  entries itself
- removing '!' prefix when displaying Fritz!Box telephonebook VIP-entries
  (suggested by Oliver [18])
- supporting multiple phone numbers per entry in newest Fritz!Box
firmware versions
   added new column in phonebook view, marking (H)ome, (M)obile and (W)ork
   on incoming calls this type is shown as well
   this is ignored for older firmware versions
- fixed a segfault when accessing the plugins main menu with no
telephonebook selected
  (reported by Thomas [16])
- the call details menu now issues a reverse lookup if the name of the caller
  is not known yet

- - -

Regards,
Joachim.

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an I-frame?

2007-11-11 Thread Reinhard Nissl
Hi,

Klaus Schmidinger schrieb:

 Do you get the same jagged images when editing cutting marks? Most
 likely such an I frame isn't larger than 40 KB.
 
 Yes, they are smooth for a brief moment, and then get jagged.

I recall this behavior when I had a FF card for testing. Maybe it's a
feature to stop flickering one pixel high horizontal lines in still
images by doubling one field of the frame. Maybe there exists a switch
to turn this feature off.

You've tried to repeat an I frame forever. Try to remove the sequence
end code (00 00 01 B7) from the end of the file before mplexing and the
MPEG program end code (00 00 01 B9) from the file after mplexing. Maybe
remove everything up to the first video PES packet from the final file.

Bye.
-- 
Dipl.-Inform. (FH) Reinhard Nissl
mailto:[EMAIL PROTECTED]

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] vdr-xine-0.8.0 plugin

2007-11-11 Thread Reinhard Nissl
Hi,

Luca Olivetti schrieb:

 Is it possible that newer version generate more traffic/are more 
 sensible to network latencies?

Yes, at least in the buffer monitoring phase, which was introduced with
0.7.7. Try to set it to 0 in vdr-xine's setup menu.

I'll need some time to provide a proper fix for this issue.

Bye.
-- 
Dipl.-Inform. (FH) Reinhard Nissl
mailto:[EMAIL PROTECTED]

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] vdr-xine-0.8.0 plugin

2007-11-11 Thread Luca Olivetti
En/na Reinhard Nissl ha escrit:
 Hi,
 
 Luca Olivetti schrieb:
 
 Is it possible that newer version generate more traffic/are more 
 sensible to network latencies?
 
 Yes, at least in the buffer monitoring phase, which was introduced with
 0.7.7. Try to set it to 0 in vdr-xine's setup menu.

That was it! Thank you. Incidentally, that was the only parameter I 
didn't touch ;-)


Bye
-- 
Luca

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to convert a JPEG image to an I-frame?

2007-11-11 Thread Girish Venkatachalam
On 21:03:29 Nov 11, Reinhard Nissl wrote:
 
 I recall this behavior when I had a FF card for testing. Maybe it's a
 feature to stop flickering one pixel high horizontal lines in still
 images by doubling one field of the frame. Maybe there exists a switch
 to turn this feature off.
 
 You've tried to repeat an I frame forever. Try to remove the sequence
 end code (00 00 01 B7) from the end of the file before mplexing and the
 MPEG program end code (00 00 01 B9) from the file after mplexing. Maybe
 remove everything up to the first video PES packet from the final file.

I have no idea what you guys are talking about but have you looked at
mencoder and mplayer's filters?

Or transcode?

There are quite a few filters and smoothing algorithms that you might
like to make use of to remove the jagged effect or other artifacts.

The bmovl filter might be helpful here.

Or is it some bug in MPEG or DVB implementation?

I dunno...

Best,
Girish

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr