Hi!

Ralph Glasstetter wrote:
> Hi,
> 
> again I've a Problem with a recording which I did for a friend from the 
> german 
> Pro7 channel!
> 
> dvdauthor has a few warnings about "disconinuity in audio channel" which is 
> kind of normal, but in the end of the processing it says also:
> 
> WARN: Video PTS does not line up on a multiple of a field.

Sounds like PTS jitter. Or a major discontinuity.

> and a few
> 
> WARN: audio sector out of range: -8213 (vobu #167, pts 40.042)
> 
> The result is, that I can't view the DVD with my player!
> When I try to read the dvbcut-output with "replex" that crashes
> also with a "ringbuffer overrun"!
> 
> I only got a working DVD after reading with ProjectX (no errors and also no 
> warnings!?!) and then "replex"ing the output MPEG to a DVD conform stream 
> before giving it to dvdauthor !

That's probably the best solution anyway.

> I can produce a snippet of the dvbcut output for testing if "someone" is 
> interested... ;-)

I'm not sure if the problem is in the output or in the input. Can you
play the TS with xine or mplayer? Are there any artefacts or
discontinuities around PTS 1230.000?

How long *is* the output file, by the way? 20 minutes or 40 minutes?

> I've attached the detailed output of the two programs,... what I just noticed 
> is, that the video PTS seems to be HALF of the audio PTS???

That's probably caused by dvdauthor. When I tested it a while ago, it
used to drop streams that it could no longer decode. The result was that
I had e.g. a two hour stream with only 20 minutes of audio; the rest was
mute.

Dvdauthor was designed to process DVD material, that is, nearly perfect
input files. But that's something DVB (in particular DVB-T, but to some
extent the other variants as well) just can't deliver.

> ciao
> Ralph
> 
> PS: Thanks for patch Nr. 10 Michael (altough I never missed that last 
> picture ;-))!
> 
> 
> 
> ------------------------------------------------------------------------
> 
> dvdauthor -o dvd3 q3.mpg
> 
> from time to time a few:
> 
> WARN: Discontinuity in audio channel 9; please remultiplex input.
> WARN: Previous sector: 12.897 - 12.969
> WARN: Current sector: 12.993 - 13.065
> ...
> WARN: Discontinuity in audio channel 9; please remultiplex input.
> WARN: Previous sector: 2231.361 - 2231.433
> WARN: Current sector: 2231.457 - 2231.529

Missing audio frames.

> then at the end of the processing:
> WARN: Video PTS does not line up on a multiple of a field.
> 
> INFO: Video pts = 0.245 .. 1230.762
> INFO: Audio[9] pts = 0.249 .. 2461.473
> STAT: VOBU 5134 at 872MB, 1 PGCS
> INFO: Generating VTS with the following video attributes:
> INFO: MPEG version: mpeg2
> INFO: TV standard: pal
> INFO: Aspect ratio: 4:3
> INFO: Resolution: 720x576
> INFO: Audio ch 0 format: mp2/2ch, 48khz 20bps

I guess that means no AC-3 audio?

> STAT: fixing VOBU at 34MB (161/5134, 3%)
> 
> and lots of:
> WARN: audio sector out of range: -8213 (vobu #167, pts 40.042)
> ...
> WARN: audio sector out of range: -226948 (vobu #5133, pts 1230.722)
> STAT: fixed 5134 VOBUS

Are the offsets (-8213 and so on) decreasing steadily?

I'm currently working on an indexer modification that deals with missing
video frames more gracefully. In particular, it tries harder to keep the
frames in order (the original implementation failed to do that when a
sequence header was missing). And what's more important: It reports
video sequence errors while indexing the input file. Maybe you could
give it a try? Note that you have to remove your index file before you
run the modified program (otherwise it will use the existing index).

Note that this is not an "official" patch (yet). And, as opposed to my
other patches, it has to be applied in the src subdirectory with "patch
-p0".

-- 
Michael "Tired" Riepe <[EMAIL PROTECTED]>
X-Tired: Each morning I get up I die a little
Index: index.cpp
===================================================================
RCS file: /var/cvs/sys/qt3/dvbcut/src/index.cpp,v
retrieving revision 1.3
diff -u -r1.3 index.cpp
--- index.cpp   24 Aug 2006 23:57:04 -0000      1.3
+++ index.cpp   1 Sep 2006 20:25:10 -0000
@@ -102,8 +102,10 @@
   int seqheaderpic=0;
   pts_t referencepts=0; // pts of picture #0 in current sequence
   int maxseqnr=-1; // maximum sequence number in current sequence
-  std::list<std::pair<int,int> > curseqnumbers; // seqnr->picnr relation for 
current sequence
   pts_t lastpts=1ll<<31;
+  int last_non_b_pic = -1;
+  int last_non_b_seqnr = -1;
+  int last_seqnr = -1;
 
   while (mpg.streamreader(s)>0) {
     while (sd->getbuffer().inbytes()< (sd->getbuffer().getsize()/2))
@@ -149,6 +151,12 @@
 
       if (*(uint32_t*)(data+skip)==mbo32(0x000001b3)) // sequence header
         {
+        if (last_non_b_pic >= 0) {
+          p[last_non_b_pic].setsequencenumber(++maxseqnr);
+          last_non_b_pic = -1;
+          }
+       last_seqnr = -1;
+
         waitforfirstsequenceheader=false;
         foundseqheader=true;
         sd->discard(skip);
@@ -166,16 +174,6 @@
         inbytes=sd->inbytes();
         skip=0;
 
-        // ensure that sequence numbers are okay in the last sequence
-        if (!curseqnumbers.empty())
-          {
-          curseqnumbers.sort();
-          int n=0;
-          for(std::list<std::pair<int,int> >::iterator 
it=curseqnumbers.begin();it!=curseqnumbers.end();++it)
-            p[it->second].setsequencenumber(n++);
-          curseqnumbers.clear();
-          }
-
         } else if 
((*(uint32_t*)(data+skip)==mbo32(0x00000100))&&!waitforfirstsequenceheader) // 
picture header
         {
         sd->discard(skip);
@@ -183,8 +181,6 @@
 
         filepos_t picpos=sd->itemlist().front().fileposition;
         int seqnr=(data[4]<<2)|((data[5]>>6)&3);
-        if (seqnr>maxseqnr)
-          maxseqnr=seqnr;
         int frametype=(data[5]>>3)&7;
         if (frametype>3)
           frametype=0;
@@ -205,8 +201,39 @@
           p=(picture*)realloc((void*)p,size*sizeof(picture));
           }
 
-        curseqnumbers.push_back(std::pair<int,int>(seqnr,pictures));
-        
p[pictures++]=picture(foundseqheader?seqheaderpos:picpos,pts,framerate,aspectratio,seqnr,frametype,foundseqheader);
+        
p[pictures]=picture(foundseqheader?seqheaderpos:picpos,pts,framerate,aspectratio,seqnr,frametype,foundseqheader);
+
+        if (frametype == IDX_PICTYPE_B) {
+         /* check sequence number */
+         if (seqnr != last_seqnr + 1) {
+           fprintf(stderr,
+             "missing frame(s) before B frame %d (%d != %d)\n",
+             pictures, seqnr, last_seqnr + 1);
+           if (last_non_b_pic >= 0) {
+             p[last_non_b_pic].setsequencenumber(++maxseqnr);
+             last_non_b_pic = -1;
+             }
+           }
+         p[pictures].setsequencenumber(++maxseqnr);
+         last_seqnr = seqnr;
+         } else {
+           /* I and P frames are delayed */
+           if (last_non_b_pic >= 0) {
+             /* check sequence number */
+             if (last_non_b_seqnr != last_seqnr + 1) {
+               fprintf(stderr,
+                 "missing frame(s) before %c frame %d (%d != %d)\n",
+                 p[last_non_b_pic].isiframe() ? 'I' : 'P',
+                 pictures, last_non_b_seqnr, last_seqnr + 1);
+               }
+             p[last_non_b_pic].setsequencenumber(++maxseqnr);
+             last_seqnr = last_non_b_seqnr;
+             }
+           last_non_b_pic = pictures;
+           last_non_b_seqnr = seqnr;
+         }
+
+       ++pictures;
 
         foundseqheader=false;
         sd->discard(8);
@@ -219,13 +246,9 @@
     sd->discard(skip);
     }
 
-  // ensure that sequence numbers are okay in the last sequence
-  if (!curseqnumbers.empty()) {
-    curseqnumbers.sort();
-    int n=0;
-    for(std::list<std::pair<int,int> >::iterator 
it=curseqnumbers.begin();it!=curseqnumbers.end();++it)
-      p[it->second].setsequencenumber(n++);
-    curseqnumbers.clear();
+  if (last_non_b_pic >= 0) {
+    p[last_non_b_pic].setsequencenumber(++maxseqnr);
+    last_non_b_pic = -1;
     }
 
   if (pictures==0) {
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
DVBCUT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvbcut-user

Reply via email to