Hi dvbcutting crew,
anopheles wrote:
> Hi gang
>
> I appreciate that Sven is happy with dvbcut on the channels that he watches.
>
> But ...
>
> Anyone else have difficulty with Channel4 in the UK? Or anyone experience the
> following problem on some other channel in your area?
[...]
Let me tell you a story...
Once upon a time - about a year ago -, dvbcut was modified to ignore
timestamps in audio frames that are not aligned (i.e. don't start at the
very beginning of a PES packet). This was due to the big, bad German TV
station ARD (also known as Das Letzt^H^H^H^H^HErste) that used to send
unaligned audio frames with bad PTS values - which caused "quite some
trouble", according to Sven.
Unfortunately, ARD is not the only station that sends unaligned MPEG
audio frames. Guess what? Right - Channel4 does it, too. And now the
"ARD workaround" causes trouble because dvbcut can't find any PTS in
Channel4's audio streams. That means there will be no audio in the
output file at all - silent movies, anyone?
According to the MPEG standard, there's nothing wrong with unaligned
audio frames, so I removed the alignment check (see patch #6 below or on
http://www.mr511.de/dvbcut/). It wasn't a correct fix anyway.
If there are problems with ARD again, I'll try to find a better fix for
it. Just drop me a line.
--
Michael "Tired" Riepe <[EMAIL PROTECTED]>
X-Tired: Each morning I get up I die a little
Index: dvbcut/src/index.cpp
===================================================================
RCS file: /var/cvs/sys/qt3/dvbcut/src/index.cpp,v
retrieving revision 1.1.1.4
retrieving revision 1.2
diff -u -r1.1.1.4 -r1.2
--- dvbcut/src/index.cpp 15 Dec 2005 21:16:01 -0000 1.1.1.4
+++ dvbcut/src/index.cpp 29 Jul 2006 17:52:27 -0000 1.2
@@ -424,7 +424,7 @@
if (p[firstiframe].getsequencenumber()>0) {
int fifseqnr=p[firstiframe].getsequencenumber();
- for(int
i=sequencebegin;(!p[i].getseqheader()||i==sequencebegin)&&(i<pictures);++i)
+ for(int
i=sequencebegin;(i<pictures)&&(!p[i].getseqheader()||i==sequencebegin);++i)
if (p[i].getsequencenumber()<fifseqnr)
++skipfirst;
}
Index: dvbcut/src/mpgfile.cpp
===================================================================
RCS file: /var/cvs/sys/qt3/dvbcut/src/mpgfile.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dvbcut/src/mpgfile.cpp 28 Jul 2006 21:15:32 -0000 1.4
+++ dvbcut/src/mpgfile.cpp 6 Aug 2006 00:09:20 -0000 1.5
@@ -266,8 +266,7 @@
while (sd->empty()) {
if (sh.fileposition > stopreadpos || streamreader(sh)<=0)
return; // data does not reach the point in time from which we like to
start playing
- while (!sd->empty() &&
-
!(sd->itemlist().begin()->headerhaspts()&&sd->itemlist().begin()->data_alignment_indicator()))
+ while (!sd->empty() && !sd->itemlist().begin()->headerhaspts())
sd->pop();
}
@@ -281,7 +280,7 @@
int pop=1;
pts_t pts=AV_NOPTS_VALUE;
for(++it;it!=sd->itemlist().end();++it,++pop)
- if (it->headerhaspts()&&it->data_alignment_indicator()) //if
(streamdata::headerhaspts(it->header))
+ if (it->headerhaspts()) //if (streamdata::headerhaspts(it->header))
{
pts=it->headerpts(startpts);
break;
@@ -297,7 +296,7 @@
while (streamreader(sh)>0) {
streamdata::itemlisttype::const_reverse_iterator
it=sd->itemlist().rbegin();
while(it!=sd->itemlist().rend())
- if (it->headerhaspts()&&it->data_alignment_indicator())
+ if (it->headerhaspts())
break;
else
--it;
Index: dvbcut/src/streamdata.cpp
===================================================================
RCS file: /var/cvs/sys/qt3/dvbcut/src/streamdata.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- dvbcut/src/streamdata.cpp 23 Mar 2006 23:41:53 -0000 1.2
+++ dvbcut/src/streamdata.cpp 6 Aug 2006 00:09:20 -0000 1.3
@@ -114,7 +114,7 @@
itemlisttype::iterator it=items.begin();
while(it!=items.end())
- if (!(it->data_alignment_indicator()&&it->headerhaspts()))
+ if (!it->headerhaspts())
it=items.erase(it);
else
++it;
@@ -132,8 +132,8 @@
needsync=false;
for(;it!=items.end();++it)
- if (it->headerhaspts() && it->data_alignment_indicator())
- // header carries PTS and data alignment indicator
+ if (it->headerhaspts())
+ // header carries PTS
break;
if (it==items.end())
@@ -145,7 +145,7 @@
} else {
itemlisttype::iterator n=it;
for(++n;n!=items.end();++n)
- if (it->headerhaspts() && it->data_alignment_indicator())
+ if (it->headerhaspts())
break;
if (n!=items.end())
stopbufferpos=n->bufferposition;
@@ -286,6 +286,7 @@
}
}
+#if 0 // --mr
if (type==streamtype::mpegaudio) {
if (s>=2)
if (data[0]==0xff && (data[1]&0xf0)==0xf0)
@@ -304,6 +305,7 @@
s-=ac3offset+2;
flags|=STREAM_ITEM_FLAG_DATA_ALIGNMENT_INDICATOR;
}
+#endif
if (s>0) {
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
DVBCUT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvbcut-user